mirror of
https://github.com/google/blockly.git
synced 2025-12-16 06:10:12 +01:00
feat: Add support for displaying toast-style notifications. (#8896)
* feat: Allow resetting alert/prompt/confirm to defaults. * chore: Add unit tests for Blockly.dialog. * fix: Removed TEST_ONLY hack from Blockly.dialog. * feat: Add a default toast notification implementation. * feat: Add support for toasts to Blockly.dialog. * chore: Add tests for default toast implementation. * chore: Fix docstring. * refactor: Use default arguments for dialog functions. * refactor: Add 'close' to the list of messages. * chore: Add new message in several other places. * chore: clarify docstrings. * feat: Make toast assertiveness configurable.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
"DELETE_X_BLOCKS": "Delete %1 Blocks",
|
||||
"DELETE_ALL_BLOCKS": "Delete all %1 blocks?",
|
||||
"CLEAN_UP": "Clean up Blocks",
|
||||
"CLOSE": "Close",
|
||||
"COLLAPSE_BLOCK": "Collapse Block",
|
||||
"COLLAPSE_ALL": "Collapse Blocks",
|
||||
"EXPAND_BLOCK": "Expand Block",
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
"DELETE_X_BLOCKS": "context menu - Permanently delete the %1 selected blocks.\n\nParameters:\n* %1 - an integer greater than 1.",
|
||||
"DELETE_ALL_BLOCKS": "confirmation prompt - Question the user if they really wanted to permanently delete all %1 blocks.\n\nParameters:\n* %1 - an integer greater than 1.",
|
||||
"CLEAN_UP": "context menu - Reposition all the blocks so that they form a neat line.",
|
||||
"CLOSE": "toast notification - Accessibility label for close button.",
|
||||
"COLLAPSE_BLOCK": "context menu - Make the appearance of the selected block smaller by hiding some information about it.",
|
||||
"COLLAPSE_ALL": "context menu - Make the appearance of all blocks smaller by hiding some information about it. Use the same terminology as in the previous message.",
|
||||
"EXPAND_BLOCK": "context menu - Restore the appearance of the selected block by showing information about it that was hidden (collapsed) earlier.",
|
||||
|
||||
@@ -103,6 +103,9 @@ Blockly.Msg.DELETE_ALL_BLOCKS = 'Delete all %1 blocks?';
|
||||
/// context menu - Reposition all the blocks so that they form a neat line.
|
||||
Blockly.Msg.CLEAN_UP = 'Clean up Blocks';
|
||||
/** @type {string} */
|
||||
/// toast notification - Accessibility label for close button.
|
||||
Blockly.Msg.CLOSE = 'Close';
|
||||
/** @type {string} */
|
||||
/// context menu - Make the appearance of the selected block smaller by hiding some information about it.
|
||||
Blockly.Msg.COLLAPSE_BLOCK = 'Collapse Block';
|
||||
/** @type {string} */
|
||||
|
||||
Reference in New Issue
Block a user