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

Improve state handling #95

Merged
merged 5 commits into from
Jan 14, 2025
Merged

Conversation

arkadiuszbachorski
Copy link
Collaborator

Improve state handling

♻️ Current situation & Problem

Errors, loading, empty should be surfaced.

📚 Documentation

⚠️ Do not merge this until StanfordSpezi/spezi-web-design-system#25 is merged and published.

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

arkadiuszbachorski added a commit to StanfordSpezi/spezi-web-design-system that referenced this pull request Jan 6, 2025
# Improve state surfacing support

## ♻️ Current situation & Problem
Design system needs to establish a consistent and easy way to support
operations states: loading, error, empty, success.

## ⚙️ Release Notes 
* Add Badge component
* Add ErrorState component
* Add Spinner component
* Add StateContainer component
* Add FormError component
* Add Async component
* Surface states on SignInForm
* Add dev utils
* Add query utils
* Migrate DataTable to use Async component and simplify it's
implementation

StanfordBDHG/ENGAGE-HF-Web-Frontend#95 uses all
the introduced elements.


## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).

---------

Co-authored-by: Nikolai Madlener <[email protected]>
@arkadiuszbachorski arkadiuszbachorski force-pushed the arek/improve-error-surfacing branch from 8716bc4 to 8e617bd Compare January 14, 2025 07:23
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 163 lines in your changes missing coverage. Please review.

Project coverage is 0.89%. Comparing base (fcff560) to head (d08c897).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
routes/~_dashboard/UpcomingAppointmentsCard.tsx 0.00% 34 Missing ⚠️
routes/~_dashboard.tsx 0.00% 15 Missing ⚠️
utils/useNavigateOrOpen/useNavigateOrOpen.ts 0.00% 14 Missing and 1 partial ⚠️
modules/notifications/NotificationsTable/index.tsx 0.00% 10 Missing ⚠️
routes/~_dashboard/YourPatientsCard.tsx 0.00% 10 Missing ⚠️
routes/~_dashboard/~notifications/~index.tsx 0.00% 9 Missing ⚠️
routes/~_dashboard/MenuLinks.tsx 0.00% 8 Missing ⚠️
routes/~_dashboard/NotificationsCard.tsx 0.00% 8 Missing ⚠️
routes/~_dashboard/~patients/Medications.tsx 0.00% 7 Missing ⚠️
...outes/~_dashboard/patients/$id/Notifications.tsx 0.00% 7 Missing ⚠️
... and 14 more
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##            main     #95      +/-   ##
========================================
- Coverage   0.91%   0.89%   -0.01%     
========================================
  Files         73      75       +2     
  Lines       3638    3711      +73     
  Branches      82      84       +2     
========================================
  Hits          33      33              
- Misses      3536    3607      +71     
- Partials      69      71       +2     
Files with missing lines Coverage Δ
routes/~_dashboard/patients/$id/~index.tsx 0.00% <0.00%> (ø)
routes/~_dashboard/~patients/~invite.tsx 0.00% <0.00%> (ø)
routes/~_dashboard/users/$id.tsx 0.00% <0.00%> (ø)
routes/~_dashboard/~users/~invite.tsx 0.00% <0.00%> (ø)
main.tsx 0.00% <0.00%> (ø)
utils/useNavigateOrOpen/index.ts 0.00% <0.00%> (ø)
routes/~_dashboard/~patients/PatientsTable.tsx 0.00% <0.00%> (ø)
routes/~__root.tsx 0.00% <0.00%> (ø)
routes/~_dashboard/~patients/PatientForm.tsx 0.00% <0.00%> (ø)
routes/~_dashboard/patients/$id/AllergyForm.tsx 0.00% <0.00%> (ø)
... and 14 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcff560...d08c897. Read the comment docs.

@arkadiuszbachorski arkadiuszbachorski merged commit 5f72377 into main Jan 14, 2025
10 checks passed
@arkadiuszbachorski arkadiuszbachorski deleted the arek/improve-error-surfacing branch January 14, 2025 18:13
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.

1 participant