Fixes #39273 - removed showHide prop and its functionality, since it is not used anymore#10966
Merged
adamruzicka merged 1 commit intoMay 5, 2026
Conversation
…is not used anymore
Contributor
|
Hi, this is straightforward PR, changes looks good. |
Contributor
|
Manually tested |
adamruzicka
approved these changes
May 5, 2026
Contributor
adamruzicka
left a comment
There was a problem hiding this comment.
Pro-forma ACK, the real ACK(s) are in the comments.
Contributor
|
Thank you @andreilakatos & @Lukshio ! |
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.
Remove the obsolete showHide prop and any logic that depended on it from the Foreman template Editor UI. The prop was never supplied from Rails (react_component('Editor', …) in templates/_form.html.erb only passes showImport, showPreview, and showHostSelector), so this is dead-code cleanup with no change to server-rendered props.
Changes
Drop showHide from the Editor component tree (props, conditionals, and defaults as applicable).
Update Editor unit tests and Jest snapshots so they no longer reference showHide.
No changes to provisioning templates, renderer_test, or snapshot content for redhat_register—this is React-only.
How to test
Prerequisites
Foreman dev environment with Node deps installed, or CI that runs the JS test suite.
Steps
Review the diff and confirm only showHide (and related wiring) was removed—not showPreview / showHostSelector / showImport.
Open Hosts → Provisioning Templates (or another screen that uses the same Editor), edit a template, and confirm Editor / Preview / Changes tabs and the toolbar still behave normally.
Run the Editor tests, for example:
npm test -- webpack/assets/javascripts/react_app/components/Editor
(or the subset of tests/snapshots your branch touches, e.g. Editor.test.js, EditorNavbar.test.js, EditorOptions.test.js, integration.test.js).