Make WordPress Core

#59380 closed enhancement (duplicate)

Add new @wordpress/patterns package

Reported by: glendaviesnz's profile glendaviesnz Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch gutenberg-merge close
Focuses: Cc:

Description

Adds the newly created @wordpress/patterns package. Currently there is duplicated code for adding patterns in post editor (imported from reusable-blocks) and site editor (local modal component), which means any changes need to be applied in two places, so the patterns package was added in order to allow sharing of this code, and also as a means to start slowly deprecating the @wordpress/reusable-blocks package.

Change History (7)

This ticket was mentioned in PR #5235 on WordPress/wordpress-develop by @glendaviesnz.


12 months ago
#1

  • Keywords has-patch added

## Description

Adds the newly created @wordpress/patterns package. Currently there is duplicated code for adding patterns in post editor (imported from reusable-blocks) and site editor (local modal component), which means any changes need to be applied in two places, so the patterns package was added in order to allow sharing of this code, and also as a means to start slowly deprecating the @wordpress/reusable-blocks package

Trac ticket: https://core.trac.wordpress.org/ticket/59380

## Testing Instructions

This can't be properly tested until the latest GB packages are backported.

  • In the post editor add a block and use the Create pattern block menu to create both a synced and an unsynced pattern and make sure both options work as expected
  • In the post editor make sure the Detach pattern and Manage patterns options on the block overflow menu work correctly
  • In the site editor pattern section use the + at the top of the left navigation to create both a synced and unsynced pattern and make sure both are created as expected
  • In the site editor block editor use the Create pattern block menu to create both a synced and an unsynced pattern and make sure both options work as expected and also make sure the Detach pattern and Manage patterns options on the block overflow menu work correctly

## Screenshots or screencast

https://github.com/WordPress/gutenberg/assets/3629020/d5d7b369-5369-48e3-801c-95d3bdd615f3

#2 @costdev
12 months ago

  • Component changed from General to Editor

#3 @desrosj
12 months ago

  • Summary changed from 6.4 Backport: add new @wordpress/patterns package to Add new @wordpress/patterns package

#4 @hellofromTonya
12 months ago

  • Keywords gutenberg-merge close added

This change is included in #59411 PR https://github.com/WordPress/wordpress-develop/pull/5262.

Thinking this ticket can be closed as a duplicate of #59411.

cc @mikachan

#5 @mikachan
12 months ago

Thinking this ticket can be closed as a duplicate of #59411.

Yes I agree, and can confirm that this change is included in https://github.com/WordPress/wordpress-develop/pull/5262.

@isabel_brison commented on PR #5235:


12 months ago
#6

Closing in favour of #5262

#7 @hellofromTonya
12 months ago

  • Milestone 6.4 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #59411.

Thank you for confirming @mikachan :)

Note: See TracTickets for help on using tickets.