Skip to content

Fixes #38916 - Update EditorHostSelect to pf5#10777

Merged
MariaAga merged 1 commit intotheforeman:developfrom
adamlazik1:update-editorhostselect
Apr 28, 2026
Merged

Fixes #38916 - Update EditorHostSelect to pf5#10777
MariaAga merged 1 commit intotheforeman:developfrom
adamlazik1:update-editorhostselect

Conversation

@adamlazik1
Copy link
Copy Markdown
Contributor

@adamlazik1 adamlazik1 commented Nov 21, 2025

Use the shared PF5 AutocompleteInput for the template editor preview host
field.

Drop patternfly-react-extensions and its webpack vendor bundle and SCSS
imports now that the editor no longer uses the extensions Select
component.

Co-authored-by: Lukas Jezek ljezek@redhat.com

@adamlazik1 adamlazik1 requested a review from a team as a code owner November 21, 2025 09:19
@github-actions github-actions Bot added the UI label Nov 21, 2025
Copy link
Copy Markdown
Contributor

@kfamilonidis kfamilonidis left a comment

Choose a reason for hiding this comment

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

Good approach. It would help to cherry-pick these changes to align with the tests already written for this part here.

Comment thread package.json
@MariaAga
Copy link
Copy Markdown
Member

I didnt read the code yet, but isnt

replicate the behavior of https://v5-archive.patternfly.org/components/menus/select/#typeahead

The same as this pr? #10734

@adamlazik1
Copy link
Copy Markdown
Contributor Author

I didnt read the code yet, but isnt

replicate the behavior of https://v5-archive.patternfly.org/components/menus/select/#typeahead

The same as this pr? #10734

@MariaAga mostly the same but EditorHostSelect has some extra properties and I don't really know whether adjusting AutocompleteInput to replace EditorHostSelect won't break the use of AutocompleteInput in other places.

@pondrejk
Copy link
Copy Markdown
Contributor

pondrejk commented Dec 3, 2025

Took a brief look at the changes and also at airgun:

  • I see editor-select-container stayed as an ID, which is great but I don't see it referenced in airgun anyway -- that's probably something to be changed, but this fact tells me that the tests doing template preview rely on the first host prefill, so in that matter this will definitely be a breaking change for ds tests. I'd like you to consider getting back to the fist item prefill, I think it was a nice click saver for users
  • the padding issue is definitely a problem for me, imho its ok to make the navbar thicker if we cant make the dropdown thinner
  • also I'd add some definition to the dropdown border, I imagine it would be hard to read, or maybe if it was with white background, not gray on gray

@adamlazik1
Copy link
Copy Markdown
Contributor Author

After discussion with @Lukshio we determined that it is more beneficial to first update EditorHostSelect to PF5, then update the EditorNavBar to PF5 as the parent component.

Comment thread webpack/assets/javascripts/react_app/components/Editor/components/EditorNavbar.js Outdated
Comment thread webpack/assets/javascripts/react_app/components/Editor/components/EditorNavbar.js Outdated
@pnovotny
Copy link
Copy Markdown

Couple things found during PR testing:

  • one scenario where the host search acts a bit strange:

If you have selected a host (given the host has ID 5), you clear the text and type in some string that doesn't match anything, for example ddd.
Message No results found for ddd is shown (this is correct).
Now, if you click somewhere around the search input that makes the message disappear, the search string ddd is replaced with 5 - the host ID.
Screen capture:
host-selector-search-id-instead-of-name.webm

  • as already commented here,
    the bottom padding of the host select and vertical alignment of Safemode checkbox is little bit off . But I am also fine with being it fixed in the EditorNavbar PR.

Comment thread webpack/assets/javascripts/react_app/components/Editor/components/EditorNavbar.js Outdated
Comment thread webpack/assets/javascripts/react_app/components/Editor/components/EditorNavbar.js Outdated
Copy link
Copy Markdown
Contributor

@Lukshio Lukshio left a comment

Choose a reason for hiding this comment

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

@adamlazik1 I think that this PR has gone too far with the changes, so now it should be better to start from the original code.

I wrote some comments, but overall: the complexity of the code has reached unwanted state where lot of things are being rewritten/remapped.

I've created minimal patch that should solve all of the issues with minimal changes. Try to apply the patch, if it will work correctly, as it does in my setup, new testing from @pnovotny will be needed.

0001-minimal-patch_2.patch

Comment thread webpack/assets/javascripts/react_app/components/Editor/components/EditorNavbar.js Outdated
@adamlazik1
Copy link
Copy Markdown
Contributor Author

Thanks @Lukshio, I applied your patch and confirmed that EditorHostSelect appears to work as intended.

@adamlazik1 adamlazik1 force-pushed the update-editorhostselect branch 2 times, most recently from bef12a5 to 6478a25 Compare April 21, 2026 12:04
@Lukshio
Copy link
Copy Markdown
Contributor

Lukshio commented Apr 21, 2026

Looks good, I also verified webhooks with new autocomplete, looks ok. @pnovotny please check QE side.

@adamlazik1 just fix the failing tests.

@pnovotny
Copy link
Copy Markdown

Reverified with the latest add-ons. QA-wise LGTM 👍

The issues from my last verification are fixed:

  • Filtering now works correctly, no problems found.
  • Vertical alignment of the host select and Safemode checkbox now look fine too.

@adamlazik1 adamlazik1 force-pushed the update-editorhostselect branch 4 times, most recently from 3db64f9 to e1165c1 Compare April 22, 2026 12:32
@Lukshio
Copy link
Copy Markdown
Contributor

Lukshio commented Apr 22, 2026

I also add my ack. It looks kida weird to have lot of "changes" in tree, but that was just rebase. Confirmed that code didn't change since @pnovotny lgtm.

Use the shared PF5 AutocompleteInput for the template editor preview host
field.

Drop patternfly-react-extensions and its webpack vendor bundle and SCSS
imports now that the editor no longer uses the extensions Select
component.

Co-authored-by: Lukas Jezek <ljezek@redhat.com>
@adamlazik1
Copy link
Copy Markdown
Contributor Author

Thanks @pnovotny and @Lukshio. I squashed everything into one commit, no further changes to code were made. This is now ready for merging.

Copy link
Copy Markdown

@pnovotny pnovotny left a comment

Choose a reason for hiding this comment

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

Thanks @pnovotny and @Lukshio. I squashed everything into one commit, no further changes to code were made. This is now ready for merging.

ACK

Copy link
Copy Markdown
Member

@MariaAga MariaAga left a comment

Choose a reason for hiding this comment

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

Did a quick look at the code and going to trust @Lukshio and @pnovotny acks.
Thanks everyone!

@MariaAga MariaAga dismissed Lukshio’s stale review April 22, 2026 16:54

Lukshio commented "I also add my ack."

@MariaAga
Copy link
Copy Markdown
Member

@theforeman/packaging:

Merging is blocked
Waiting on code owner review from theforeman/packaging.

@evgeni
on Nov 21, 2025
Deleting things from package.json will always get you a 📦 ACK from me ;-)

@MariaAga MariaAga merged commit 47dca75 into theforeman:develop Apr 28, 2026
26 checks passed
@adamlazik1 adamlazik1 deleted the update-editorhostselect branch May 4, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants