ui: widgets animate out v2 (#37483)

* i like this better

* clean up

* debug

* fix able to click navwidgets that are closing (tested at rc 10)

* add dismiss guards

* fix keyboard so it unselects

* pairing: use dismiss

* main todo

* rm pop_widgets_to!

* reset dismiss state on show event

* debug pop animation bugs

* Revert "debug pop animation bugs"

This reverts commit 9239f2e12cf79b1f75d15d39262fdd15ff5a5200.

* revert

* cmt

* type

* clean up

* now do the todo

* treat using widgets, not idxs, as a separate clean up for later

* actually if not navwidget this is buggy

* fix

* short

* simpler
This commit is contained in:
Shane Smiskol
2026-02-28 08:00:07 -08:00
committed by GitHub
parent 9cc0d7a1c9
commit 6cbef7bc13
2 changed files with 34 additions and 16 deletions
+5 -7
View File
@@ -94,15 +94,13 @@ class MiciMainLayout(Scroller):
# FIXME: these two pops can interrupt user interacting in the settings
if self._onroad_time_delay is not None and rl.get_time() - self._onroad_time_delay >= ONROAD_DELAY:
gui_app.pop_widgets_to(self)
self._scroll_to(self._onroad_layout)
gui_app.pop_widgets_to(self, lambda: self._scroll_to(self._onroad_layout))
self._onroad_time_delay = None
# When car leaves standstill, pop nav stack and scroll to onroad
CS = ui_state.sm["carState"]
if not CS.standstill and self._prev_standstill:
gui_app.pop_widgets_to(self)
self._scroll_to(self._onroad_layout)
gui_app.pop_widgets_to(self, lambda: self._scroll_to(self._onroad_layout))
self._prev_standstill = CS.standstill
def _on_interactive_timeout(self):
@@ -113,10 +111,10 @@ class MiciMainLayout(Scroller):
if ui_state.started:
# Don't pop if at standstill
if not ui_state.sm["carState"].standstill:
gui_app.pop_widgets_to(self)
self._scroll_to(self._onroad_layout)
gui_app.pop_widgets_to(self, lambda: self._scroll_to(self._onroad_layout))
else:
gui_app.pop_widgets_to(self)
# Screen turns off on timeout offroad, so pop immediately without animation
gui_app.pop_widgets_to(self, instant=True)
self._scroll_to(self._home_layout)
def _on_bookmark_clicked(self):