Skip to content

Block Inserter - Manage Block Visibility of Tour Operator Blocks  #400

@ashleyshaw

Description

@ashleyshaw

Is your feature request related to a problem? Please describe.
Currently, all blocks from the Tour Operator Plugin appear in the block inserter by default. Most of these blocks are primarily used within the site editor in patterns or block templates, which clutters the block inserter unnecessarily.

Describe the solution you'd like
We propose setting the inserter property to false for all blocks in the Tour Operator Plugin, except for the Tour Collections block. This will hide these blocks from the inserter, ensuring that they are only accessible when used in patterns or templates within the site editor. The Tour Collections block will remain visible in the block inserter for easy access.

Describe alternatives you've considered
Alternatively, we could allow all blocks to remain visible in the inserter. However, this approach would overwhelm users with block options that are rarely used directly, detracting from the usability of the editor.

Additional context
Based on the WordPress documentation, setting inserter: false hides the block from all UI elements unless explicitly inserted programmatically, which fits our requirements perfectly.

Reference

Acceptance Criteria:

  • Set inserter: false for all blocks except the Tour Collections block.
  • Confirm that the hidden blocks are only accessible via patterns or templates in the site editor.
  • Ensure the Tour Collections block is available in the block editor's inserter.

Tasks:

  • Update the block.json files for each relevant block to set inserter: false.
  • Test block visibility to confirm that only the Tour Collections block appears in the inserter.
  • Validate that hidden blocks function correctly within patterns and templates in the site editor.

Metadata

Metadata

Assignees

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions