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

Replace uses of alert with SnackBar(toast) #1928

Merged
merged 9 commits into from
Feb 28, 2023

Conversation

fuencui
Copy link
Contributor

@fuencui fuencui commented Feb 24, 2023

Implement a SnackBar component to replace the native JS alert for DataEntryTable, ExportButton, UserSettings, ReviewEntriesTable.


This change is Reviewable

@fuencui fuencui added the maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. label Feb 24, 2023
@fuencui fuencui self-assigned this Feb 24, 2023
Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

This looks good. I wonder if we can reduce the code duplication. I think we have some files which contain sharable components or methods where the handleToastUpdate can go.

Reviewed 5 of 6 files at r1, all commit messages.
Reviewable status: 5 of 6 files reviewed, all discussions resolved (waiting on @fuencui)

@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2023

Codecov Report

Base: 50.37% // Head: 50.38% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (dab29da) compared to base (d0361c1).
Patch coverage: 12.50% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1928   +/-   ##
=======================================
  Coverage   50.37%   50.38%           
=======================================
  Files         286      286           
  Lines        8887     8888    +1     
  Branches      651      651           
=======================================
+ Hits         4477     4478    +1     
  Misses       3882     3882           
  Partials      528      528           
Flag Coverage Δ
backend 76.34% <ø> (ø)
frontend 32.02% <12.50%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/components/ProjectExport/ExportButton.tsx 0.00% <0.00%> (ø)
src/components/UserSettings/UserSettings.tsx 0.00% <ø> (ø)
src/index.tsx 0.00% <ø> (ø)
...ries/ReviewEntriesComponent/ReviewEntriesTable.tsx 64.28% <16.66%> (+2.74%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 9 files at r2, 5 of 5 files at r3, 1 of 1 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @fuencui)


src/goals/ReviewEntries/ReviewEntriesComponent/ReviewEntriesTable.tsx line 44 at r5 (raw file):

  return (
    <React.Fragment>

Do we still need this Fragment now that you are using notistack?

Code quote:

    <React.Fragment>

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @fuencui)

@fuencui fuencui enabled auto-merge (squash) February 28, 2023 23:19
@fuencui fuencui enabled auto-merge (squash) February 28, 2023 23:27
Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 7 files at r7, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @fuencui)

@fuencui fuencui merged commit a43661c into master Feb 28, 2023
@fuencui fuencui deleted the replace-uses-of-alert-with-toast branch February 28, 2023 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants