Skip to content

Commit 8cf3d2a

Browse files
dcpenapedrosousa
andauthored
[Style Guide] Added guidance for tabs & details (#29666)
* Added guidance for tabs & details * Update src/content/partials/style-guide/tab-guidance.mdx Co-authored-by: Pedro Sousa <680496+pedrosousa@users.noreply.github.com> --------- Co-authored-by: Pedro Sousa <680496+pedrosousa@users.noreply.github.com>
1 parent 20a69b4 commit 8cf3d2a

File tree

5 files changed

+26
-1
lines changed

5 files changed

+26
-1
lines changed

src/content/docs/style-guide/components/details.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ styleGuide:
44
component: Details
55
---
66

7-
import { Type, MetaInfo } from "~/components";
7+
import { Type, MetaInfo, Render } from "~/components";
88

99
When you want to provide additional information in context, but you do not want it to clutter up the more important content, use `<Details>` to add a collapsible container.
1010

@@ -24,6 +24,10 @@ import { Details } from "~/components";
2424
</Details>
2525
```
2626

27+
## Additional guidance
28+
29+
<Render file="tab-guidance" product="style-guide" />
30+
2731
## Properties
2832

2933
- `header` <Type text="string" /> <MetaInfo text="required" />

src/content/docs/style-guide/components/tabs.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ This component can help you create a tabbed interface to show related informatio
1313
- Account-level vs zone-level navigation
1414
- GRE / IPsec tunnels
1515

16+
## Additional guidance
17+
18+
<Render file="tab-guidance" product="style-guide" />
19+
1620
```mdx live
1721
import { Tabs, TabItem } from "~/components";
1822

src/content/docs/style-guide/documentation-content-strategy/writing-guidelines.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ sidebar:
55
order: 5
66
---
77

8+
import { Render } from "~/components";
9+
810
Use the following writing guidelines to create product content that is clear and consistent and demonstrates Cloudflare's brand voice and product tone. The tone we use varies based on customer goals while using certain products and features. We emphasize ease-of-use within our products.
911

1012
## Use plain language
@@ -43,6 +45,12 @@ Use a confident and clear tone that prevents customer doubt. Guide from a place
4345

4446
---
4547

48+
## Always show the primary answer
49+
50+
<Render file="tab-guidance" product="style-guide" />
51+
52+
---
53+
4654
## Introduce complexity progressively
4755

4856
When introducing technical concepts, start with the basics and gradually build up to more advanced topics. Explain the "why" before the "how".

src/content/docs/style-guide/how-we-docs/ai-consumability.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Two Content
3939

4040
The references to the panels `id`, usually handled by JavaScript, are visible but non-functional.
4141

42+
<Render file="tab-guidance" product="style-guide" />
43+
4244
### Turning our components into "Markdownable" HTML
4345

4446
To solve this, we use [Markdown for Agents](/fundamentals/reference/markdown-for-agents/), which converts HTML to Markdown at the Cloudflare network layer. It handles:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
{}
3+
---
4+
5+
The primary answer or core instruction should always appear in the main content flow, not exclusively inside a tab or collapsible section.
6+
7+
Use tabs for platform-specific variations (for example, Dashboard versus API versus Terraform) only after stating the general concept. Use Details for supplementary information, not for the primary answer.

0 commit comments

Comments
 (0)