This PR updates the available tabs and refactors the style components so that they are reusable across site, blocks and elements.
Fixes BBT-94
Since the style components are all based on the schema reference for stylesProperties, they can be reused in multiple locations such as blocks, elements, elements within blocks and for the site styles themselves.
This PR is limited to site, blocks and elements. Elements within blocks should be possible but can be added after the UI has been improved to acommodate this better.
Change Log
Update main tab UI to Site, Blocks and Elements
Create Site component for site styles
Create Elements and ElementsItem component for element styles
Obtain list of elements from schema, same as we do for core blocks
Move individual Style... components from BlocksItem to a dedicated Style component
Use Style component inside BlocksItem, ElementsItem and Site, passing the path to where each style is located within the config
<!-- wp:pullquote -->
<figure class="wp-block-pullquote"><blockquote><p>"You miss 100% of the shots you don't take"<br>- <a href="https://www.bigbite.net">Wayne Gretzky</a></p><cite>Michael Scott</cite></blockquote></figure>
<!-- /wp:pullquote -->
Edit site styles
Edit core/pullquote block styles
Edit link element styles
Ensure styles update via the UI and are reflected in the preview and saved/exported theme.json
Description
This PR updates the available tabs and refactors the style components so that they are reusable across site, blocks and elements.
Fixes BBT-94
Since the style components are all based on the schema reference for
stylesProperties
, they can be reused in multiple locations such as blocks, elements, elements within blocks and for the site styles themselves.This PR is limited to site, blocks and elements. Elements within blocks should be possible but can be added after the UI has been improved to acommodate this better.
Change Log
Site
,Blocks
andElements
Site
component for site stylesElements
andElementsItem
component for element stylesStyle...
components fromBlocksItem
to a dedicatedStyle
componentStyle
component insideBlocksItem
,ElementsItem
andSite
, passing the path to where each style is located within the configSteps to test
core/pullquote
block styleslink
element stylesScreenshots/Videos
https://github.com/bigbite/themer/assets/41474928/e186f6c0-79c9-470a-8af3-e34998cd05b4
Checklist: