Repository navigation
Undo snackbar - #222
Merged
Merged
Undo snackbar#222
Conversation
psvenk
requested changes
Dec 20, 2020
Collaborator
|
I think this is a great canadate for using webcomponants to compartementalize the compleity of this addition |
Member
|
I wonder if we could make it more intuitive to undo deleting an assignment by not actually deleting the assignment's row from the table — we could grey out the row, exclude it from calculations, and replace the "x" button with a button to restore the assignment. The snackbar code could still be useful otherwise. @andOrlando Your thoughts? |
psvenk
requested changes
Dec 21, 2020
psvenk
previously requested changes
Dec 21, 2020
notrodes
self-requested a review
December 22, 2020 22:21
Collaborator
|
Add removed assignments to a stack and then they can be returned with undo button (or Cmd+z) |
andOrlando
force-pushed
the
undo-snackbar
branch
from
January 6, 2021 19:00
c6e1676 to
45de584
Compare
andOrlando
dismissed stale reviews from notrodes and psvenk
January 12, 2021 21:53
I put it in a different file
andOrlando
force-pushed
the
undo-snackbar
branch
from
January 20, 2021 23:51
d439927 to
4147c19
Compare
andOrlando
force-pushed
the
undo-snackbar
branch
2 times, most recently
from
March 17, 2021 13:50
7546937 to
610e377
Compare
psvenk
requested changes
Mar 17, 2021
Member
There was a problem hiding this comment.
Looks good overall. A few comments:
- Deleting an assignment or clicking "undo" in the snackbar scrolls up to the top of the page
- Clicking anywhere on the snackbar other than the "undo" button dismisses the snackbar permanently
- Make Ctrl+Z more discoverable and make it use Command+Z on macOS
And some style nitpicks:
- There are many overlong lines that should be broken up so that they are (for the most part) less than 80 characters long
- I know that some people question the value of having a rigid limit, but some of these lines do many things at once and are more difficult to read, especially for people who use 80-column windows for editing code (we still exist!)
- Comments should have a space between the comment delimiter and the text (
// Comment) - Some statements are missing semicolons
psvenk
approved these changes
Mar 24, 2021
adds the snackbar class
- adds colors for undo snackbar (to be edited) - improves resize logic for snackbar at low screensizes - When assignment is deleted, replaces item with a placeholder that's ignored by tabulator which gets deleted if the snackbar times out - adds a bunch of semicolons - better document snackbar options - adds timeout and funciton on timeout - improves instant .show() logic - improves oncick things - fixes lots of other bugs
- makes placeholder deletion actually delete from the list - also adds some semicolons
adds some semicolons, deletes test function
Co-authored-by: psvenk <[email protected]>
Co-authored-by: psvenk <[email protected]>
- fixes bug where the timeout wouldn't run the correct function on timeout - fixes bug where the timeout would start when the snackbar is made - adds timeout modes for what to do when the timer finishes
- gives new assignments sequential IDs - filters the assignments when determing whether to show the info icon or not - changes right padding for button
I don't know how to get rid of this suggestion otherwise so I'll cave Co-authored-by: psvenk <[email protected]>
-fixes a random tooltips bug for some reason -changes the ::after to ::before for no reason -adds an undo-registry to keep track of all the undos -adds states to make it easier to ascertain the status of a given snackbar -slightly improves a couple comments
I left them in for debugging...
Rejoice! After a whole month or something I finally fixed that one bug! (changed method of keeping track of snackbar stuff)
I was using unshift instead of shift which wasn't great, the new order feels much more intuitive
Keep lines to <=80 characters, simplify some code, fix indentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #171
Adds dynamic snackbar support and an undo snackbar that pops up whenever you delete an assignment
snackbars being basically notification messages