feat(window): enhance minimize/restore behavior to preserve pre-minimize state and add cross-state transition tests#243
Conversation
…ize state and add cross-state transition tests
|
@claude can you review this? |
|
Claude finished @AllTerrainDeveloper's task in 3m 8s —— View job PR Review
|
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
…ion during fullscreen and maximize actions
|
@claude second round? |
|
Claude finished @AllTerrainDeveloper's task in 3m 27s —— View job PR Review — Round 2Tasks:
All five issues from round 1 are resolved. Here's the scorecard plus two new observations from the fix commit. Round 1 Issues — Status1. 2. Geometry overwrite in 3. Double 4. TypeScript 5. Hook ordering inconsistency ✅ Fixed — both New ObservationsA.
A targeted fix: call if ( wasMinimized ) {
this.state = this._stateBeforeMinimize ?? 'normal';
this._stateBeforeMinimize = null;
if ( this.state === 'fullscreen' ) {
updateFullscreenBodyClass();
this.updateFocusButtonState();
}
}B. When a maximized-then-minimized window is restored, SummaryThe architecture is solid — |
…mize, ensuring fullscreen and focus button states are correctly updated
|
@claude one more? |
|
Claude finished @AllTerrainDeveloper's task in 4m 51s —— View job PR Review — Round 3Tasks:
Both Round 2 observations are resolved. One minor cleanup item worth noting, and two pre-existing behaviors that are worth documenting context on but neither is introduced by this PR. Round 2 Observations — StatusA. B. Undocumented One cleanup item (non-blocking)Redundant first assertion in Lines 232–235 of the test file: expect( activeStateClasses( handle.win.element ) ).toEqual( [
'desktop-mode-window--fullscreen',
'desktop-mode-window--minimized',
].filter( ( c ) => handle.win.element.classList.contains( c ) ) );
Pre-existing behaviors (context, not blocking)
Neither arrange function strips Minimized fullscreen windows hold the body class
SummaryThe PR is in good shape. Round 2's two observations are fully addressed — the UI-state refresh is correctly guarded, well-commented, and has non-vacuous tests. The hook-ordering contract is now explicit in both docs and tests. The only actionable item before merge is the redundant assertion cleanup, which is cosmetic. Architecture is clean throughout. |

Uh oh!
There was an error while loading. Please reload this page.