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 Blueprint schema to remove alerts when using the shorthand syntax #1282

Closed
ironnysh opened this issue Apr 19, 2024 · 8 comments · Fixed by #1594
Closed

Update Blueprint schema to remove alerts when using the shorthand syntax #1282

ironnysh opened this issue Apr 19, 2024 · 8 comments · Fixed by #1594

Comments

@ironnysh
Copy link
Collaborator

When using VS Code to compose a Blueprint that contains the shorthand syntax of the siteOptions step and plugins step, the editor alerts that these are deprecated:

image

Now that shorthands are here to stay and featured in the official docs, it's probably safe to remove the warnings from the schema (see these lines).

BTW, the Builder doesn't identify the shorthand syntax as an error. Is it using another version of the schema for validation?

@bph
Copy link
Collaborator

bph commented May 29, 2024

Hmm, the deprecation message reads: 'This experimental option will change without warning.\nUse steps instead."

That's making it a bit clearer, that it's experimental and not obsolete.
Are shorthand blueprint properties to stay?
Is there a way for VS Code to display that message?

The JSON schema specs notice the deprecated property needs to be boolean.

"The value of this keyword MUST be a boolean. When multiple occurrences of this keyword are applicable to a single sub-instance, applications SHOULD consider the instance location to be deprecated if any occurrence specifies a true value.

If "deprecated" has a value of boolean true, it indicates that applications SHOULD refrain from usage of the declared property. It MAY mean the property is going to be removed in the future."

@bph
Copy link
Collaborator

bph commented May 29, 2024

@adamziel let me know if the implementation is cemented enough for the "deprecated" property to be removed, and I create a PR for it.

@ironnysh
Copy link
Collaborator Author

ironnysh commented May 29, 2024

Here's the original discussion (for reference/background):

... are the shorthands documented somewhere?

They aren't at the moment, I've added them as an experimental feature a few months ago and didn't want to spread them too much in case I'd have to remove them later on. Today I'm quite certain they're here to stay which also means there are no more blockers to documenting them.

@bph
Copy link
Collaborator

bph commented May 29, 2024

The documentation is available: https://wordpress.github.io/wordpress-playground/blueprints-api/steps-shorthands

@ironnysh
Copy link
Collaborator Author

Yup, I did it based on @adamziel's explanation 😊

@bph
Copy link
Collaborator

bph commented May 30, 2024

Thank you @ironnysh. Wonderful.

adamziel pushed a commit that referenced this issue Jun 18, 2024
Fixes 

- #1282


## Implementation details
remove the deprecation lines from the schema
bgrgicak pushed a commit that referenced this issue Jun 20, 2024
Fixes 

- #1282


## Implementation details
remove the deprecation lines from the schema
@adamziel adamziel moved this to Needs Triage/Our Reply in Playground Board Jul 1, 2024
@adamziel adamziel moved this from Needs Triage/Our Reply to Up next in Playground Board Jul 1, 2024
@bgrgicak
Copy link
Collaborator

bgrgicak commented Jul 9, 2024

The siteOptions step and plugins aren't marked as deprecated anymore, so I'm going to close this issue.

Thank you @bph and @ironnysh!

@bgrgicak bgrgicak closed this as completed Jul 9, 2024
@github-project-automation github-project-automation bot moved this from Up next to Done in Playground Board Jul 9, 2024
@adamziel adamziel reopened this Jul 9, 2024
@github-project-automation github-project-automation bot moved this from Done to Inbox in Playground Board Jul 9, 2024
adamziel added a commit that referenced this issue Jul 9, 2024
Now that Blueprint shorthand properties like `constants`, `siteOptions`, and `plugins` are here to stay and featured in the official docs, it's probably safe to remove the warnings from the schema (see these lines).

Closes #1282
@adamziel
Copy link
Collaborator

adamziel commented Jul 9, 2024

I think lack of deprecation info was just a documentation quirk, the "deprecated" property was still there in JSON schema. I started #1594 to remove it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants