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

Add documentation for shorthand alternatives of Blueprint steps #1261

Merged
merged 5 commits into from
Apr 16, 2024

Conversation

ironnysh
Copy link
Collaborator

What is this PR doing?

Adds documentation for shorthand variations of Blueprint steps.
(See context and discussion here).

The new section covers the following:

  • briefly explains what are shorthands
  • lists supported steps (with code examples)
  • describes when should people use each alternative.

@adamziel
Copy link
Collaborator

This is awesome, thank you so much @ironnysh! I left some formatting nitpicks, but other than that it looks great.

@adamziel
Copy link
Collaborator

I went ahead and merged the suggestions and now I'll merge the entire PR. Thank you so much!

@adamziel adamziel merged commit 0a2292b into trunk Apr 16, 2024
1 check passed
@adamziel adamziel deleted the document-shorthand-steps-in-blueprints branch April 16, 2024 20:02
@ironnysh
Copy link
Collaborator Author

ironnysh commented Apr 17, 2024

formatting nitpicks

Thanks, @adamziel! Thought I got it right this time :-)))
I run the "lint", "format", and "build" scripts, and have Prettier installed—is there a step/trick I'm missing?

@ironnysh
Copy link
Collaborator Author

@adamziel, I just saw that the PR messed up the ToC on the right. It only shows the shorthands now, instead of all the steps:

image

@adamziel
Copy link
Collaborator

I run the "lint", "format", and "build" scripts, and have Prettier installed—is there a step/trick I'm missing?

It probably didn't work because those examples aren't valid JSON, e.g. {},{} wouldn't be auto fixed but [{},{}] would

@ironnysh
Copy link
Collaborator Author

Got it. I'll double-check next time

adamziel added a commit that referenced this pull request Apr 19, 2024
Moves the Steps Shorthands documentation, merged in
#1261, to a
separate page.

## What problem is it solving?

@ironnysh
[noted](#1261 (comment))
that merging the PR messed up the table of contents on the steps page:

<img width="512" alt="323169294-76cb6e7b-2ec5-4f66-b6b6-04e0dbcd1edc"
src="https://github.com/WordPress/wordpress-playground/assets/205419/2fa204c9-5652-40e1-8903-04feed74d686">

That specific ToC is generated using a custom React component that
doesn't seems to handle merging new entries with any pre-existing
structure. We could fix it, but since we might soon move to a
[Playground-based documentation
workflow](https://github.com/adamziel/playground-docs-workflow),
investing time in Docusaurus setup doesn't make much sense. I went for
the easy way out and moved the information to a new page.

## Testing Instructions

Run `nx dev docs-site` locally and confirm the toc on the Steps page is
in tact.
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.

2 participants