Skip to content

PF5 updates for host detail Content: Errata & Module streams tabs - #1941

Merged
LadislavVasina1 merged 1 commit into
SatelliteQE:masterfrom
pnovotny:host-errata-pf5-fixes
Aug 12, 2025
Merged

PF5 updates for host detail Content: Errata & Module streams tabs#1941
LadislavVasina1 merged 1 commit into
SatelliteQE:masterfrom
pnovotny:host-errata-pf5-fixes

Conversation

@pnovotny

@pnovotny pnovotny commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

Host Content Errata & Module streams PF5 updates

Updated PF5 widgets on host detail - Content - Errata & Module streams tabs.

Summary by Sourcery

Upgrade host detail errata and module streams tabs to use PF5 OUIA-compliant widgets for filters, dropdowns, tables, and pagination.

Enhancements:

  • Replace Select filters with PF5OUIASelect in errata and module streams views
  • Replace bulk action dropdowns with PF5Dropdown
  • Use OUIA-compliant table components (PF5OUIAExpandableTable and PF5OUIATable) with MenuToggleButtonMenu for kebab toggles
  • Swap PF4Pagination with PF5Pagination for pagination controls

@pnovotny pnovotny added No-CherryPick PR doesnt need CherryPick to previous branches Stream labels Aug 4, 2025
@pnovotny pnovotny self-assigned this Aug 4, 2025
@pnovotny
pnovotny requested a review from a team August 4, 2025 11:03
@sourcery-ai

sourcery-ai Bot commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This PR migrates the host detail Content Errata and Module Streams tabs from PF4 to PF5 by swapping out legacy selector, dropdown, table, and pagination components for their PF5 OUIA equivalents.

Class diagram for updated PF5 widgets in host detail Content: Errata & Module streams tabs

classDiagram
    class errata {
        +Checkbox select_all
        +SearchInput searchbar
        +PF5OUIASelect type_filter
        +PF5OUIASelect severity_filter
        +PF5Dropdown dropdown
        +MenuToggleButtonMenu kebab_actions
        +PF5OUIAExpandableTable table
        +PF5Pagination pagination
    }
    class module_streams {
        +SearchInput searchbar
        +PF5OUIASelect status_filter
        +PF5OUIASelect installation_status_filter
        +PF5Dropdown dropdown
        +MenuToggleButtonMenu kebab_actions
        +PF5OUIATable table
        +PF5Pagination pagination
    }
    errata --|> PF5Tab
    module_streams --|> PF5Tab
    PF5OUIAExpandableTable <|-- PF5OUIATable
    PF5Dropdown <.. MenuToggleButtonMenu : uses
    PF5OUIASelect <.. PF5OUIAExpandableTable : used in filters
    PF5OUIASelect <.. PF5OUIATable : used in filters
    PF5Pagination <.. PF5OUIAExpandableTable : used for pagination
    PF5Pagination <.. PF5OUIATable : used for pagination
Loading

File-Level Changes

Change Details Files
Migrate filter components to PF5OUIASelect
  • Replaced type_filter with PF5OUIASelect
  • Replaced severity_filter with PF5OUIASelect
  • Replaced status_filter with PF5OUIASelect
  • Replaced installation_status_filter with PF5OUIASelect
airgun/views/host_new.py
Swap PF4 dropdowns and action menus for PF5 variants
  • Replaced Pf4ActionsDropdown with PF5Dropdown
  • Replaced bulk_actions Dropdown with PF5Dropdown
  • Replaced kebab action Dropdown with MenuToggleButtonMenu
airgun/views/host_new.py
Upgrade table components to PF5 OUIA tables
  • Replaced ExpandableTable with PF5OUIAExpandableTable (component_id host-errata-table)
  • Replaced Table with PF5OUIATable (component_id host-module-stream-table)
airgun/views/host_new.py
Replace PF4 pagination with PF5Pagination
  • Removed PF4Pagination instances
  • Added PF5Pagination() for errata and module streams
airgun/views/host_new.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@pnovotny

pnovotny commented Aug 4, 2025

Copy link
Copy Markdown
Contributor Author

This PR is basically an updated version of #1888

@pnovotny

pnovotny commented Aug 4, 2025

Copy link
Copy Markdown
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_host.py -k 'test_positive_crud_module_streams or test_positive_apply_erratum'

@pnovotny
pnovotny marked this pull request as ready for review August 4, 2025 11:47

@sourcery-ai sourcery-ai Bot 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.

Hey @pnovotny - I've reviewed your changes - here's some feedback:

  • The errata tab still uses Pf4ActionsDropdown; consider migrating it to a PF5 action menu equivalent to complete the PF4->PF5 transition.
  • Several PF5OUIASelect filters follow the same pattern—extraction into a small factory/helper could reduce duplication.
  • PF5Dropdown is initialized with a raw locator while PF5OUIASelect uses component_id; standardizing on component_id-driven instantiation would better align with OUIA practices.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The errata tab still uses Pf4ActionsDropdown; consider migrating it to a PF5 action menu equivalent to complete the PF4->PF5 transition.
- Several PF5OUIASelect filters follow the same pattern—extraction into a small factory/helper could reduce duplication.
- PF5Dropdown is initialized with a raw locator while PF5OUIASelect uses component_id; standardizing on component_id-driven instantiation would better align with OUIA practices.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread airgun/views/host_new.py
@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Aug 4, 2025

@sambible sambible 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.

Looks good.

@LadislavVasina1

Copy link
Copy Markdown
Contributor

@pnovotny Could you please look into the PRT results

@pnovotny

pnovotny commented Aug 5, 2025

Copy link
Copy Markdown
Contributor Author

@pnovotny Could you please look into the PRT results

Both tests failed at the beginning on module_repos_collection_with_setup.setup_virtual_machine(client, target_sat) step, before getting to the UI part.
Let's see if re-triggering the PRT helps or I'll look around for another tests for verification.

@pnovotny

pnovotny commented Aug 5, 2025

Copy link
Copy Markdown
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_host.py -k 'test_positive_crud_module_streams or test_positive_apply_erratum'

Updated PF5 widgets on host detail Content: Errata & Module streams tabs.

Also:

Most customized locators in `MenuToggleButtonMenu` widget were removed,
because they were including only dropdown toggle variant and not menu toggle one.
Original locators include both variants which should suffice.
The default locator now includes also common kebab menu aria labels
so it doesn't need to be supplied as an init parameter for each instance.
@pnovotny
pnovotny force-pushed the host-errata-pf5-fixes branch from 96fae39 to 7ca92ac Compare August 8, 2025 16:13
@pnovotny pnovotny removed the PRT-Failed Indicates that latest PRT run is failed for the PR label Aug 8, 2025
@pnovotny

pnovotny commented Aug 8, 2025

Copy link
Copy Markdown
Contributor Author

Running PRTs in the dependent robottelo PR SatelliteQE/robottelo#19146

@LadislavVasina1
LadislavVasina1 merged commit e4ba37f into SatelliteQE:master Aug 12, 2025
8 of 9 checks passed
jnagare-redhat pushed a commit to jnagare-redhat/airgun that referenced this pull request Aug 13, 2025
Updated PF5 widgets on host detail Content: Errata & Module streams tabs.

Also:

Most customized locators in `MenuToggleButtonMenu` widget were removed,
because they were including only dropdown toggle variant and not menu toggle one.
Original locators include both variants which should suffice.
The default locator now includes also common kebab menu aria labels
so it doesn't need to be supplied as an init parameter for each instance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No-CherryPick PR doesnt need CherryPick to previous branches Stream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants