-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BBT-53] Add a new ButtonExport component and corresponding rest endpoint #13
[BBT-53] Add a new ButtonExport component and corresponding rest endpoint #13
Conversation
allows an updated copy of theme.json to be exported and saved via the plugin dashboard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works great, my only request is that we update all the class usage in class-rest-api.php
to use the same format. Happy to go with the declarative approach and avoid \
if you don't mind updating the other class references in this file?
Updated those usages and references @g-elwell 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrishbite cheers! Just noticed this one is targeting main
, can you update to target release/1.0.0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Fixes BBT-53
Allows a user to export an updated
theme.json
file with the layers merged and flattened.The
ButtonExport
component is reusable and can be placed anywhere, for this PR it has been added next to the other buttons.Change Log
ButtonExport
component**/themer/v1/export
rest routeSteps to test
Notes: As the main UI for
themer
isn't implemented yet, suggest to use theSite Editor
for the below testing steps to check functionality of the export on theTwentyTwenty-Three
theme.Reset to defaults
button to reset all user styles/settings and saveStyles
>Colours
>Palette
Styles
>Colours
>Colours
>*
options to random colours from the paletteStyles
>Typography
>Elements
to random settingsStyles
>Blocks
>Paragraph
optionsExport theme.json
button on theThemer
admin pageReset to defaults
button to reset all user styles/settings again and saveThemer
andSite Editor
pages (they should now be back to default styles from the themestheme.json
)twentytwentythree/theme.json
file and replace with exported files contentThemer
andSite Editor
pagesSettings
now reflect the changes made previously and were exportedChecklist: