Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): add local storage to filters #1113

Merged
merged 20 commits into from
Feb 7, 2025
Merged

fix(ui): add local storage to filters #1113

merged 20 commits into from
Feb 7, 2025

Conversation

andieswift
Copy link
Collaborator

@andieswift andieswift commented Feb 4, 2025

🎫 Linked Ticket

OY2-32770
OY2-32073

💬 Description / Notes

  • The dashboard displays data based on react-query
  • By clicking on the filter options in the side drawer, the url query gets updated to show the correct data
  • In order to make dashboard filtering persistent, the filtering is saved in local storage on first render if there is something saved then the URL will be updating which in term updates the frontend display showing the filters selected & the data in the table

🛠 Changes

  • changed some names in filtering logic to make more sense & added some comments
  • added local storage for how the dash is filtered
  • also made minor UI fix for 700px (just reverting some code)

📸 Screenshots / Demo

700px fix
before
Screenshot 2025-02-04 at 8 52 41 AM

after
Screenshot 2025-02-04 at 8 52 10 AM

Storage fix

Screen.Recording.2025-02-04.at.8.54.27.AM.mov

@andieswift andieswift self-assigned this Feb 4, 2025
Copy link
Contributor

github-actions bot commented Feb 4, 2025

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 92.75% (🎯 90%)
⬆️ +0.02%
4430 / 4776
🟢 Statements 92.24% (🎯 90%)
🟰 ±0%
4820 / 5225
🟢 Functions 87.62% (🎯 85%)
⬆️ +0.08%
1353 / 1544
🟢 Branches 82.25% (🎯 80%)
⬇️ -0.01%
2337 / 2841
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react-app/src/components/Layout/index.tsx 93.33%
⬆️ +0.15%
94.59%
🟰 ±0%
100%
🟰 ±0%
95.23%
⬆️ +0.11%
89, 261-262
react-app/src/components/Opensearch/main/index.tsx 93.1%
⬆️ +6.44%
90%
⬇️ -10.00%
85.71%
⬆️ +7.94%
95.45%
⬆️ +3.79%
65-68
react-app/src/components/Opensearch/main/Filtering/Chipbar/index.tsx 95.12%
🟰 ±0%
92.59%
🟰 ±0%
93.75%
🟰 ±0%
100%
🟰 ±0%
35, 81
react-app/src/components/Opensearch/main/Filtering/Drawer/hooks.ts 98.64%
🟰 ±0%
90.62%
🟰 ±0%
100%
🟰 ±0%
98.46%
🟰 ±0%
93
react-app/src/components/Opensearch/main/Filtering/Drawer/index.tsx 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
react-app/src/components/Opensearch/main/Filtering/Drawer/Filterable/DateRange.tsx 100%
🟰 ±0%
90.47%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
react-app/src/components/TimeoutModal/index.tsx 91.3%
⬆️ +0.40%
83.33%
🟰 ±0%
83.33%
🟰 ±0%
91.3%
⬆️ +0.40%
42, 48
react-app/src/features/dashboard/index.tsx 66.66%
⬆️ +1.66%
69.23%
🟰 ±0%
75%
🟰 ±0%
66.66%
⬆️ +1.66%
24-36
react-app/src/hooks/useLocalStorage.ts 86.95% 80% 100% 90.47% 18, 23, 40
react-app/src/hooks/useParams.ts 83.33%
⬆️ +2.08%
78.57%
⬆️ +3.57%
75%
🟰 ±0%
87.5%
⬆️ +1.79%
24, 30, 37, 61-63
Generated in workflow #2046 for commit a13f4b2 by the Vitest Coverage Report Action

@andieswift andieswift temporarily deployed to filter-state-kibana February 4, 2025 01:54 — with GitHub Actions Inactive
@andieswift andieswift changed the title Filter state ui(fix): add local storage to filters Feb 4, 2025
@andieswift andieswift changed the title ui(fix): add local storage to filters fix(ui): add local storage to filters Feb 4, 2025
onSelect={onSelect}
{...props}
/>
</div>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is old code that was removed I added back for this ticket: https://jiraent.cms.gov/browse/OY2-32770

Copy link
Contributor

github-actions bot commented Feb 7, 2025

🎉 This PR is included in version 1.5.0-val.126 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

5 participants