Fixes BBT-116 - Replaces the accordion navigation with a more advanced route-based navigation which can handle nested routes. Breadcrumbs are rendered to track these routes and provide the means to navigate backwards to previous levels.
Change Log
Disables @wordpress/no-unsafe-wp-apis project-wide, removing the need to disable per-file
Introduces route-based components for the blocks and elements tabs, implemented using WordPress Navigator functionality
Renames any usage of path with selector when refering to schema locations, to prevent confusion with route paths
Ensures elements are only rendered when they are present in theme.json
Introduces PseudoList to display a list of pseudos present in schema and navigate to them
Introduces PseudoItem to display individual pseudo styles
Ensures pseudos are only rendered when they are present in theme.json
Introduces a NavigatorBreadcrumbs component which will break the current route into individual parts, including links for route navigation back to higher levels.
Renames some components for consistency and clarity - eg BlockList/BlockItem/ElementList/ElementItem/PseudoList/PseudoItem
Steps to test
Load up the plugin with TT3 enabled
Navigate to the blocks tab
Notice blocks will only be shown if present in the theme.json
Select a block to navigate to it
Notice elements will only be shown if present in the theme.json for that block
Select an element to navigate to it
Notice pseudos will only be shown if present in the theme.json for that block element
Ensure breadcrumbs match the route
Navigate backwards using the breadcrumbs
Visit the elements tab
Notice elements will only be shown if present in the theme.json
Select an element to navigate to it
Notice pseudos will only be shown if present in the theme.json for that block element
Description
Fixes BBT-116 - Replaces the accordion navigation with a more advanced route-based navigation which can handle nested routes. Breadcrumbs are rendered to track these routes and provide the means to navigate backwards to previous levels.
Change Log
@wordpress/no-unsafe-wp-apis
project-wide, removing the need to disable per-fileNavigator
functionalitypath
withselector
when refering to schema locations, to prevent confusion with routepath
stheme.json
PseudoList
to display a list of pseudos present in schema and navigate to themPseudoItem
to display individual pseudo stylestheme.json
NavigatorBreadcrumbs
component which will break the current route into individual parts, including links for route navigation back to higher levels.BlockList
/BlockItem
/ElementList
/ElementItem
/PseudoList
/PseudoItem
Steps to test
theme.json
theme.json
for that blocktheme.json
for that block elementtheme.json
theme.json
for that block elementScreenshots/Videos
https://github.com/bigbite/themer/assets/41474928/6a0ecf64-ac0e-45a8-bd29-7ec3b63671eb
Checklist: