Reset confirmation dialog layout after dismissal#684
Draft
righteousgambit wants to merge 1 commit into
Draft
Conversation
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.
Closes #683
Summary
This is deliberately limited to presentation state. It does not change confirm/cancel callbacks, controller commands, modal dismissal policy, or the content of either safety warning.
Root cause
Makeraowns oneConfirmPopupfor all confirmation workflows. The standard geometry is applied by KV when that singleton is constructed. Laser mode later mutates its size, position, and title height; resume-at-line mutates its size and position. Before this change,on_dismiss()only cleared theshowingflag, so those live properties became the next workflow's starting state.The reset belongs in the popup dismissal lifecycle so every expanded workflow is contained without requiring every ordinary caller to defensively re-declare the defaults.
Deterministic reproduction and proof
Validated from pinned upstream
develop@2ea66c10e96d88013a04441134d3d4f8e8c88510with the repository's locked Python 3.11 environment.The regression opens an expanded warning, verifies its intended layout, dismisses it, opens Restore Settings, and verifies the standard layout. It covers both:
(0.6, 0.7), centered, automatic title height -> standard confirmation(0.8, 0.8), centered -> standard confirmationOn the pinned base, the first regression failed deterministically:
With this change:
The warning is the repository's existing Python deprecation warning for
locale.getdefaultlocale().Full validation
Real fork commit:
a61390716db8Its sole parent is pinned upstream
develop@2ea66c10e96d88013a04441134d3d4f8e8c88510.All 15 skipped cases are the repository's existing visual-regression tests, which call
pytest.skip()when their reference PNG is absent; there are currently no checked-in reference images. The new regressions therefore assert exact Kivy state and geometry and do not rely on those non-enforcing visual cases.Operator-facing result
After an operator cancels an expanded laser or resume warning, short confirmations such as Restore Settings, Save As Default, delete, overwrite, and reset again use the normal dialog hierarchy and footprint. The expanded safety prompts themselves retain their current prominence.