Skip to content

Make dialog collapsed and maximized states mutually exclusive#1690

Merged
klembot merged 3 commits into
klembot:developfrom
ThresholdOps:fix/dialog-collapse-maximize-exclusive
Jul 13, 2026
Merged

Make dialog collapsed and maximized states mutually exclusive#1690
klembot merged 3 commits into
klembot:developfrom
ThresholdOps:fix/dialog-collapse-maximize-exclusive

Conversation

@ThresholdOps

Copy link
Copy Markdown
Contributor

Description

Enforces the dialog state invariant discussed in #1418: a dialog should not be both collapsed and maximized at the same time.

The reducer now clears maximized when a dialog is collapsed, and clears collapsed when a dialog is maximized. This prevents the remaining blank fullscreen dialog state caused by a maximized wrapper around a collapsed dialog (open the stylesheet/JavaScript pane, maximize it, then collapse it).

Adds reducer coverage for both state transitions.

Notes for reviewer

Two things noted but intentionally not changed here — this PR sells one thing: the !(collapsed && maximized) invariant.

  • passage-edit-stack.tsx's collapsed && maximized style branch becomes dead code once that state can't occur. Left as-is; normal collapsed styling is unaffected.
  • setDialogMaximized already clears maximized on all dialogs for an out-of-range index (the existing incorrect-index test doesn't exercise this). Pre-existing; untouched.

Issues Fixed

Addresses the remaining dialog state issue discussed in #1418.

Using "Addresses" rather than "Fixes" pending a manual UI pass on the stylesheet/JavaScript panel, a single passage editor, and a passage stack with several passages.

Credit

Please put an X in one of the squares below only.

  • I would like to be credited in the application as: ______
  • I would not like my name to appear in the application credits.

Presubmission Checklist

Put an X in the squares below to indicate you've done each step.

  • I have read this project's CONTRIBUTING file and this PR follows the criteria laid out there.
  • This contribution was created by me and I have the right to submit it under the GPL v3 license. (This is not a rights assignment.)
  • I have read and agree to abide by this project's Code of Conduct.

@ThresholdOps ThresholdOps requested a review from klembot as a code owner June 28, 2026 08:54
Comment thread src/dialogs/context/__tests__/reducer.test.ts
@ThresholdOps ThresholdOps force-pushed the fix/dialog-collapse-maximize-exclusive branch from f2c93a9 to d3ced22 Compare July 6, 2026 19:30
@klembot klembot merged commit 3dcb1d5 into klembot:develop Jul 13, 2026
4 checks passed
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.

2 participants