Repository navigation
Add URL param support to calendar view (#73237) - #73762
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
a4a595a to
dc6eac4
Compare
yuseok89
left a comment
There was a problem hiding this comment.
Nice change! A unit test for the calendar URL params would be nice to have.
pierrejeambrun
left a comment
There was a problem hiding this comment.
LGTM tested and working as expected.
As requested a few tests would be nice. It's easy to regress at the moment.
Also CI seems unhappy. Restarted it a third time to see if those are transient or not might need fixing.
|
@basantjamwal Do you mind rebasing the PR, fixing the CI and adding a few tests so we can merge this. It would be a great addition. |
dc6eac4 to
0edad15
Compare
|
Hi @pierrejeambrun, I've rebased the PR and added tests for the calendar URL params. The workflows are awaiting approval, so CI hasn't run yet. Let me know if anything else is needed! |
|
Static check need fixing |
|
Looks like |
1f4d721 to
72f4ec4
Compare
|
Fixed. The |
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
closes: #73237
Description
The calendar view's granularity (daily/hourly), run-status filter (total/failed), and selected timeframe were previously stored in
localStorageonly, so the view's state was never reflected in the URL — meaning links to a specific calendar view couldn't be shared.This PR moves that state entirely to URL search params (
calendar-granularity,calendar-view-mode,calendar-date), removing thelocalStoragepersistence. This follows the approach agreed on in the issue discussion: URL params for shareable view state, keepinglocalStoragereserved for genuinely personal settings (timezone, theme), which are unaffected by this change.Changes
Calendar.tsx: replaceduseState/useLocalStoragewithuseSearchParamssearchParams.ts: addedCALENDAR_GRANULARITY,CALENDAR_VIEW_MODE,CALENDAR_DATEkeyslocalStorage.ts: removed the now-unusedCALENDAR_GRANULARITY_KEY/CALENDAR_VIEW_MODE_KEYTesting
/calendarURL with no params falls back cleanly to defaultsShared link preserves view state — opening a URL with
calendar-granularity=hourly&calendar-view-mode=failed&calendar-date=2026-07-26in a fresh incognito session immediately shows that exact view:Default view when no params are present — visiting the bare
/calendarURL falls back cleanly to Daily / Total Runs / current month:Was generative AI tooling used to co-author this PR?
Generated-by: Claude (Anthropic) following the guidelines