Skip to content

Fixes #39273 - removed showHide prop and its functionality, since it is not used anymore#10966

Merged
adamruzicka merged 1 commit into
theforeman:developfrom
andreilakatos:fixes-39273-editor-showhide-cleanup
May 5, 2026
Merged

Fixes #39273 - removed showHide prop and its functionality, since it is not used anymore#10966
adamruzicka merged 1 commit into
theforeman:developfrom
andreilakatos:fixes-39273-editor-showhide-cleanup

Conversation

@andreilakatos
Copy link
Copy Markdown
Contributor

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).

@Lukshio
Copy link
Copy Markdown
Contributor

Lukshio commented Apr 30, 2026

Hi, this is straightforward PR, changes looks good.

@Lukshio
Copy link
Copy Markdown
Contributor

Lukshio commented Apr 30, 2026

Manually tested

Copy link
Copy Markdown
Contributor

@adamruzicka adamruzicka left a comment

Choose a reason for hiding this comment

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

Pro-forma ACK, the real ACK(s) are in the comments.

@adamruzicka adamruzicka merged commit 18f3dff into theforeman:develop May 5, 2026
26 checks passed
@adamruzicka
Copy link
Copy Markdown
Contributor

Thank you @andreilakatos & @Lukshio !

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.

3 participants