Skip to content

Commit c5f52c6

Browse files
dcramerAJ
authored andcommitted
feat: Improve Product Guides structure (#2399)
- Expose dropdown for Product navigation - Move all product pages into /product/ - Re-order sidebar to push relevant (vs marketing/discovery) docs to the top
1 parent 0d6f5b0 commit c5f52c6

File tree

125 files changed

+244
-202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+244
-202
lines changed

src/api/permissions.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ If you're building on top of Sentry's API (i.e using [Auth Tokens](/api/auth/)),
77
different API endpoints.
88

99
If you're looking for information on membership roles please visit the
10-
[membership](/accounts/membership/) documentation.
10+
[membership](/product/accounts/membership/) documentation.
1111

1212
### Organizations
1313

@@ -72,6 +72,6 @@ Events in sentry are immutable and can only be deleted by deleting the whole iss
7272

7373
<Alert level="warning" title="Note"><markdown>
7474

75-
Be aware that if you're using `sentry-cli` to [manage your releases](/cli/releases/), you'll need a token which also has `org:read` scope.
75+
Be aware that if you're using `sentry-cli` to [manage your releases](/product/cli/releases/), you'll need a token which also has `org:read` scope.
7676

7777
</markdown></Alert>

src/components/navbar.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import Search from "./search";
77
import SmartLink from "./smartLink";
88
import usePlatform, { usePlatformList } from "./hooks/usePlatform";
99

10+
import NavbarProductDropdown from "./navbarProductDropdown";
11+
1012
type Props = {
1113
platforms?: string[];
1214
};
@@ -21,11 +23,7 @@ export default ({ platforms }: Props): JSX.Element => {
2123
<div className="collapse navbar-collapse content-max" id="navbar-menu">
2224
<Search path={location.pathname} platforms={platforms} />
2325
<Nav className="justify-content-end" style={{ flex: 1 }}>
24-
<Nav.Item>
25-
<SmartLink className="nav-link" to="/product/">
26-
Product
27-
</SmartLink>
28-
</Nav.Item>
26+
<NavbarProductDropdown />
2927
<NavDropdown
3028
title={
3129
currentPlatform ? (
@@ -42,7 +40,7 @@ export default ({ platforms }: Props): JSX.Element => {
4240
"Platforms"
4341
)
4442
}
45-
id="platforms"
43+
id="nd-platforms"
4644
>
4745
{platformList.map(platform => (
4846
<SmartLink
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import React from "react";
2+
import { NavDropdown } from "react-bootstrap";
3+
import { graphql, useStaticQuery } from "gatsby";
4+
5+
import SmartLink from "./smartLink";
6+
import { sortPages } from "~src/utils";
7+
8+
const productNavQuery = graphql`
9+
query ProductNavQuery {
10+
allSitePage(
11+
filter: {
12+
path: { regex: "/^/product//" }
13+
context: { draft: { ne: false } }
14+
}
15+
) {
16+
nodes {
17+
path
18+
context {
19+
title
20+
sidebar_order
21+
}
22+
}
23+
}
24+
}
25+
`;
26+
27+
export default (): JSX.Element => {
28+
const data = useStaticQuery(productNavQuery);
29+
30+
const matches = sortPages(
31+
data.allSitePage.nodes.filter(
32+
n => n.context && n.context.title && n.path.match(/\//g).length === 3
33+
)
34+
);
35+
36+
return (
37+
<NavDropdown title="Product" id="nd-product">
38+
{matches.map(node => (
39+
<SmartLink to={node.path} key={node.path} className="dropdown-item">
40+
{node.context.title}
41+
</SmartLink>
42+
))}
43+
</NavDropdown>
44+
);
45+
};

src/components/sidebar.tsx

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,31 @@ export const Sidebar = ({ data }: ChildProps): JSX.Element => {
4444
root="product"
4545
title="Product"
4646
tree={tree}
47-
exclude={["/product/integrations/"]}
47+
exclude={[
48+
"/product/integrations/",
49+
"/product/cli/",
50+
"/product/security/",
51+
"/product/accounts/",
52+
"/product/relay/",
53+
]}
54+
/>
55+
<DynamicNav
56+
root="product/accounts"
57+
title="Account Management"
58+
tree={tree}
59+
/>
60+
<DynamicNav root="product/relay" title="Relay" tree={tree} />
61+
<DynamicNav root="product/cli" title="sentry-cli" tree={tree} />
62+
<DynamicNav
63+
root="product/security"
64+
title="Security and Legal"
65+
tree={tree}
4866
/>
4967
<DynamicNav
5068
root="product/integrations"
5169
title="Integrations"
5270
tree={tree}
5371
/>
54-
<DynamicNav root="accounts" title="Account Management" tree={tree} />
55-
<DynamicNav root="cli" title="sentry-cli" tree={tree} />
56-
<DynamicNav root="meta" title="Security and Legal" tree={tree} />
5772
<li className="mb-3" data-sidebar-branch>
5873
<div
5974
className="sidebar-title d-flex align-items-center mb-0"

src/docs/cli/index.mdx

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/docs/clients/javascript/sourcemaps.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Most of the process is the same whether you're using this SDK or the [new unifie
1414

1515
## Specify the release in Raven.js {#specify-the-release-in-raven-js}
1616

17-
If you are uploading source map artifacts yourself, you must specify the release in your Raven.js client configuration. Sentry will use the release name to associate digested event data with the files you’ve uploaded via the [releases API](/api/releases/), [sentry-cli](/cli/) or [sentry-webpack-plugin](https://github.com/getsentry/sentry-webpack-plugin). This step is optional if you are hosting source maps on the remote server, but still recommended.
17+
If you are uploading source map artifacts yourself, you must specify the release in your Raven.js client configuration. Sentry will use the release name to associate digested event data with the files you’ve uploaded via the [releases API](/api/releases/), [sentry-cli](/product/cli/) or [sentry-webpack-plugin](https://github.com/getsentry/sentry-webpack-plugin). This step is optional if you are hosting source maps on the remote server, but still recommended.
1818

1919
```javascript
2020
Raven.config("your-dsn", {

src/docs/clients/react-native/codepush.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ $ export SENTRY_PROPERTIES=./ios/sentry.properties
3535
$ sentry-cli react-native appcenter YourApp ios ./build/codePush
3636
```
3737

38-
Exporting the `SENTRY_PROPERTIES` will tell sentry-cli to use the properties in your project. Alternatively, you can either pass it via parameters or a global settings file. To find more about this refer to [Working with Projects](/cli/configuration/#sentry-cli-working-with-projects).
38+
Exporting the `SENTRY_PROPERTIES` will tell sentry-cli to use the properties in your project. Alternatively, you can either pass it via parameters or a global settings file. To find more about this refer to [Working with Projects](/product/cli/configuration/#sentry-cli-working-with-projects).

src/docs/enriching-error-data/breadcrumbs.mdx

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Account Management
3+
sidebar_order: 2000
4+
---
5+
6+
<PageGrid />

0 commit comments

Comments
 (0)