Show the view state of puppet modules/classes using chevrons on puppetclass selection page#439
Open
me-minus wants to merge 1 commit intotheforeman:masterfrom
Open
Show the view state of puppet modules/classes using chevrons on puppetclass selection page#439me-minus wants to merge 1 commit intotheforeman:masterfrom
me-minus wants to merge 1 commit intotheforeman:masterfrom
Conversation
…puppet class selection view
Collaborator
|
Hi @me-minus ! Thanks for the contribution! Do you mind providing a screenshot that show cases your change? |
Author
Collaborator
|
Looks good to me and works fine. But I don't want to merge this without the consent of @adamruzicka . |
adamruzicka
requested changes
Jan 28, 2026
Contributor
adamruzicka
left a comment
There was a problem hiding this comment.
The erb is mixing tabs and spaces for indentation. Could you please only use spaces for that?
| </ul> | ||
|
|
||
| <div class="panel-group paneless puppetclass_group" id="<%= list.first %>-avail-classes" style="margin-bottom: 1px;"> | ||
| <div class="panel-heading" style="padding-top: 2px; padding-bottom: 2px;"> |
Contributor
There was a problem hiding this comment.
I can't say I'm exactly happy about inline styling all over the place. Could that be extracted to classes?
Comment on lines
+26
to
+27
| <%= content_tag(:li, klass, :id=>"puppetclass_#{klass.id}", :class=>style) do %> | ||
| <%= link_to_add_puppetclass(klass,type) %> |
Contributor
There was a problem hiding this comment.
Suggested change
| <%= content_tag(:li, klass, :id=>"puppetclass_#{klass.id}", :class=>style) do %> | |
| <%= link_to_add_puppetclass(klass,type) %> | |
| <%= content_tag(:li, klass, :id => "puppetclass_#{klass.id}", :class => style) do %> | |
| <%= link_to_add_puppetclass(klass, type) %> |
| .filter('div') | ||
| .find('a.collapsed') | ||
| .attr('aria-expanded','true') | ||
| .click(); |
| .show(); | ||
| .show() | ||
| .filter('div') | ||
| .find('a.collapsed') |
Contributor
There was a problem hiding this comment.
Where is the collapsed class being set on a <a>?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This commit changes the add puppet class view to be a bit more like a tree by changing the big + to be a right chevron or down chevron if the module has been opened.
When I have shown people how to create machines with the help of foreman, many have wondered what the difference between the '+' symbols when adding puppet classes are.