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

Descriptive image error #9352

Merged
merged 6 commits into from
Dec 19, 2023
Merged

Conversation

tmcw
Copy link
Contributor

@tmcw tmcw commented Dec 6, 2023

Changes

Right now, if you have an image in your site that is too big, you get a message saying that an image was too big, but not which one. This PR improves the error so that it tells you which one.

Testing

I really don't know how to test this, tbh - I'd probably use npm link but I don't know how that'd work with pnpm.

Docs

This doesn't need docs: it's just an improved error.

Copy link

changeset-bot bot commented Dec 6, 2023

🦋 Changeset detected

Latest commit: 8ce1e2a

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 pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Dec 6, 2023
@jacobdalamb
Copy link
Contributor

I believe pnpm link is a thing

@florian-lefebvre florian-lefebvre requested review from FredKSchott and removed request for sarah11918 December 18, 2023 18:45
.changeset/famous-cars-sell.md Outdated Show resolved Hide resolved
@Princesseuh Princesseuh removed the request for review from FredKSchott December 19, 2023 05:55
@ematipico
Copy link
Member

@tmcw how did you test your changes? I mean, how did you make sure you could see the new errors?

Regardless, here's a suggestion: run pnpm build inside the astro package , create a new astro project on your machine, inside your new astro project run pnpm link ../astro/packages/astro (fix the path, but you want to link the built and local version of your astro), then run your project in dev mode and try to recreate the errors.

Take screenshots to show us the results.

@Princesseuh
Copy link
Member

I redid pretty much the entire PR (with the same idea). I tested it manually, here's the result:

Before:
image

After:
image
(highlighted caused by accident in my terminal, it shows normally.)

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Just tiny adjustments! Great error message!

packages/astro/src/core/errors/errors-data.ts Outdated Show resolved Hide resolved
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
@Princesseuh Princesseuh merged commit f515b14 into withastro:main Dec 19, 2023
13 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Dec 19, 2023
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.

"Input image exceeds pixel limit" error is too vague
6 participants