-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Group block: use a variation picker in the placeholder (#43496)
* Group block: remove default layout for the group block and use a variation picker in the placeholder. * Updating e2e tests to select default group from group variation placeholder * Adding meaningful aria label to block variation picker Updating e2e tests Refactoring Group edit.js * Only you..... can make my tests go green.... * Clicking on block variation skip button * Clicking on block variation skip * Programmatically creating a group block will not default to the constrained layout type. It must be specified. * Reinstating default "constrained" layout type, but adding an extra ephemeral property to identify blocks that have been inserted. * Ensure that the inserted block is selected after a Group variation is selected. * Removing skip link and update description * Reinstate skip for now until we can update the e2e tests * Stylising the placeholder icons updating tests * Adding `isDefault` to the default props and removing it when a group variation is selected. * Updating tests to account for: - default layout is "constrained" when programmatically inserting a group block - using createBlock with no attributes passed * Creating a custom group block variation picker so we do not have to update (and potentially break) the blockvariationpicker component, which is used elsewhere. * Add missing button label. Add class to button. Fix outline heights for button. * Update native test fixture Updating design/spacing of placeholder Hardcoding custom icons * Removing the `isDefault` Group block attribute. It's a fragile solution to keep track of whether a variation has been selected since it adds a potentially useless attribute. In this iteration, we'll keep track of whether to show the placeholder via useState in the editor, and, more permanently, whether the block has innerblocks. * Ensure that we select the default group variation in the e2e tests. * Creating custom hook for `showPlaceholder` Testing on the CI whether the changes to CPT are required :) * Default selected layout type of Group variation is "constrained" * Am I pretty enough for you, linter? * Reverted * Reinstating `useEffect` so that we can react to changes in the style state.
- Loading branch information
Showing
11 changed files
with
446 additions
and
50 deletions.
There are no files selected for viewing
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
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
Oops, something went wrong.