Skip to content

Conversation

taroface
Copy link
Contributor

@taroface taroface commented Sep 8, 2025

  • Reorganized and consolidated Style Guide headings
  • Added new section on "Prescriptive writing"
  • Attempted to make Style Guide conform to its own guidelines (this work will be ongoing):
    • Writing is more concise, prescriptive, and 'active'
    • Guidance is formatted in a generally consistent manner
    • Correct punctuation is used, etc.
  • Added new guidance on "in" vs. "on" word usage per this earlier exchange
  • Corrected the guidance on "Cockroach Labs's" (this is not allowed)
  • Added some guidance on how & when to make diagrams
  • Added new section on avoiding "Latinisms"
  • Added guidance on how code blocks should be presented
  • Added some new guidance opportunistically (on straight quotes, colons over dashes, ...)

Copy link

netlify bot commented Sep 8, 2025

Deploy Preview for cockroachdb-docs canceled.

Name Link
🔨 Latest commit 4276c88
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/68bf502725ddbe0008141db4

Copy link

github-actions bot commented Sep 8, 2025

Files changed:

  • MarkdownGuide.md
  • StyleGuide.md

Copy link

netlify bot commented Sep 8, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 4276c88
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/68bf502796139900089e5eb4

Copy link

netlify bot commented Sep 8, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 4276c88
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/68bf502709b58f0008ee651a

@taroface taroface requested a review from Flat5flat9 September 8, 2025 21:49

### Third-party products

In general, align third-party branding with that brand's usage. Do not use the shortened versions of product names.
Copy link
Contributor

Choose a reason for hiding this comment

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

i have received feedback in the past to avoid linking to 3rd party products' docs unless absolutely necessary for clarity. IDK if that is appropriate for inclusion in this section, or if we would like to discuss it more separately. I don't have a strong opinion except that such external links often break because humans break their websites constantly

Copy link
Contributor

Choose a reason for hiding this comment

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

I have the possibly total opposite opinion, which is that I don't want us to be responsible for documenting third party product flows and would rather link out to their documentation wherever possible for those. Easier to identify and fix a broken link than correct text on our site that describes an outdated third-party procedure.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh sure, totes agreed. the vibe was not about integration docs per se (in which case, yes please someone else do them) but just general linking vs not

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linking out to external products is absolutely necessary for things like migration docs. I think I can add some follow-up guidance on external links that is consistent with both of your comments; stay tuned.

Copy link
Contributor

@jhlodin jhlodin left a comment

Choose a reason for hiding this comment

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

Broadly looks good to me, left a couple comments but no major disagreements from me. Will add comments later if other suggestions come to mind.


- Avoid using "please" when giving an instruction, except when asking the user to go outside the scope of the task (such as contacting Cockroach Labs or filing a support issue).
- **Avoid:** Define additional settings as desired.
**Prefer:** You can define additional settings in the configuration file. To change the default host and port, set `host` and `port` respectively. To change the path, ...
Copy link
Contributor

Choose a reason for hiding this comment

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

This implies that we should spell out every configuration option available, which can get unwieldy fast. Especially in deployment guides where we may want to offer a "one size fits all" initial configuration but leave room for optional configurations. In those circumstances I would rather link out if there's a good docs target or even leave out the sentences after the first generic one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I get you, but could you provide an example of what you're suggesting here?

Copy link
Contributor

Choose a reason for hiding this comment

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

https://www.cockroachlabs.com/docs/stable/deploy-cockroachdb-with-cockroachdb-operator#initialize-the-cluster Step 6 here is a hand-wavey note that essentially says "if you know you need to make other changes to your configuration yaml, now is a good time to make those" without going into details of every option. I believe it's compliant with the first sentence of your Prefer example, but it refers to only a couple example configs and doesn't have task-oriented sentences like the "To change the ... set ..." in that example.

I would just want to clarify in the style guide if this approach is acceptable when there are too many specific configs to spell out in that single instruction

Copy link
Contributor Author

@taroface taroface Sep 10, 2025

Choose a reason for hiding this comment

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

I see. The style guidance here is specifically intended to guardrail us against hand-waving. It's of course not possible to mention or prescribe a value for every configurable detail of every customer's deployment. But from past/ongoing experiences, phrases like "If you know you need ..." or "Modify other relevant parts of the configuration ..." will prompt at least some customers to respond, "How do I know I need to?" and "Which parts are relevant?". A subtle balancing act might be to simply state in a callout that "Depending on your configuration, you may need to set additional parameters in the XYZ fields". They might still ask the question, but won't be led to feel they should already know the answer.

@Flat5flat9 wondering if you have any thoughts here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would hope that we have guidance somewhere that we could link to? Then it could have links like "Depending on [your configuration](link to guidance), you may need to set additional parameters in the XYZ fields"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This brings us back to asking how much guidance we can reasonably provide. I feel there must be a way to indicate there's a limit without appearing to hand-wave it away. I'll think on the guidance.

- Databases on the cluster
- Jobs running on the cluster

## Inclusivity
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest a quick subsection under here to avoid idioms and terminology that could be confusing when auto-translated (which should be assumed given that we don't have a localization team).

Suggest something like:

### Avoid idioms and other difficult-to-translate terminology

The majority of our non English-speaking readers use a browser translation tool to read our documentation in a preferred language. Avoid using idioms or non industry-standard terms that these tools may translate literally.

- **Avoid:** Configure roles and permissions to draw a line between allowed and disallowed actions.
  **Prefer:** Configure roles and permissions to allow and disallow actions.


Reference issues and pull requests by their corresponding number, prepended with `#`.
- **Example:** `SELECT * FROM TABLE {mytable};`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest also adding an example from the API docs where these are commonly used in URLs, like

- **Example:** `--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/nodes`


To insert a note, use the following code:
- Avoid placing callouts adjacent to each other.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add "Avoid placing a callout immediately below a header without introductory text for the section" but IIRC we've done that in a couple places.


Use images to clarify a topic, but only use them as needed. Images are either:

- **Screenshots:** Depict a UI element. Screenshots should show enough of the UI that the user can easily orient themselves and understand what they are being shown. If a screenshot needs an annotation, use a red box.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **Screenshots:** Depict a UI element. Screenshots should show enough of the UI that the user can easily orient themselves and understand what they are being shown. If a screenshot needs an annotation, use a red box.
- **Screenshots:** Depict a UI element. Screenshots should only show enough of the UI that the user can easily orient themselves and understand what they are being shown. If a screenshot needs an annotation, use a red box.

Would like to emphasize not including page elements that are not relevant to the screenshot's purpose.


Use a warning to express that a piece of information is critical to understand to prevent data loss, security vulnerabilities, or unexpected behavior.
To optimize accessibility and SEO, a screenshot should be accompanied by text and [alt-text](#write-accessible-documentation) describing its contents.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we include an example here showing the correct syntax to do this? Like:

<img src="{{ 'images/v24.2/topology-patterns/topology_multi-region_hardware.png' | relative_url }}" alt="Multi-region hardware setup" style="max-width:100%" />

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm this should be in the separate MarkdownGuide.md, which was largely necessary, but did indeed cause some awkward splits. I'll see what I can do to mitigate this.

Comment on lines +417 to +418
- [Monodraw](https://monodraw.helftone.com/)
- [Omnigraffle](https://www.omnigroup.com/omnigraffle)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest appending the use cases for each. IMO these are

  • Monodraw (useful for abstract concept diagrams)
  • Omnigraffle (useful for diagrams with branded elements like logos and colors)


#### CockroachDB version callout
Icons for diagrams can be sourced from: https://github.com/cockroachlabs/cockroach-studios/tree/main/icons
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Icons for diagrams can be sourced from: https://github.com/cockroachlabs/cockroach-studios/tree/main/icons
Icons and colors for diagrams can be sourced from: https://github.com/cockroachlabs/cockroach-studios/tree/main/icons

Copy link
Contributor

Choose a reason for hiding this comment

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

The .gstencil file in that directory is an Omnigraffle template listing our branded primary/secondary/extended color palette.

- Avoid using _and/or_ unless space is very limited (e.g., in a table). Instead, decide whether **and** or **or** can stand alone or make use of **both** when the inclusivity must be explicit, e.g., **x or y or both**.
- Use the [Oxford (aka serial) comma](https://en.wikipedia.org/wiki/Serial_comma).
- Use straight `'` rather than curved `‘` quotes.
- Limit semicolon usage. Instead, use two simple sentences.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rmloveland This was directed specifically at you (jk it was already there)


## Page components
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this was a separate PR but i am kinda bummed that we removed the stuff about consistent page structure, e.g.

  • before you begin
  • ...
  • see also

since i think there is a lot of value of having ~all the pages in the docs share a rough structure for easier scanning, since folks aren't usually "reading" carefully but "scanning"

however maybe this doesn't matter in agent world (tm)

Copy link
Contributor Author

@taroface taroface Sep 9, 2025

Choose a reason for hiding this comment

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

I don't recall seeing or removing those sections. I see that some TOC links corresponding to those were removed in #20170, but I think that content was previously removed (not sure if by me). I'll dig around for it in the git history. Thank you for raising this!

Copy link
Contributor

Choose a reason for hiding this comment

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

looks like it was removed in this PR: https://github.com/cockroachdb/docs/pull/19334/files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I probably cut too broad a swath there. I'll see what I can put back.


| Avoid | Prefer |
|----------|------------|
| Postgres | PostgreSQL |
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe not for this PR but i've long believed we need to revisit this, even the PG docs themselves are like "Postgres is fine"

https://www.postgresql.org/docs/current/history.html#HISTORY-POSTGRESQL

Postgres is still considered an official project name, both because of tradition and because people find it easier to pronounce Postgres than PostgreSQL.

Copy link
Contributor

@rmloveland rmloveland left a comment

Choose a reason for hiding this comment

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

LGTM!!! thanks for going through this and doing these thoughtful updates!

PS All my comments below are things that can be revisited in other conversations, they're not really about this PR, apologies for the digressions

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.

4 participants