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

Update README.md #37294

Merged
merged 2 commits into from Dec 10, 2021
Merged

Update README.md #37294

merged 2 commits into from Dec 10, 2021

Conversation

@ajlende
Copy link
Contributor

@ajlende ajlende commented Dec 10, 2021

Description

Updates the documentation for the schemas to match #37269

  • Update URLs to use the new short format
  • Remove mention of SchemaStore as a place that needs updating
  • Add example for selecting a version
  • Add notes about where to find a list supported editors

Note that the version URL in the example will only work once #37269 is merged.

How has this been tested?

Read through the new docs and check for spelling/grammar and that everything makes sense.

Screenshots

Types of changes

Documentation

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).
@ajlende ajlende requested review from mkaz and gziolo Dec 10, 2021
@ajlende ajlende self-assigned this Dec 10, 2021
@mkaz
Copy link
Member

@mkaz mkaz commented Dec 10, 2021

Do you think we should mention editors by name or at least the most popular ones?

How about something like this for the last paragraph:

For two popular editors, Visual Studio Code requires adding the $schema property, but PHPStorm automatically looks up the schema from the SchemaStore.org based on the file name. Some editors require a plugin installed, check your editor's documentation for details. Additionally, SchemaStore.org and JSON Schema have lists of editors known to have support.

@ajlende
Copy link
Contributor Author

@ajlende ajlende commented Dec 10, 2021

Do you think we should mention editors by name or at least the most popular ones?

I avoided it because I wasn't sure if endorsing any specific editors was something that should be done in the docs, especially paid or closed source ones like PhpStorm and VSCode.

Technically both VSCode and PhpStorm support the $schema property which is why I left it at "Many popular editors recognize...".

VSCode allows setting the schema in settings.json, but it will be overridden by a $schema defined in the file.

Intellij IDEA Community (which should work the same as PhpStorm) will automatically look up the schema based on the SchemaStore catalog (so the trunk version), but $schema overrides that value if you want a different version, and you can override the $schema value in the settings.

If you don't think it's a problem, I can shout out VSCode and PhpStorm if that's what most folks are using.

@mkaz
Copy link
Member

@mkaz mkaz commented Dec 10, 2021

I don't see it as an endorsement, just recognizing that people are using them, and this is how it's done for those.

@gziolo
Copy link
Member

@gziolo gziolo commented Dec 10, 2021

That’s a great way to make this README file to play nicely with the wp/5.8 branch 👌

@ajlende
Copy link
Contributor Author

@ajlende ajlende commented Dec 10, 2021

@mkaz I didn't bother mentioning the auto-setup for PhpStorm because $schema still works, the instructions are a bit simpler this way, and it's probably not a bad idea to encourage $schema usage since it is supported in multiple editors.

mkaz
mkaz approved these changes Dec 10, 2021
Copy link
Member

@mkaz mkaz left a comment

👍

@gziolo gziolo merged commit edd43b4 into trunk Dec 10, 2021
20 checks passed
@gziolo gziolo deleted the update/schemas-readme branch Dec 10, 2021
@github-actions github-actions bot added this to the Gutenberg 12.2 milestone Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants