add hideUndoRedo settings#5986
Open
salimkanoun wants to merge 2 commits into
Open
Conversation
✅ Deploy Preview for ohif-dev canceled.
|
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.
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
hideUndoRedoboolean 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 tofalseacross all existing config files (redundant, sinceApp.tsxalready defaults it tofalse).The unresolved concern from the previous review — the unconditional separator
<div>inHeader.tsx(line 85) that renders even whenUndoRedoisfalse— 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
hideUndoRedoconditional around UndoRedo buttons; the orphaned separator in Header.tsx (line 85) is unresolved — it renders unconditionally even when UndoRedo is hiddenhideUndoRedo?: booleanto the Config interface — correcthideUndoRedo: falsedefault prop and PropTypes.bool entry — correcthideUndoRedooption and adds it to the example config blockhideUndoRedo: false— redundant since the default in App.tsx already handles this, but harmlessReviews (2): Last reviewed commit: "Update platform/docs/docs/configuration/..." | Re-trigger Greptile