fix(astro): Fix misleading documentation example#16113
fix(astro): Fix misleading documentation example#16113Lms24 merged 4 commits intogetsentry:masterfrom
Conversation
Astro won't compile if this is not present. It is essential to tell Astro compiler not to minify or manipulate this script to preserve names reference in the buttons onclick handlers.
|
@pawelgrzybek is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
|
||
| ```html {filename: test.astro} | ||
| <script> | ||
| <script is:inline> |
There was a problem hiding this comment.
@Lms24 - is this right, or should we refactor this section to point people to use addEventListener instead?
There was a problem hiding this comment.
Yes, you are right @sfanahata this also gave me some issues down the line. I would suggest to change it to good old ids or classes, document.gerElementById or querySelector. I'm happy to do that.
There was a problem hiding this comment.
Hey @pawelgrzybek ids sound reasonable to me. Would you be up to make that change? Also thanks for letting us know about is:inline. Tbh, I didn't know about this when writing those docs intially.
There was a problem hiding this comment.
That should do, changes made.
@Lms24 better for you that you didn't know about it. It not the best practice as this one inlines script as is, so youre loosing all the optimisations that astro can do for ya (obfuscation, minification etc).
There was a problem hiding this comment.
Thanks! Last request: There's another code snippet underneath to verify tracing. Could you make the same changes so that we're aligned? Thanks a bunch!
Astro won't compile if this is not present. It is essential to tell Astro compiler not to minify or manipulate this script to preserve names reference in the buttons onclick handlers. <!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR It fixes misleading code snippet that causes Astro builds to fail. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
Astro won't compile if this is not present. It is essential to tell Astro compiler not to minify or manipulate this script to preserve names reference in the buttons onclick handlers.
DESCRIBE YOUR PR
It fixes misleading code snippet that causes Astro builds to fail.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
LEGAL BOILERPLATE
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
EXTRA RESOURCES