Skip to content

add hideUndoRedo settings#5986

Open
salimkanoun wants to merge 2 commits into
OHIF:masterfrom
salimkanoun:hide-redo-undo
Open

add hideUndoRedo settings#5986
salimkanoun wants to merge 2 commits into
OHIF:masterfrom
salimkanoun:hide-redo-undo

Conversation

@salimkanoun
Copy link
Copy Markdown
Contributor

@salimkanoun salimkanoun commented Apr 28, 2026

Hi there,

Here is a PR which add a setting to hide the Undo/Redo button (not used in scenario without segmentation), from the header

Greptile Summary

This PR adds a hideUndoRedo boolean config option that conditionally renders the Undo/Redo buttons in the viewer header, along with TypeScript typings, PropTypes, and documentation. The config flag is also explicitly set to false across all existing config files (redundant, since App.tsx already defaults it to false).

The unresolved concern from the previous review — the unconditional separator <div> in Header.tsx (line 85) that renders even when UndoRedo is false — has not been addressed in this iteration.

Confidence Score: 4/5

Safe to merge with a minor visual defect — the orphaned separator in Header.tsx renders when UndoRedo is hidden

A single unresolved P1-level UI defect (orphaned separator) was flagged in the previous review round but not fixed; all other changes are straightforward and correct

platform/ui-next/src/components/Header/Header.tsx — the separator at line 85 should be guarded: {UndoRedo && <div className="border-muted mx-1.5 h-[25px] border-r" />}

Important Files Changed

Filename Overview
extensions/default/src/ViewerLayout/ViewerHeader.tsx Adds hideUndoRedo conditional around UndoRedo buttons; the orphaned separator in Header.tsx (line 85) is unresolved — it renders unconditionally even when UndoRedo is hidden
platform/core/src/types/AppTypes.ts Adds optional hideUndoRedo?: boolean to the Config interface — correct
platform/app/src/App.tsx Adds hideUndoRedo: false default prop and PropTypes.bool entry — correct
platform/docs/docs/configuration/configurationFiles.md Documents the new hideUndoRedo option and adds it to the example config block
platform/app/public/config/default.js Adds hideUndoRedo: false — redundant since the default in App.tsx already handles this, but harmless

Reviews (2): Last reviewed commit: "Update platform/docs/docs/configuration/..." | Re-trigger Greptile

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 28, 2026

Deploy Preview for ohif-dev canceled.

Name Link
🔨 Latest commit 08b9941
🔍 Latest deploy log https://app.netlify.com/projects/ohif-dev/deploys/69f11f47553ab9000857a213

Comment thread extensions/default/src/ViewerLayout/ViewerHeader.tsx
Comment thread platform/docs/docs/configuration/configurationFiles.md Outdated
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant