Commit f9c24f7
committed
feat(design-mode): exit to pure-code mode when LP wasn't open at entry
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.1 parent de12d6d commit f9c24f7
2 files changed
Lines changed: 34 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
275 | 288 | | |
276 | 289 | | |
277 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
574 | 578 | | |
575 | 579 | | |
576 | 580 | | |
| 581 | + | |
577 | 582 | | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
578 | 586 | | |
579 | 587 | | |
580 | 588 | | |
| |||
591 | 599 | | |
592 | 600 | | |
593 | 601 | | |
594 | | - | |
595 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
596 | 606 | | |
| 607 | + | |
597 | 608 | | |
598 | 609 | | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
605 | 616 | | |
606 | 617 | | |
607 | 618 | | |
| |||
0 commit comments