Skip to content

Conversation

@stramel
Copy link
Contributor

@stramel stramel commented Nov 23, 2024

Changes

This fixes the id generation for sprite icons. The previous implementation only ever generated one id per page. This caused the first icon to be used for all icons. Instead we need to increment on each unique icon.

I was able to accomplish this by checking if a component had rendered already and generating a new id if it hadn't. This now stores the full id per page.

Before

image

After

image

Testing

There were a few issues with the previous tests that I have addressed. I also updated the test to ensure that the ids are all unique which I should have asserted previously.

Docs

No docs necessary.


I can't request reviewers but wanted to tag @ematipico, @natemoo-re and @bluwy since this was related to the changes requested and committed to my previous branch. #12067 (comment)

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Nov 23, 2024
@changeset-bot
Copy link

changeset-bot bot commented Nov 23, 2024

🦋 Changeset detected

Latest commit: ddcd3c9

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

@stramel stramel marked this pull request as ready for review November 23, 2024 03:01
@ematipico ematipico merged commit d023682 into withastro:next Nov 23, 2024
13 checks passed
@stramel stramel deleted the fix-sprite-ids branch November 23, 2024 16:18
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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants