Skip to content
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

Allow Names on Preset Blocks #917

Merged
merged 1 commit into from
Feb 20, 2025
Merged

Conversation

miazbikowski
Copy link
Contributor

@miazbikowski miazbikowski commented Feb 18, 2025

As part of the Theme Blocks "Preset Name Passing" subproject, we can now put name on any section or block preset nested block and set it a string value.

Some examples
The feature tech doc
Slack channel

@miazbikowski miazbikowski marked this pull request as ready for review February 18, 2025 22:51
@miazbikowski miazbikowski requested a review from a team as a code owner February 18, 2025 22:51
"name": "Nested Text Block",
"settings": {}
}
]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a nested block since there wasn't one.

@@ -24,9 +24,17 @@
"blocks": [
{
"type": "thing",
"name": "The Thing",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing these fixtures did not require updating any tests?

Copy link
Contributor Author

@miazbikowski miazbikowski Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests that run on these fixtures test that they are valid, so by adding this and having the existing tests be green, I prove that names are now valid.

If you wanna tophat, you can also clone this repo, and if you tweak these json fixtures, it'll actually run the json schema on the fixtures in real time (you'll see any of your errors in your IDE), which is super helpful when you're updating the json schema!

Copy link
Contributor

@albchu albchu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@miazbikowski miazbikowski merged commit 7472d4d into main Feb 20, 2025
5 checks passed
@miazbikowski miazbikowski deleted the miaz/allow-names-on-preset-blocks branch February 20, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants