-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Extract the pattern overrides toolbar indicator from the block-editor
package
#62514
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved to |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ import { unlock } from '../lock-unlock'; | |
const { | ||
PatternOverridesControls, | ||
ResetOverridesControl, | ||
PatternOverridesBlockControls, | ||
PATTERN_TYPES, | ||
PARTIAL_SYNCING_SUPPORTED_BLOCKS, | ||
PATTERN_SYNC_TYPES, | ||
|
@@ -43,6 +44,7 @@ const withPatternOverrideControls = createHigherOrderComponent( | |
{ props.isSelected && isSupportedBlock && ( | ||
<ControlsWithStoreSubscription { ...props } /> | ||
) } | ||
{ isSupportedBlock && <PatternOverridesBlockControls /> } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a shame there's no way to add a condition like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably add a comment there to avoid accidental regression. |
||
</> | ||
); | ||
} | ||
|
Unchanged files with check annotations Beta
.getByRole( 'toolbar', { name: 'Document tools' } ) | ||
.getByRole( 'button', { name: 'Undo' } ) | ||
.click(); | ||
await expect( headingBlock ).toHaveText( 'Heading (edited)' ); | ||
Check failure on line 607 in test/e2e/specs/editor/various/pattern-overrides.spec.js GitHub Actions / Playwright - 4[chromium] › editor/various/pattern-overrides.spec.js:528:2 › Pattern Overrides › resets overrides after clicking the reset button
Check failure on line 607 in test/e2e/specs/editor/various/pattern-overrides.spec.js GitHub Actions / Playwright - 4[chromium] › editor/various/pattern-overrides.spec.js:528:2 › Pattern Overrides › resets overrides after clicking the reset button
Check failure on line 607 in test/e2e/specs/editor/various/pattern-overrides.spec.js GitHub Actions / Playwright - 4[chromium] › editor/various/pattern-overrides.spec.js:528:2 › Pattern Overrides › resets overrides after clicking the reset button
|
||
// Reset the individual heading block. | ||
await editor.selectBlocks( headingBlock ); | ||
// Undo/Redo should work | ||
await undoButton.click(); | ||
await expect( paragraphBlock ).toHaveText( 'Paragraph*' ); | ||
Check failure on line 678 in test/e2e/specs/editor/various/pattern-overrides.spec.js GitHub Actions / Playwright - 4[chromium] › editor/various/pattern-overrides.spec.js:621:2 › Pattern Overrides › resets overrides immediately should not break undo/redo
Check failure on line 678 in test/e2e/specs/editor/various/pattern-overrides.spec.js GitHub Actions / Playwright - 4[chromium] › editor/various/pattern-overrides.spec.js:621:2 › Pattern Overrides › resets overrides immediately should not break undo/redo
Check failure on line 678 in test/e2e/specs/editor/various/pattern-overrides.spec.js GitHub Actions / Playwright - 4[chromium] › editor/various/pattern-overrides.spec.js:621:2 › Pattern Overrides › resets overrides immediately should not break undo/redo
|
||
await redoButton.click(); | ||
await expect( paragraphBlock ).toHaveText( 'Paragraph' ); | ||
} ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to
packages/patterns/src/components/pattern-overrides-block-controls.js
.