-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Block Directory: Try/block directory inline error msgs. #19589
Closed
StevenDufresne
wants to merge
245
commits into
WordPress:master
from
StevenDufresne:try/block-directory-inline-error-msgs
Closed
Block Directory: Try/block directory inline error msgs. #19589
StevenDufresne
wants to merge
245
commits into
WordPress:master
from
StevenDufresne:try/block-directory-inline-error-msgs
Conversation
This file contains 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
…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.
StevenDufresne
changed the title
Try/block directory inline error msgs
Block Directory: Try/block directory inline error msgs.
Jan 13, 2020
* 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/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected]
…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
StevenDufresne
requested review from
adamsilverstein,
aduth,
ajitbohra,
atimmer,
chrisvanpatten,
daniloercoli,
dmsnell,
ellatrix,
etoledom,
gziolo,
jorgefilipecosta,
karmatosed,
mapk,
mkaz,
mkevins,
mmtr,
nerrad,
oandregal,
ntwb,
pinarol,
SergioEstevao,
Soean,
swissspidy,
talldan,
TimothyBJacobs and
youknowriad
as code owners
February 3, 2020 03:32
Ah dang, this went poorly. I'm going to close and reopen. |
6 tasks
Reopened here: #20001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Feature] Block Directory
Related to the Block Directory, a repository of block plugins
Needs Design Feedback
Needs general design feedback.
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
download
the assets (which means we inject scripts into the DOM)install
the assets by calling an API rest endpoint (.... the plugin ends up in their plugins folder)download
theninstall
as a callback.download
sequence, the block is registered which closes the menu (because the way the inserter works) and then theinstall
is executed with the menu closed. Should any issues arise, the error message will appear with a bit of a delay.install
we 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
download
sequence and then installing. This PR firstinstalls
and thendownloads
.Why?
download
phase (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.install
there 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
/install
endpoint 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.js
to mimick and issue with adding assets to the DOMb. Notice the error message is showing with the proper copy.
Checklist: