Repository navigation
Item menu: Go to Movie keeps the card's focus while the menu closes - #1473
Conversation
Picking Go to Movie or Go to Show in an item's hold menu ran the page under the menu to its top as the menu closed, and BACK from the opened page came back to the top instead of the card. The menu parks its own Dismiss and the app then parks the Push, both captured while the menu's row held focus. The Dismiss commits first, so by the Push the closing menu no longer owns input, and Navigation::request wrote the row's key onto the host page's return state. The host's Enter(Restored) then missed and seated its top group. A page op's return state now lands on the page only when it was captured there: a live surface keeps its own, and one captured on a surface that has closed since is dropped, so the page keeps its own spot. Signed-off-by: Tiago Pereira <1698241+tiper@users.noreply.github.com>
|
@claude review |
|
Claude finished @GLinnik21's task in 1m 42s —— View job lgtm, one non-blocking inline note on checked:
|
| // own, and one captured on a surface that has closed since is dropped. | ||
| let ret = match self.modals.input_owner() { | ||
| Some(InputOwner::Entry(owner)) => { | ||
| if let Some(e) = self.modals.entry_mut(owner) { e.ret = ret; } |
There was a problem hiding this comment.
same hole one level up: with two surfaces stacked, a Dismiss of the upper one parked ahead of a page op leaves the lower surface as input owner, and this still writes the closed surface's row onto it. i didn't find a product path that stacks a menu on a panel and pushes from it, so not blocking, but the guard on line 258 could cover both arms: pick the target entry first (owning surface, else top page) and take ret only when ret.focus is None or names that entry.
Hold OK on a movie or show card (Home or the Library grid) and pick Go to Movie or Go to Show: the page under the menu runs to its top while the menu closes, and BACK from the opened page lands on the top of the page instead of the card. A plain OK on the same card is fine.
The menu parks its own
Dismiss, then the app parks thePush, both captured while the menu's row held focus. Since #1392 / #1433 theDismisscommits first, so by thePushthe closing menu no longer owns input, andNavigation::requestwrote the row's key onto the host page's return state. The host'sEnter(Restored)then missed and seated its top group.A page op's return state now lands on the page only when it was captured there: a live surface keeps its own (as before), and one captured on a surface that has closed since is dropped, so the page keeps its own spot.
Test:
a_push_parked_behind_a_surfaces_dismiss_keeps_the_hosts_return_spotfails onmain(the host'sret.focusholds the menu row) and passes with the change.plx_uilib tests pass (1750).Checked in the macOS simulator (Home Go to Movie, Home Go to Show, Library Go to Movie: focus stays on the card, BACK returns to it; hold then BACK, and a plain OK, unchanged) and on an LG C1 (webOS 6) with a stable build.