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

Sort the classes that appear in attribution selectors to reduce cardinality #518

Merged
merged 6 commits into from
Sep 27, 2024

Conversation

tunetheweb
Copy link
Member

@tunetheweb tunetheweb commented Aug 12, 2024

Fixes #514

Adding this to v5 branch due reasons given in #514 (comment)

src/lib/getSelector.ts Outdated Show resolved Hide resolved
src/lib/getSelector.ts Outdated Show resolved Hide resolved
@tunetheweb
Copy link
Member Author

We really need unit tests for this...

@philipwalton
Copy link
Member

We really need unit tests for this...

I was just going to add that we should have a test for this behavior.

Copy link
Member

@philipwalton philipwalton left a comment

Choose a reason for hiding this comment

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

Coming back to this PR. I think there are still two things that need to be address before we can merge:

  1. Address the open comment to shorten/simplify the selector generation logic.
  2. Update the tests to include some cases where there are classes out of order that get properly ordered when the tests are run.

@philipwalton
Copy link
Member

I decided to just add them because I wanted to look at this code for some other v5 PRs as well.

@philipwalton philipwalton changed the title Sorted class list in getSelector() to reduce duplicated selectors Sort the classes that appear in attribution selectors to reduce cardinality Sep 27, 2024
@philipwalton philipwalton merged commit ffa8ed5 into v5 Sep 27, 2024
6 checks passed
@philipwalton philipwalton deleted the sorted-class-list branch September 27, 2024 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants