Skip to content

Show the view state of puppet modules/classes using chevrons on puppetclass selection page#439

Draft
me-minus wants to merge 3 commits into
theforeman:masterfrom
me-minus:flippout
Draft

Show the view state of puppet modules/classes using chevrons on puppetclass selection page#439
me-minus wants to merge 3 commits into
theforeman:masterfrom
me-minus:flippout

Conversation

@me-minus

@me-minus me-minus commented Dec 21, 2025

Copy link
Copy Markdown

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.

Original (from foreman 3.19.0 + foreman_puppet 10.1.1):
Screenshot From 2026-06-20 15-35-25

Changed version:
Screenshot From 2026-06-20 21-57-30

@nadjaheitmann

Copy link
Copy Markdown
Collaborator

Hi @me-minus ! Thanks for the contribution! Do you mind providing a screenshot that show cases your change?

@me-minus

Copy link
Copy Markdown
Author
foreman_with_chevrons

@nadjaheitmann

Copy link
Copy Markdown
Collaborator

Looks good to me and works fine. But I don't want to merge this without the consent of @adamruzicka .

@adamruzicka adamruzicka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't say I'm exactly happy about inline styling all over the place. Could that be extracted to classes?

@me-minus me-minus Mar 29, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not find a way to extract the styling, so I removed it but then the spacing gets wonky
Screenshot From 2026-03-29 15-26-54
Do you have any hints on where I could look?

Comment thread app/views/foreman_puppet/puppetclasses/_classes.html.erb Outdated
Comment thread webpack/src/foreman_class_edit.js
.show();
.show()
.filter('div')
.find('a.collapsed')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the collapsed class being set on a <a>?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really know.
I used the developers pane to find out how the attributes changed with some hints from the _classes.html.erb file.
The code was created by changing/playing with the left menu pane code in an older foreman version (probably before parternfly 5)

@me-minus me-minus marked this pull request as draft June 20, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants