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

Docs: Add section about using the schema during development #35835

Merged
merged 1 commit into from
Oct 21, 2021

Conversation

mkaz
Copy link
Member

@mkaz mkaz commented Oct 21, 2021

Description

Updates documentation recommending to use schema validation.

A block.json JSON schema was added to the SchemaStore that allows for
editors to provide additional tooltip, autocomplete, and some validation
when working with a block.json file.

Added in: SchemaStore/schemastore#1879

How has this been tested?

Confirm the documentation works as expected.

Screenshots

block-json-schema2

Types of changes

Documentation.

Updates documentation recommending to use schema validation.

A block.json JSON schema was added to the SchemaStore that allows for
editors to provide additional tooltip, autocomplete, and some validation
when working with a block.json file.

Added in: SchemaStore/schemastore#1879
Copy link
Member

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

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

This is a great addition :)

I wonder wether it should also reference that you can add the schema to your editor settings instead of the individual file.

@mkaz mkaz merged commit 01532a8 into trunk Oct 21, 2021
@mkaz mkaz deleted the docs/add-block-json-schema branch October 21, 2021 16:16
@github-actions github-actions bot added this to the Gutenberg 11.9 milestone Oct 21, 2021
@mkaz
Copy link
Member Author

mkaz commented Oct 21, 2021

I wonder wether it should also reference that you can add the schema to your editor settings instead of the individual file.

I think it is easier to work with and explicit if we just include it in the file, there is less work for a developer to do.

With this PR #35843, I added it to the create-block script so will automatically get added for new blocks created with that tool.

fullofcaffeine added a commit that referenced this pull request Oct 21, 2021
* trunk: (494 commits)
  remove consecutive rc warning (#35855)
  Update Changelog for 11.8.0-rc.2
  Bump plugin version to 11.8.0-rc.2
  [RNMobile] Disable React Native E2E Tests (iOS) (#35844)
  Add section about using the schema during development (#35835)
  Add a method to disable auto-accepting dialogs (#35828)
  Wrap NavigationContainer with SafeAreaView. (#35570)
  Update Appium to 1.22.0 (#35829)
  Post Comment: Handle the case where a comment does not exist (#35810)
  Clear selected block when clicking on the gray background (#35816)
  Post excerpt: Don't print the wrapper when there is no excerpt (#35749)
  [Block] Navigation: Fix padding for social links on mobile (#35824)
  Fix issue with responsive navigation causing wrapping. (#35820)
  [Block Editor]: Fix displaying only `none` alignment option (#35822)
  Add API to access global settings, styles, and stylesheet (#34843)
  Mobile Release v1.64.1 (#35804)
  Add resizer to template part focus mode (#35728)
  Update Changelog for 11.7.1
  Gallery block: Only show the gallery upload error message if mixed multiple files uploaded (#35790)
  Update Changelog for 11.8.0-rc.1
  ...
@gziolo
Copy link
Member

gziolo commented Oct 24, 2021

This is great, thank you for working on it. Is there a plan to add this schema entry to all core blocks?

@mkaz
Copy link
Member Author

mkaz commented Oct 24, 2021

@gziolo Here you go, added to each core block => #35900

@mkaz mkaz mentioned this pull request Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants