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

[components] Add new snackbars #1426

Merged
merged 51 commits into from
Aug 12, 2019
Merged

[components] Add new snackbars #1426

merged 51 commits into from
Aug 12, 2019

Conversation

vicmeow
Copy link
Contributor

@vicmeow 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)

@thomax
Copy link
Contributor

thomax commented Aug 2, 2019

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?

@vicmeow
Copy link
Contributor Author

vicmeow commented Aug 2, 2019

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!

Copy link
Contributor

@kristofferjs kristofferjs left a 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

packages/@sanity/desk-tool/src/pane/Editor/Editor.js Outdated Show resolved Hide resolved
packages/@sanity/components/src/snackbar/story.js Outdated Show resolved Hide resolved
packages/@sanity/components/src/snackbar/story.js Outdated Show resolved Hide resolved
packages/@sanity/components/src/snackbar/SnackbarItem.js Outdated Show resolved Hide resolved
packages/@sanity/components/sanity.json Outdated Show resolved Hide resolved
return activeSnacks.map((snack, index) => {
const {view: viewOffset, snackbar: snackbarOffset} = {view: 10, snackbar: 12}
let offset = viewOffset
while (activeSnacks[index - 1]) {
Copy link
Contributor

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 :)

Copy link
Contributor

@thomax thomax left a 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!

@thomax
Copy link
Contributor

thomax commented Aug 7, 2019

I'd like to talk to you about extending/changing the snackbar?

@thomax
Copy link
Contributor

thomax commented Aug 7, 2019

I'd like to talk to you about extending/changing the snackbar?

Done :)

@vicmeow vicmeow merged commit 8464b68 into next Aug 12, 2019
bjoerge pushed a commit that referenced this pull request Aug 13, 2019
* [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
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.

3 participants