Conversation
The design-mode toggle now remembers whether live preview was open when entering. If LP was already open the exit behavior is unchanged — LP stays visible at its prior width. If LP was closed and got opened only because design mode needed it, exiting closes LP again and main-toolbar shrinks back to the icon-bar width, returning the user to the pure code-editing layout they started from. The skipToolbarRestore path (LP was just closed by the user via toolbar-go-live) is unaffected — no double-close. Updates section-5 tests so the two branches are explicit mirrors of each other: LP-was-open keeps LP visible with toolbar at LP width; LP-wasn't-open closes LP with toolbar at icon-bar width.
Clicking #toolbar-go-live while in design mode now exits design mode
and leaves Live Preview open, instead of hiding LP and dropping back to
pure code mode. Outside design mode the button still toggles LP as
before.
Implemented as a capture-phase click listener on #toolbar-go-live that
stops propagation when editorCollapsed is true and calls
_setEditorCollapsed(false, { keepLivePreviewOpen: true }), forcing the
exit path to keep LP regardless of the entry-state snapshot.
Section-6 tests now cover both branches: in design mode the click
exits with LP visible at LP width; outside design mode the click hides
LP normally. Uses native el.click() so the capture-phase listener
actually fires (jQuery's synthetic .trigger("click") would skip it).
|
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.



No description provided.