feat: Add toast (#2772)

Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Arun 2021-01-15 20:32:46 +05:30 committed by GitHub
parent 0bf6830373
commit 543c624405
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 161 additions and 3 deletions

View file

@ -74,6 +74,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -539,6 +540,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -986,6 +988,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -1761,6 +1764,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -1967,6 +1971,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -2417,6 +2422,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -2664,6 +2670,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -2828,6 +2835,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -3299,6 +3307,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -3607,6 +3616,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -3810,6 +3820,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -4049,6 +4060,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -4299,6 +4311,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -4699,6 +4712,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -4969,6 +4983,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -5293,6 +5308,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -5476,6 +5492,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -5637,6 +5654,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -6094,6 +6112,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -6402,6 +6421,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -8438,6 +8458,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -8798,6 +8819,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -9048,6 +9070,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -9299,6 +9322,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -9606,6 +9630,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -9767,6 +9792,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -9928,6 +9954,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -10089,6 +10116,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -10280,6 +10308,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -10471,6 +10500,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -10662,6 +10692,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -10853,6 +10884,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -11014,6 +11046,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -11175,6 +11208,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -11366,6 +11400,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -11527,6 +11562,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -11729,6 +11765,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -12435,6 +12472,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -12681,6 +12719,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -12778,6 +12817,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -12877,6 +12917,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -13038,6 +13079,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -13343,6 +13385,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -13648,6 +13691,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": "Copied styles.",
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -13744,7 +13788,7 @@ Object {
exports[`regression tests selecting 'Copy styles' in context menu copies styles: [end of test] number of elements 1`] = `1`;
exports[`regression tests selecting 'Copy styles' in context menu copies styles: [end of test] number of renders 1`] = `6`;
exports[`regression tests selecting 'Copy styles' in context menu copies styles: [end of test] number of renders 1`] = `7`;
exports[`regression tests selecting 'Delete' in context menu deletes element: [end of test] appState 1`] = `
Object {
@ -13807,6 +13851,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -14002,6 +14047,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -14254,6 +14300,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -14569,6 +14616,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": "Copied styles.",
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -15340,7 +15388,7 @@ Object {
exports[`regression tests selecting 'Paste styles' in context menu pastes styles: [end of test] number of elements 1`] = `2`;
exports[`regression tests selecting 'Paste styles' in context menu pastes styles: [end of test] number of renders 1`] = `21`;
exports[`regression tests selecting 'Paste styles' in context menu pastes styles: [end of test] number of renders 1`] = `22`;
exports[`regression tests selecting 'Send backward' in context menu sends element backward: [end of test] appState 1`] = `
Object {
@ -15405,6 +15453,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -15710,6 +15759,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -16019,6 +16069,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -16394,6 +16445,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -16564,6 +16616,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -16876,6 +16929,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -17115,6 +17169,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -17369,6 +17424,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -17683,6 +17739,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -17782,6 +17839,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -17954,6 +18012,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -18759,6 +18818,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -18860,6 +18920,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -19635,6 +19696,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -20035,6 +20097,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -20281,6 +20344,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -20380,6 +20444,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -20873,6 +20938,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,
@ -20970,6 +21036,7 @@ Object {
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
"toastMessage": null,
"viewBackgroundColor": "#ffffff",
"width": 1024,
"zenModeEnabled": false,