Skip to content

Conversation

@c298lee
Copy link
Contributor

@c298lee c298lee commented Dec 12, 2024

Product docs for the dev toolbar

Fixes #12097

@vercel
Copy link

vercel bot commented Dec 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 5:07pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview Dec 16, 2024 5:07pm
develop-docs ⬜️ Ignored (Inspect) Visit Preview Dec 16, 2024 5:07pm

@codecov
Copy link

codecov bot commented Dec 12, 2024

Bundle Report

Changes will increase total bundle size by 1.8kB (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 10.35MB 1.81kB (0.02%) ⬆️
sentry-docs-client-array-push 9.27MB 6 bytes (-0.0%) ⬇️

Copy link
Contributor

@drguthals drguthals left a comment

Choose a reason for hiding this comment

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

Left comments throughout

}
```

[MockFeatureFlagIntegration.tsx](https://github.com/getsentry/sentry-toolbar/blob/301c31d561a81e3fd8ffc9532aad3a60af685916/src/env/demo/MockFeatureFlagIntegration.tsx) is an example adapter to use as a reference.
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels like it needs to be above the interface but I can't think of how I would word it.

```html
<script src="https://browser.sentry-cdn.com/sentry-toolbar/latest/toolbar.min.js"></script>
```
It is recommended that you add the script tag at the bottom of the page so it doesn’t block other critical JavaScript.
Copy link
Contributor

@coolguyzone coolguyzone Dec 13, 2024

Choose a reason for hiding this comment

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

Since placement is important, can we be a little more specific here? Should it be at the body of the <Body> element?

</html>
```

### Unmounting The Toolbar
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a little confused by this, why would you want to mount the toolbar and then later unmount it on the same page? Am I misunderstanding this? Is there a brief use case we can provide to illustrate when you would want to do this?

</script>
```

## Init Configuration Fields
Copy link
Contributor

Choose a reason for hiding this comment

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

In other parts of the docs I've more commonly seen these referred to as 'options', should we stick to that convention here? I'm also open to 'fields' being the correct term, if that's the case we should update other docs to maintain consistency.

@lizokm Do you have any thoughts on 'fields' vs 'options'?

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've changed it to 'options' to stick with the convention

| ----- | ----- | ----- | ----- |
| `organizationSlug` | `string` | The organization that users should login to. For example \'acme\' | *Required Value* |
| `projectIdOrSlug` | `string \| number` | The project for which this website/webapp is associated. | *Required Value* |
| `environment (optional)` | `string \| string[] \| undefined` | The environment of this deployment. Used to narrow search results in the Toolbar UI. Set to `undefined` or `""` or `[]` if you want to see results from all environments. | `undefined` |
Copy link
Contributor

@coolguyzone coolguyzone Dec 13, 2024

Choose a reason for hiding this comment

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

Suggested change
| `environment (optional)` | `string \| string[] \| undefined` | The environment of this deployment. Used to narrow search results in the Toolbar UI. Set to `undefined` or `""` or `[]` if you want to see results from all environments. | `undefined` |
| `environment (optional)` | `string \| string[] \| undefined` | The environment of this deployment. Used to narrow search results in the Toolbar UI. Set to `undefined` or `""` or `[]` if you want to see results from all environments. | `undefined` |

Do we need to share all the different ways to set this to see results for all environments here('undefined', '""', or '[]')? It would simplify things if we just picked one.

Copy link
Contributor

@coolguyzone coolguyzone left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! Added some suggestions, looks good to me 🥳

@c298lee c298lee merged commit 678659d into master Dec 16, 2024
11 checks passed
@c298lee c298lee deleted the cl/toolbar-docs branch December 16, 2024 17:29
@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DevToolbar] Create new docs pages for the Toolbar

7 participants