-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
feat: Add toast #2772
feat: Add toast #2772
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/excalidraw/excalidraw/h67b267zp |
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 think it would be better to show it in the bottom middle of the screen.. and instead of sliding it.. making it appear and disappear (opacity?). It should also stay awake if user has a mouse over it.. once the mouse is out or not there at all.. should go away.
I'll do it :) Are the colors and size fine? |
we can tweak as we go. |
Nice one with the colors! |
What about adding that when copying styles as well? |
But in general this is ready for merge. |
I wouldn't display it during regular copy. You don't really need a confirmation for such a common action. |
Not a regular copy of course.. |
I need to read more careful 😄 |
I'll also show on pasting styles? |
No need on paste IMO — most of the time it should be obvious from the action itself. |
I've pushed a change that makes the Toast render conditionally, simplified the timer logic and handlers, and made the Toast reset the timer on |
And finally, made exporting empty scene throw instead of alerting. This way the Toast isn't shown in this case. Throwing is also more correct. With this, we're ready to merge. |
Much cleaner! |
* 'master' of github.com:excalidraw/excalidraw: (37 commits) feat: Add toast (#2772) docs: Update readme with documentation (#2788) fix: allow text-selecting in dialogs & reset cursor (#2783) chore: Update translations from Crowdin (#2742) fix: broken Individuals link (#2782) refactor: Converting span to kbd tag (#2774) fix: don't render due to zoom after unmount (#2779) fix: Track the chart type correctly (#2773) chore(deps-dev): bump terser-webpack-plugin in /src/packages/excalidraw (#2750) chore(deps-dev): bump webpack in /src/packages/utils (#2768) fix: delay version logging & prevent duplicates (#2770) chore(deps-dev): bump webpack in /src/packages/excalidraw (#2769) chore(deps-dev): bump ts-loader in /src/packages/excalidraw (#2749) chore(deps-dev): bump ts-loader in /src/packages/utils (#2753) chore(deps): bump nanoid from 2.1.11 to 3.1.20 (#2581) feat: Track current version (#2731) chore(actions): Use cancel workflow action (#2763) chore(deps): bump @testing-library/react from 11.2.2 to 11.2.3 (#2755) chore(deps-dev): bump firebase-tools from 9.1.0 to 9.1.2 (#2761) chore(deps-dev): bump eslint-plugin-prettier from 3.3.0 to 3.3.1 (#2754) ...
A simple toast component that can display one toast at a time.
Fixes #2664