OU-1323: Refactor dashboards state to prevent desync#912
OU-1323: Refactor dashboards state to prevent desync#912PeterYurkovich wants to merge 2 commits intoopenshift:mainfrom
Conversation
|
@PeterYurkovich: This pull request references OU-1323 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: PeterYurkovich The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughDashboard timing/refresh state moved from Redux to typed numeric URL query parameters; legacy dashboard variables re-scoped per-dashboard under Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant UI as Legacy UI (Graph / Dropdown / Modal)
participant URL as Browser URL (query params)
participant Store as Redux Store
participant QB as QueryBrowser/Charts
User->>UI: interact (zoom / set timespan / submit modal / change dropdown)
UI->>URL: write numeric query params (EndTime, TimeRange, RefreshInterval)
UI--xStore: stop dispatching timing/poll actions
URL-->>QB: QueryBrowser/Charts read query params
QB-->>UI: render charts with fixedEndTime / timespan / pollInterval
UI->>Store: variable-related actions include dashboardName (patch/load)
Store-->>UI: per-dashboard variables from dashboards.legacy[dashboardName]
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
…iables specific to their dashboard
|
/label qe-approved |
|
@PeterYurkovich: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
This PR looks to refactor the legacy dashboards state to prevent state desync through 2 primary methods:
It also introduces the usage of the withDefault from the
use-query-paramspackage to simplify initial loading stateSummary by CodeRabbit