Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(overlay): Add click to go to editor for audits #9016

Merged
merged 8 commits into from
Nov 8, 2023

Conversation

Princesseuh
Copy link
Member

Changes

Needs withastro/compiler#375

Much like you can go to the editor for xray, now you can for audits.

Testing

Will be tested in a separate PR

Docs

N/A

Copy link

changeset-bot bot commented Nov 7, 2023

🦋 Changeset detected

Latest commit: 3962a6e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Nov 7, 2023
Copy link
Contributor

github-actions bot commented Nov 7, 2023

⚖️ Bundle Size Check

Latest commit: 3962a6e

File Old Size New Size Change
dev-overlay/plugins/audit 14.11 KB 14.43 KB + 320 B

@github-actions github-actions bot added the pr: docs A PR that includes documentation for review label Nov 7, 2023
@@ -24,7 +24,7 @@ const first = defineMiddleware(async (context, next) => {
const response = await next();
const newResponse = response.clone();
const /** @type {string} */ html = await newResponse.text();
const newhtml = html.replace('<h1>testing</h1>', '<h1>it works</h1>');
const newhtml = html.replace('testing', 'it works');
Copy link
Member Author

Choose a reason for hiding this comment

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

So, this is a bit awkward. But since we now add attributes, those kind of naive replacements don't work in dev.

In my humble, informed, opinion, you shouldn't rely on string replaces like this anyway, because whitespaces, minification etc etc could ruin it anyway. Typically, I'd recommend people to use a real tool for this, like https://github.com/cloudflare/lol-html

Copy link
Contributor

Choose a reason for hiding this comment

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

wow, such shade 🌨

@Princesseuh Princesseuh marked this pull request as ready for review November 8, 2023 12:49
@Princesseuh Princesseuh merged commit 1ecc9aa into main Nov 8, 2023
14 checks passed
@Princesseuh Princesseuh deleted the feat/audit-to-editor branch November 8, 2023 14:29
@astrobot-houston astrobot-houston mentioned this pull request Nov 8, 2023
natemoo-re pushed a commit that referenced this pull request Nov 22, 2023
* feat(overlay): Add click to go to editor for audits

* chore: changeset

* chore: update compiler dep

* fix: tests

* Update packages/astro/src/core/compile/compile.ts

Co-authored-by: Bjorn Lu <[email protected]>

* Update packages/astro/src/core/compile/compile.ts

---------

Co-authored-by: Bjorn Lu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants