Block Directory: Try/block directory inline error msgs.#19589
Closed
StevenDufresne wants to merge 245 commits intoWordPress:masterfrom
Closed
Block Directory: Try/block directory inline error msgs.#19589StevenDufresne wants to merge 245 commits intoWordPress:masterfrom
StevenDufresne wants to merge 245 commits intoWordPress:masterfrom
Conversation
…ding state when the installing is happening and make the 'Add block' button show a loading state while installing
…ly retry call from the notice component.
…l test since its not used and therefore could introduce debt.
…k. Add tests for that component.
* Declare sideEffects for build-style * fixup! Declare sideEffects for build-style * Add CHANGELOG entries
* RNMobile - Refactor of Caption component into two: BlockCaption and Caption component * RNMobile - Refactor of Caption component * RNMobile - Caption refactor passing accessibility props and adding missing accessibility label for the Video block's caption * RNMobile - Caption: Specify p tag for both platforms
* Return focus to original element * Fix list e2e tests * Fix annotation e2e tests * Fix some rich text e2e tests * Fix tests * Focus after link * Add onFocus * Corrections
* wip * Wait for block to mount * Fix some tests * Revert moving focus effects * Fix align error * Fix navigation mode * Fix capturing toolbar * Remove has-toolbar-captured * Add docs * Simplify multi selection selector * Fix alignment * Clean up * Only add block node for selected block * Simplify block DOM node state * Fix alignment tests * Clean up * Clean up * Avoid node in state
- @wordpress/a11y@2.6.0 - @wordpress/annotations@1.10.0 - @wordpress/api-fetch@3.9.0 - @wordpress/babel-plugin-import-jsx-pragma@2.4.0 - @wordpress/babel-preset-default@4.9.0 - @wordpress/base-styles@1.2.0 - @wordpress/blob@2.6.0 - @wordpress/block-directory@1.3.0 - @wordpress/block-editor@3.5.0 - @wordpress/block-library@2.12.0 - @wordpress/blocks@6.10.0 - @wordpress/components@9.0.0 - @wordpress/compose@3.10.0 - @wordpress/core-data@2.10.0 - @wordpress/data-controls@1.6.0 - @wordpress/data@4.12.0 - @wordpress/dom-ready@2.6.0 - @wordpress/dom@2.7.0 - @wordpress/e2e-test-utils@4.1.0 - @wordpress/e2e-tests@1.10.0 - @wordpress/edit-post@3.11.0 - @wordpress/edit-site@1.0.0 - @wordpress/edit-widgets@0.10.0 - @wordpress/editor@9.10.0 - @wordpress/env@0.3.0 - @wordpress/format-library@1.12.0 - @wordpress/i18n@3.8.0 - @wordpress/is-shallow-equal@1.7.0 - @wordpress/keyboard-shortcuts@0.2.0 - @wordpress/keycodes@2.8.0 - @wordpress/list-reusable-blocks@1.11.0 - @wordpress/media-utils@1.5.0 - @wordpress/notices@1.11.0 - @wordpress/nux@3.10.0 - @wordpress/plugins@2.10.0 - @wordpress/priority-queue@1.4.0 - @wordpress/rich-text@3.10.0 - @wordpress/scripts@6.2.0 - @wordpress/server-side-render@1.6.0 - @wordpress/viewport@2.11.0
…ordPress#19528) * adds no title label to links to pages or posts with no title * fixes a wrong return and an explicit comparison * undo mistaken CSS edit
* Block: reposition tabbable inserter * Fix e2e
* Block Library: Add a Post Excerpt block. * Block Library: Make Post Excerpt block editable. * E2E Tests: Add Post Excerpt block fixtures.
* Components: Add isFocusable state to Button * Make isFocusable true by default * Update styles * Remove stopImmediatePropagation call * Fix unit tests * Fix e2e tests * Make isFocusable prop experimental and false by default
* Improved style of image block placeholder during upload * Improved style of VIDEO block placeholder during upload * Removing unreachable code. * Removed redundant style props
* adds media replace flow to the cover block * adds video suppor to upload in media replace control
* Block: try merging effects * Merge multi selected effect
Contributor
Author
|
Ah dang, this went poorly. I'm going to close and reopen. |
6 tasks
Contributor
Author
|
Reopened here: #20001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is an experiment to add inline error messages to the block directory. This PR also introduces a change in execution that needs discussion.
Background Info
downloadthe assets (which means we inject scripts into the DOM)installthe assets by calling an API rest endpoint (.... the plugin ends up in their plugins folder)downloadtheninstallas a callback.downloadsequence, the block is registered which closes the menu (because the way the inserter works) and then theinstallis executed with the menu closed. Should any issues arise, the error message will appear with a bit of a delay.installwe offer them a button and allow them to remove the block.Types of changes
Changes:
Along with the obvious changes to add errors inline, this PR changes the order of execution. Instead of immediate injecting the assets in the
downloadsequence and then installing. This PR firstinstallsand thendownloads.Why?
downloadphase (the block registers and update the state). This means that if an error is throw on install, the context has already changed. We can't show anything inline, it's gone.installthere isn't much recourse to fix it. Now, or potentially in the future. This means we have a broken plugin in the document. We therefore would need to have a robust "removal" experience. By flipping it, nothing is added until everything is :100 with the server.Cons
install(subject to the network speed)Known Issues
onSelect, but it has a lower priority and depending on the state of the app, you could see a bit of a flicker. I have seen it sporadically.Screenshots
How has this been tested?
Manual Testing
Manual test were done by doing the following: ( using these block: Card, Boxer, Listicle)
Case Success
a. Notice that the block is added to the document without error
b. Notice that the plugin is not in the regular WordPress plugin folder
Case Install Error:
a. Make the
/installendpoint return an error on first callb. Notice the error message is showing with the proper copy..
a. Notice the error message is removed
b. Notice the plugin is in WordPress plugin folder
Case Download Error:
a. Add a throw statement in the download function in
action.jsto mimick and issue with adding assets to the DOMb. Notice the error message is showing with the proper copy.
Checklist: