Skip to content

chore: bunch registration of pseudoselectors#9684

Merged
wisniewskij merged 4 commits into
mainfrom
@wisniewskij/pseudoselectors-default-props-refactor
Jun 17, 2026
Merged

chore: bunch registration of pseudoselectors#9684
wisniewskij merged 4 commits into
mainfrom
@wisniewskij/pseudoselectors-default-props-refactor

Conversation

@wisniewskij

@wisniewskij wisniewskij commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR changes the way we call registration of the pseudoselectors. Previously we would pass default styles alongside "result" styles - so defaults would be provided by selector. This is bad because it can lead to redundancy - if we have a few pseudoselctors controlling one prop, we send the defaults a few times even though they are the same. Also previously registering a few pseudoselectors on a single tag would recompute the final styles for each of those.

After changes we support batch registration of pseudoselectors per tag - single defaults object per tag + a single pass of a list of result styles from js instead of many smaller calls.

Test plan

There should be no change in behavior in comparison to the previous implementation.

@MatiPl01 MatiPl01 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

@wisniewskij
wisniewskij added this pull request to the merge queue Jun 17, 2026
Merged via the queue into main with commit 6552512 Jun 17, 2026
18 checks passed
@wisniewskij
wisniewskij deleted the @wisniewskij/pseudoselectors-default-props-refactor branch June 17, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants