-
Notifications
You must be signed in to change notification settings - Fork 54
P2 786 only render ok when block is valid #1146
P2 786 only render ok when block is valid #1146
Conversation
If not just don't show that it is okay
…-786-only-render-ok-when-block-is-valid # Conflicts: # packages/schema-blocks/src/functions/validators/index.ts
…-786-only-render-ok-when-block-is-valid # Conflicts: # packages/schema-blocks/src/functions/presenters/BlockSuggestionsPresenter.tsx # packages/schema-blocks/tests/functions/presenters/BlockSuggestions.test.ts
Acceptance: 🚧
With regard to the Location block, I think you need the code from #1142 / P2-807.
@andizer Did you test your code again after pushing the latest changes? |
…-786-only-render-ok-when-block-is-valid
…-786-only-render-ok-when-block-is-valid # Conflicts: # packages/schema-blocks/src/functions/presenters/BlockSuggestionsPresenter.tsx # packages/schema-blocks/tests/functions/presenters/__snapshots__/BlockSuggestions.test.ts.snap
Might need some additional work
…n is a bit over-eager.
# Conflicts: # packages/schema-blocks/src/functions/presenters/BlockSuggestionsPresenter.tsx # packages/schema-blocks/src/functions/presenters/SidebarWarningPresenter.ts # packages/schema-blocks/tests/functions/presenters/SidebarWarningPresenter.test.ts
(cherry picked from commit 4170aba)
…ender-ok-when-block-is-valid
…ender-ok-when-block-is-valid # Conflicts: # packages/schema-blocks/package.json # yarn.lock
…-ok-when-block-is-valid
closed existing comments as this PR needs a thorough re-review. |
packages/schema-blocks/src/functions/presenters/BlockSuggestionsPresenter.tsx
Outdated
Show resolved
Hide resolved
packages/schema-blocks/src/functions/presenters/BlockSuggestionsPresenter.tsx
Show resolved
Hide resolved
packages/schema-blocks/src/functions/presenters/BlockSuggestionsPresenter.tsx
Outdated
Show resolved
Hide resolved
packages/schema-blocks/src/functions/presenters/BlockSuggestionsPresenter.tsx
Outdated
Show resolved
Hide resolved
packages/schema-blocks/src/instructions/blocks/abstract/RichTextBase.ts
Outdated
Show resolved
Hide resolved
packages/schema-blocks/src/core/validation/BlockValidationResult.ts
Outdated
Show resolved
Hide resolved
packages/schema-blocks/tests/functions/presenters/SidebarWarningPresenter.test.ts
Outdated
Show resolved
Hide resolved
…nsPresenter.tsx Co-authored-by: Hans-Christiaan Braun <hans-christiaan@yoast.com>
…nsPresenter.tsx Co-authored-by: Hans-Christiaan Braun <hans-christiaan@yoast.com>
…lt.ts Co-authored-by: Hans-Christiaan Braun <hans-christiaan@yoast.com>
we have not yet fixed all of these; we'd have to add a validation method ( or use the |
…ast SEO behavior (onblur of richtext).
CR: 👍
|
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
/src/core/blocks
imports / exports.src/core/validation
exports.BlockSuggestionsPresenter.tsx
so the presenter only presents.PureBlockSuggestionsPresenter
to update the suggestions as they change.getValidationResultForClientId
,getInnerblockValidations
recursivelyfind
to navigate the tree of BlockValidationResults using a predicate.Test instructions
This PR can be tested by following these steps:
good job
congratulation is shown.Impact check
*
UI changes
Quality assurance
Fixes #