-
-
Notifications
You must be signed in to change notification settings - Fork 585
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 writing style guide #4271
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. The only potential problems are:
- It could inhibit contribution if people discover it and think that they have to do everything in it.
- Maintenance could be a long-term commitment by the incredible author of this PR :)
@@ -165,5 +165,6 @@ nav: | |||
- developers/github-selfhosted-setup.md | |||
- developers/project-types.md | |||
- developers/release-management.md | |||
- developers/styleguide.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll want to add a redirect for this after it goes in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that something I can do here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not AFAIK. I've been doing redirects in readthedocs. And of course this might break stable while latest is out there. I don't think it's all that important, but let's remember we have a task after it's pulled.
|
||
| Write This 👍 | Not This ❌ | ||
| -- | -- | ||
| Run `ddev start` and launch the site in a browser. | Please run `ddev start`, then launch the site in a browser. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Run `ddev start` and launch the site in a browser. | Please run `ddev start`, then launch the site in a browser. | |
| Run `ddev start` and launch the site in a browser. | Please run `ddev start`, then use `ddev launch` to view the site in a browser. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be an awful example to start with—added ddev launch
to the ideal example as well, since your suggested improvement only made the “Not This” example more useful.
| Run `ddev start` and launch the site in a browser. | Please run `ddev start`, then launch the site in a browser. | |
| Run `ddev start`, then run `ddev launch` to open the site in a browser. | Please run `ddev start`, then use `ddev launch` to view the site in a browser. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example is really just illustrating how not to start a sentence with “Please”, which is probably insulting to anyone with a pulse. Might be better to get rid of it or come up with another one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your choice here. It's hard to review these tables in a PR, so gets confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ll come back to this and try for a new example. In the meantime, I added a screenshot to the PR description since the illustrations (via table and !!!tip
examples) are a big part of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clicking on this button will give you a more Visual view of the PR.
|
||
### Write Once and Link | ||
|
||
Try to keep from repeating yourself in the documentation. Instead, write carefully and link to that well-crafted specimen, whether it’s across the page or off to another section. This has two benefits: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely correct, but there are times that links with necessary info distract from the flow, so it's better to just tell them the missing info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The realist in me probably agrees, but I have lists of redundancies to go through and address—both linking to canonical explanation and adding the ability to link it in the first place. (Like individual commands that live in a table, for example.)
|
||
| Write This 👍 | Not This ❌ | | ||
| -- | -- | | ||
| web server | webserver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like webserver better :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You’re clearly not alone! Same issue in this ancient battleground.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can live with styles I don't naturally do.
I’m not sure how to get around that, unless it’s something to clarify more urgently at the top of the new page. I added it as the last page in that section on purpose, and would not link to it from a PR template or anything that might suggest it’s required. The alternative is not clarifying any shared standard, which leaves consistency and common form to chance or the most opinionated and diligent contributor(s). If there’s a better way to strike the right balance, I’d love to know! If ddev.com changes shape, this could move there instead along with the brand guide and maybe a revamped FAQ—all with possibly more broad material that doesn’t need to live with the project source.
Flattery aside, the aim of this document is precisely the opposite: for that author to expose his assumptions for scrutiny, so it’s the best of our consensus and not the work of some rogue pedant. Helping to gracefully maintain that uniformity is a necessary task, especially while this effort is young, but IMO it should be guided by clear aims that are equally clear and accessible to everyone. |
😸 The reality is that without someone opinionated and tuned in, none of this will actually have any effect, so I stand by my statement. And the value of this guide is that it states our aspirations, so on its own can have significant value. I confess that one thing I love about writing golang code is that there are absolutely no discussions about tabs or spaces or anything else. There's one way to do it, and gofmt enforces that. It's so great! We won't be able to get that about English, but a statement of intent like this at least goes a ways toward it. |
Me too! Same with using a common Prettier setup with Vue or React—I spend more time thinking about my code than how it’s formatted. English is a more subjective and sometimes horrible soup, but it sounds like we’re agreeing on the value of the document and I’m probably underestimating the effort required to adhere to it. As long as the statement itself isn’t turning people away, I’m happy to try and help encourage its adoption. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed. Other than 1 spelling mistake everything looks good.
Co-authored-by: Mayank Gupta <mayank@mayankgupta.com>
BTW, I don't think you need to do a screenshot, since the link to the readthedocs build is adequate, for example https://ddev--4271.org.readthedocs.build/en/4271/developers/writing-style-guide/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
Thanks @mattstein
It's strange. It said that it passed all checks and now it says it's failing 1. |
Ah, the failure actually makes sense because I need to bypass checks for incorrect examples on this page. Will see if I can figure that out. |
Just took a look, haven't found an inline way to disable spellcheck. But things inside codeblocks are ignored... There are at least 3 components at play here: |
Thanks! I’m messing with .spellcheck.yml trying to use a CSS selector in that <span class="spellcheck-ignore">addon</span> - pyspelling.filters.html:
comments: false
ignores:
- code
- pre
- span.spellcheck-ignore It doesn’t have any effect when I run |
The maintainer of pyspelling, facelessuser, is super helpful and responsive... |
Turns out it was an instance of “addon” that needed fixing elsewhere. I didn’t realize the entire developer section was already excluded from spell-checking. |
Current failure is just that plugins.jetbrains.com is down |
I added the redirect for developers/styleguide -> developers/brand-guide |
The Problem/Issue/Bug:
While there are tools in place for linting and spell-checking the documentation, there aren’t any higher-level guidelines that clarify how it should be written. Without a clear standard, the organization and flow of the documentation is limited to the efforts and perspectives of individual contributors.
How this PR Solves The Problem:
This PR renames the “Styleguide” page to “Brand Guide”—which should be a more specific and appropriate description of that content—and adds a “Writing Style Guide” to comprehensively detail objectives from #4200 with some additional considerations for the broader effort of #4188 and a reference to the related aims of the Code of Conduct.
It adds some initial examples that could probably be improved or grown to clearly illustrate various recommendations.
This writing guide is not meant to be overbearing required reading for contributors, but an evolving document that can capture whatever goals and conventions we aspire to, with the ultimate purpose of encouraging the docs toward consistency.
Manual Testing Instructions:
https://ddev.readthedocs.io/en/latest/developers/testing-docs/
Related Issue Link(s):