Skip to content

Conversation

@jeremylenz
Copy link
Contributor

Summary

This PR fixes a UX regression in the bulk "Change Hostgroup" action on the All Hosts page. The old ERB implementation showed the nested hostgroup structure (e.g., "Parent/Child/Grandchild"), but the new React implementation only showed the final hostgroup name, making it difficult to distinguish between hostgroups with the same name but different parents.

Changes:

  • Upgraded HostGroupSelect component from deprecated PatternFly v4 to PatternFly v5 API
  • Added custom rendering to display hierarchical structure in dropdown options
  • When closed: displays only the hostgroup name (clean display)
  • When open: displays styled hierarchy with parent parts in gray and final part in bold (e.g., "Base > Production > WebServers")
  • Enhanced typeahead filtering to search both name and full path

Test Plan

  1. Navigate to All Hosts page
  2. Select multiple hosts using checkboxes
  3. Click "Select Action" > "Change Hostgroup"
  4. Open the hostgroup dropdown
  5. Verify that hostgroups with parent structure show the full hierarchy (e.g., "Parent > Child > Grandchild")
  6. Verify that parent parts are displayed in gray text and the final part is bold
  7. Test the typeahead search by typing part of a parent or child name
  8. Verify that filtering works for both the hostgroup name and the full hierarchical path
  9. Select a hostgroup and verify it displays only the name when the dropdown is closed

Generated with Claude Code

Copy link
Contributor

@nofaralfasi nofaralfasi left a comment

Choose a reason for hiding this comment

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

The code changes work as expected, but it looks like the failing tests are related to these updates.

@jeremylenz jeremylenz force-pushed the 38827-hostgroup-dropdown-hierarchy branch from fe20ffa to a8c1c4e Compare November 20, 2025 14:44
@jeremylenz jeremylenz force-pushed the 38827-hostgroup-dropdown-hierarchy branch 2 times, most recently from d7bc745 to 344423a Compare November 20, 2025 16:44
@jeremylenz
Copy link
Contributor Author

🍏

Upgraded HostGroupSelect to PatternFly v5 and added hierarchical
display for hostgroup options. Dropdown now shows parent structure
(e.g., "Base > Production > WebServers") when open, with parent
parts in gray and final part bold. Typeahead search works on both
name and full path.

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@jeremylenz jeremylenz force-pushed the 38827-hostgroup-dropdown-hierarchy branch from 344423a to a467c83 Compare November 20, 2025 20:10
@nofaralfasi nofaralfasi merged commit 72ed5aa into theforeman:develop Nov 21, 2025
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants