-
Notifications
You must be signed in to change notification settings - Fork 427
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
[components] Add new snackbars #1426
Conversation
vicmeow
commented
Aug 2, 2019
- Add new snackbar design and functionality for better feedback on user actions
- Makes queuing of snackbars in the studio possible (current max stack of 3)
I'd really love to dive into and review this, but unsure how I can find the time to do it properly. Will by Monday work, or do you folks want it out today? |
@thomax Not expecting anything more for this to be done today, so Monday works! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome! 🥇
Some minor comments
return activeSnacks.map((snack, index) => { | ||
const {view: viewOffset, snackbar: snackbarOffset} = {view: 10, snackbar: 12} | ||
let offset = viewOffset | ||
while (activeSnacks[index - 1]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm always afraid of while-loops, but I guess that's just my superstition :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, what an impressive amount of work! Ship it!
I'd like to talk to you about extending/changing the snackbar? |
Done :) |
* [snackbar] add new snackbar * [snackbar] put default snackbar back and create provider part * [snackbar] fix old and new parts * [snackbar] update provider part path * [snackbar] add height handler for stack offsets * [snackbar] add action handler * [snackbar] improve naming * [snackbar] add children as props * [snackbar] add context * [snackbar] update styles * [snackbar] make snackbar accessible * [snackbar] linting * [snackbar] add default icons to snacks * [snackbar] refactor provider and item * [snackbar] update DefaultSnackbar.js + its instances * [snackbar] fix persist status * [components] Queue snackbar story * [components] improve var naming * [components] flatten snackbar props * [components] refactor, and improve a11y * [components] refactor and fix transitions * [components] add snackbar stories * [components] refactor props, improve readability * [components] refactor hide and action behaviours * [components] improve snackbar on smaller screens * [components] clear timeouts on unmount * [components] fix css class names and id generator * [components] fix possible message types * [components] dismiss snack on willUnmount * [components] remove danger state * [components] fix default icons * [components] fix tabindex and outline focus * [components] fix icon and content alignment * [components] update storybook * [components] fix close icon color inheritance * [components] fix snackbar styles and sizes * [components] fix with and w/o icon spacing * [components] fix tabindex on snack item * [components] remove transitionDuration as prop * [components] remove another transitionDuration * [components] update with discussed changes * [components] update text and icon alignment * [components] add title and subtitle * [components] fix margins and alignments * [components] update story * [components] simplify story * [components] fix action and close bleed * [components] float action and close buttons * [components] Last changes made together with Victoria * [components] fix action title bug * [components] updates according to kris' review