Skip to content

feat(date-time-picker): expose v-model:menu-open#522

Merged
kelsos merged 1 commit intorotki:mainfrom
kelsos:feat/datetimepicker-menu-open
Apr 28, 2026
Merged

feat(date-time-picker): expose v-model:menu-open#522
kelsos merged 1 commit intorotki:mainfrom
kelsos:feat/datetimepicker-menu-open

Conversation

@kelsos
Copy link
Copy Markdown
Member

@kelsos kelsos commented Apr 28, 2026

Summary

  • Adds v-model:menu-open on RuiDateTimePicker that mirrors isOpen || calendarMenuOpen — true whenever any of the picker's teleported overlays (its own menu or the calendar's month/year sub-menu) is open.
  • Lets parent RuiMenu/RuiDialog wrappers bind :persistent only for that window instead of forcing it on always.
  • Storybook story InsideParentMenu and an example-app fixture demonstrate the pattern.

Closes #516. Unblocks rotki/rotki#12091 (CalendarDateNavigator Go-to-date dropdown can drop its manual :persistent + ESC workaround).

Test plan

  • Unit: RuiDateTimePicker.spec.ts covers picker-menu open/close emit and "stays open while sub-menu opens after picker is open".
  • E2E: apps/example/e2e/datetimepicker.spec.ts covers (1) parent stays open while only picker menu open, (2) parent stays open while sub-menu open, (3) parent closes when no picker overlay is open.
  • pnpm run typecheck / pnpm run lint / pnpm run test:run (1072 pass) / pnpm run test:e2e (3 new + existing pass) / pnpm run build:prod green.
  • web-types.json exposes menu-open + update:menuOpen.

Follow-up

A lu-calendar-days runtime warning shows up in the example app because the icon plugin auto-detects only consumer source. The picker stack's icons should be registered library-side (build-time emit + plugin baseline) so every consumer gets them for free. Will be a separate PR.

Lets parent overlays read whether any teleported sub-overlay (the picker
menu itself or its calendar month/year sub-menu) is open, so they can
bind :persistent during that window instead of forcing it on always.

Closes rotki#516.
@kelsos kelsos requested a review from a team as a code owner April 28, 2026 13:00
@kelsos kelsos merged commit 7bc9bb8 into rotki:main Apr 28, 2026
5 checks passed
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.89%. Comparing base (607759e) to head (7bc9bb8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #522      +/-   ##
==========================================
+ Coverage   84.88%   84.89%   +0.01%     
==========================================
  Files         143      143              
  Lines        5213     5217       +4     
  Branches     1553     1554       +1     
==========================================
+ Hits         4425     4429       +4     
  Misses        788      788              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RuiDateTimePicker: expose calendar/time sub-menu open state for parent click-outside handling

2 participants