Skip to content

Commit d7d3110

Browse files
feat: enable hiding pages in sidebar + pricing docs updates (#10407)
* spend allocation changes * update copy * remove last ref
1 parent 3e90f76 commit d7d3110

File tree

7 files changed

+17
-4
lines changed

7 files changed

+17
-4
lines changed

docs/pricing/quotas/index.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ The first 6 actions in the list can all be done in [sentry.io](https://sentry.io
3131
| Action | Errors | Span Units | Replays |Attachments |
3232
| ------ | ------ | ------------ | ----------- |----------- |
3333
| [Ensure spike protection is enabled](#spike-protection) | ✓ | ✓ | | ✓ |
34-
| [Set a spend allocation budget](#spend-allocation) | ✓ | ✓ | | ✓ |
3534
| [Adjust your quota](#adjusting-your-quota) | ✓ | ✓ | ✓ | ✓ |
3635
| [Rate limit your events or attachments](#rate-limits) | ✓ | | | ✓ |
3736
| [Review repeated events](#event-repetition) | ✓ | | | |

docs/pricing/quotas/spend-allocation.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
title: "Spend Allocation"
3+
sidebar_hidden: true
34
sidebar_order: 20
45
description: "Learn how to allocate reserved volume to specific projects so that the most important projects are always monitored."
56
---
67

78
<Note>
89

9-
This feature is only available to organizations with a Business or Enterprise plan.
10+
This feature is only available to organizations with an Enterprise plan.
1011

1112
</Note>
1213

docs/pricing/quotas/spike-protection.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ We recommend taking the following steps to manage your spikes:
6666
- Set up [metric alerts](/product/alerts/alert-types/#metric-alerts) for the number of events in a project.
6767
- If a specific release version has caused the spike, add the version identifier to the project's [inbound filters](/pricing/quotas/manage-event-stream-guide/#inbound-data-filters) to avoid accepting events from that release.
6868
- Set up a [pay-as-you-go budget](/pricing/#pricing-how-it-works) to make sure you have time to adjust your volume in the event of a future spike.
69-
- Set up [spend allocations](/pricing/quotas/#spend-allocation) to ensure your critical projects are guaranteed a portion of your reserved volume, even if there are spikes in other projects.
7069

7170
To review the events that were dropped to save your quota with Spike Protection, go to the "Usage Stats" tab of the **Stats** page for your Sentry org and select the event of interest from the "Category" dropdown. You'll be able to see project-level details of your stats by using the project selector.
7271

src/components/dynamicNav.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type Node = {
1010
[key: string]: any;
1111
context: {
1212
[key: string]: any;
13+
sidebar_hidden?: boolean;
1314
sidebar_order?: number;
1415
sidebar_title?: string;
1516
title?: string;
@@ -62,7 +63,11 @@ export const renderChildren = (
6263
return sortPages(
6364
children.filter(
6465
({name, node}) =>
65-
node && !!node.context.title && name !== '' && exclude.indexOf(node.path) === -1
66+
node &&
67+
!!node.context.title &&
68+
name !== '' &&
69+
exclude.indexOf(node.path) === -1 &&
70+
!node.context.sidebar_hidden
6671
),
6772
({node}) => node!
6873
).map(({node, children: nodeChildren}) => {

src/components/sidebar/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ type NavNode = {
203203
context: {
204204
draft: boolean;
205205
title: string;
206+
sidebar_hidden?: boolean;
206207
sidebar_order?: number;
207208
sidebar_title?: string;
208209
};
@@ -215,6 +216,7 @@ const docNodeToNavNode = (node: DocNode): NavNode => ({
215216
title: node.frontmatter.title,
216217
sidebar_order: node.frontmatter.sidebar_order,
217218
sidebar_title: node.frontmatter.sidebar_title,
219+
sidebar_hidden: node.frontmatter.sidebar_hidden,
218220
},
219221
path: '/' + node.path + '/',
220222
});
@@ -300,6 +302,7 @@ function PlatformSidebar({rootNode, platformName, guideName}: PlatformSidebarPro
300302
title: n.frontmatter.title,
301303
sidebar_order: n.frontmatter.sidebar_order,
302304
sidebar_title: n.frontmatter.sidebar_title,
305+
sidebar_hidden: n.frontmatter.sidebar_hidden,
303306
},
304307
path: '/' + n.path + '/',
305308
};

src/types/frontmatter.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ export interface FrontMatter {
3636
*/
3737
notoc?: boolean;
3838

39+
/**
40+
* Set this to true to hide from the sidebar
41+
*/
42+
sidebar_hidden?: boolean;
43+
3944
/**
4045
* The order of this page in auto generated sidebars and grids.
4146
*/

src/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export const splitToChunks = <T>(numChunks: number, arr: T[]): T[][] => {
2929

3030
type Page = {
3131
context: {
32+
sidebar_hidden?: boolean;
3233
sidebar_order?: number;
3334
sidebar_title?: string;
3435
title?: string;

0 commit comments

Comments
 (0)