Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
83ea11f
Footnotes: inscrease selector specificity for anchor (#52179)
ellatrix Jun 30, 2023
2e8830c
Patterns: Include template parts for custom areas in Uncategorized ca…
aaronrobertshaw Jul 3, 2023
db15884
Fix custom patterns console error (#51947)
glendaviesnz Jun 28, 2023
6aaf269
i18n: Add context to the word "Filters" (#52198)
t-hamano Jul 1, 2023
5b1f580
Update home template icon (#52075)
jameskoster Jun 28, 2023
14c54c5
Centralise all permissions lookup in Link UI and enable (#52166)
getdave Jun 30, 2023
0528766
BlockRemovalWarningModal: Fix incorrect '_n' usage (#52164)
Mamaduka Jun 30, 2023
b8229fe
Fix fetching Nav fallback ID flushing Navigation entity cache (#52069)
getdave Jun 29, 2023
ac9cd11
Block Editor: Unify texts for Create pattern modal (#52151)
t-hamano Jun 30, 2023
b0a5943
Fix history back after entering edit mode from Patterns (#52112)
kevin940726 Jun 30, 2023
b64bc8a
Add template part icons to the library grid items (#51963)
carolinan Jun 28, 2023
0702768
Patterns: Fix sidebar tab label (#51953)
aaronrobertshaw Jun 28, 2023
70fda06
Patterns: Fix setting of sync status for fully synced patterns (#51952)
aaronrobertshaw Jun 28, 2023
b59ce7c
Library: Reinstate manage all template parts page (#51961)
aaronrobertshaw Jun 28, 2023
d739511
Command Palette: fix incorrect path and snackbar message when templat…
t-hamano Jun 30, 2023
d4d0106
Drop-indicator: remove white border. (#52122)
jasmussen Jun 29, 2023
7b8db97
Make Navigation fallback selector private (#51413)
getdave Jun 29, 2023
ea6e8c5
Focus Mode: Use the symbol icon if a pattern is being edited (#52031)
carolinan Jun 29, 2023
8064587
Footnotes: register meta field for pages (#52024)
ellatrix Jun 29, 2023
7dbdc17
Fix unintentional toggling on of distraction free (#52090)
draganescu Jun 29, 2023
97e3acf
Revert "Updating social link attributes (#51997)" (#52019)
ramonjd Jun 29, 2023
53c86fc
Update home template name (#52048)
jameskoster Jun 28, 2023
aba35cb
Removes unused call (#51988)
getdave Jun 28, 2023
0ea227a
Remove ability for user to toggle sync status after pattern creation …
glendaviesnz Jun 29, 2023
9d456e4
Fix disable DFM when opening styles command (#52165)
ntsekouras Jun 30, 2023
d45c58c
Update custom patterns label to 'My patterns' (#51949)
SaxonF Jun 28, 2023
28789fc
Library: Add sync status to pattern details screen (#51954)
aaronrobertshaw Jun 28, 2023
b40ea4a
Patterns: Rename Library to Patterns (#52102)
aaronrobertshaw Jun 30, 2023
e29a7c2
[Library] Add lock icon for theme patterns (#51990)
kevin940726 Jun 30, 2023
be810dd
Patterns: Use "detached" copy consistently (#51993)
richtabor Jun 28, 2023
ce47b98
Editor initrial appender: Zero out margins in constrained layouts. (#…
jasmussen Jun 28, 2023
61f8821
Update pattern creation modal in library (#51946)
SaxonF Jun 28, 2023
6271aae
Fix missing snackbars in Library (#52021)
kevin940726 Jun 28, 2023
ad1865a
Make the entire preview clickable in order to enter "edit" mode in fo…
getdave Jun 28, 2023
3efbff4
Page Content Focus: Add welcome guides (#52014)
noisysocks Jul 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Patterns: Use "detached" copy consistently (#51993)
  • Loading branch information
richtabor authored and tellthemachines committed Jul 3, 2023
commit be810dd7022ac10ef3a50dc1e13f30c1cd50de13
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,12 @@ const BlockActionsMenu = ( {
id: 'convertToRegularBlocksOption',
label:
innerBlockCount > 1
? __( 'Convert to regular blocks' )
: __( 'Convert to regular block' ),
? __( 'Detach patterns' )
: __( 'Detach pattern' ),
value: 'convertToRegularBlocksOption',
onSelect: () => {
const successNotice =
innerBlockCount > 1
? /* translators: %s: name of the reusable block */
__( '%s converted to regular blocks' )
: /* translators: %s: name of the reusable block */
__( '%s converted to regular block' );
/* translators: %s: name of the synced block */
const successNotice = __( '%s detached' );
createSuccessNotice(
sprintf(
successNotice,
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/block/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ export default function ReusableBlockEdit( { attributes: { ref }, clientId } ) {
onClick={ () => convertBlockToStatic( clientId ) }
label={
innerBlockCount > 1
? __( 'Convert to regular blocks' )
: __( 'Convert to regular block' )
? __( 'Detach patterns' )
: __( 'Detach pattern' )
}
icon={ ungroup }
showTooltip
Expand Down
16 changes: 6 additions & 10 deletions packages/block-library/src/block/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,8 @@ export default function ReusableBlockEdit( {
}

const onConvertToRegularBlocks = useCallback( () => {
const successNotice =
innerBlockCount > 1
? /* translators: %s: name of the reusable block */
__( '%s converted to regular blocks' )
: /* translators: %s: name of the reusable block */
__( '%s converted to regular block' );
/* translators: %s: name of the synced block */
const successNotice = __( '%s detached' );
createSuccessNotice( sprintf( successNotice, title ) );

clearSelectedBlock();
Expand Down Expand Up @@ -182,17 +178,17 @@ export default function ReusableBlockEdit( {
<Text style={ [ infoTextStyle, infoDescriptionStyle ] }>
{ innerBlockCount > 1
? __(
'Alternatively, you can detach and edit these blocks separately by tapping “Convert to regular blocks”.'
'Alternatively, you can detach and edit these blocks separately by tapping “Detach patterns”.'
)
: __(
'Alternatively, you can detach and edit this block separately by tapping “Convert to regular block”.'
'Alternatively, you can detach and edit this block separately by tapping “Detach pattern”.'
) }
</Text>
<TextControl
label={
innerBlockCount > 1
? __( 'Convert to regular blocks' )
: __( 'Convert to regular block' )
? __( 'Detach patterns' )
: __( 'Detach pattern' )
}
separatorType="topFullWidth"
onPress={ onConvertToRegularBlocks }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe( 'Reusable blocks', () => {
await insertReusableBlock( 'Surprised greeting block' );

// Convert block to a regular block.
await clickBlockToolbarButton( 'Convert to regular block' );
await clickBlockToolbarButton( 'Detach pattern' );

// Check that we have a paragraph block on the page.
const paragraphBlock = await canvas().$(
Expand Down Expand Up @@ -221,7 +221,7 @@ describe( 'Reusable blocks', () => {
await insertReusableBlock( 'Multi-selection reusable block' );

// Convert block to a regular block.
await clickBlockToolbarButton( 'Convert to regular blocks' );
await clickBlockToolbarButton( 'Detach patterns' );

// Check that we have two paragraph blocks on the page.
expect( await getEditedPostContent() ).toMatchSnapshot();
Expand Down Expand Up @@ -353,7 +353,7 @@ describe( 'Reusable blocks', () => {

// Convert back to regular blocks.
await clickBlockToolbarButton( 'Select Pattern' );
await clickBlockToolbarButton( 'Convert to regular block' );
await clickBlockToolbarButton( 'Detach pattern' );
await page.waitForXPath( selector, {
hidden: true,
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ function ReusableBlocksManageButton( { clientId } ) {
{ canRemove && (
<MenuItem onClick={ () => convertBlockToStatic( clientId ) }>
{ innerBlockCount > 1
? __( 'Convert to regular blocks' )
: __( 'Convert to regular block' ) }
? __( 'Detach patterns' )
: __( 'Detach pattern' ) }
</MenuItem>
) }
</BlockSettingsMenuControls>
Expand Down