visdesignlab / upset2

UpSet - Visualizing Intersecting Sets
https://upset.multinet.app/
BSD 3-Clause "New" or "Revised" License
43 stars 7 forks source link

Sort By Set #358

Closed JakeWags closed 4 months ago

JakeWags commented 5 months ago

Does this PR close any open issues?

Closes #146

Give a longer description of what this PR addresses and why it's needed

This PR adds the ability to sort the UpSet plot by a set, aka, bringing a set to the top. See #113 for example context menu for sets.

The implemented behavior is based on the original Upset behavior here: http://vcg.github.io/upset/

This PR also removes any reference to the SortBy type, as this is only a string alias.

Provide pictures/videos of the behavior before and after these changes (optional)

BEFORE: upset-sortbyset-before

AFTER: upset-sortbyset-after

Have you added or updated relevant tests?

Have you added or updated relevant documentation?

Are there any additional TODOs before this PR is ready to go?

TODOs:

netlify[bot] commented 5 months ago

Deploy Preview for upset2 ready!

Name Link
Latest commit 0ccfdf94d3b12b9a96f393aee0fcaeedbf4ce452
Latest deploy log https://app.netlify.com/sites/upset2/deploys/664239d80da9b10008d3b031
Deploy Preview https://deploy-preview-358--upset2.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

JakeWags commented 5 months ago

One point of discussion here is that I'd like to add tests for UpSet plot interactions such as aggregate, sort, etc; however, it doesn't seem like there is a good way to determine the order of the subsets on the plot, as their selectors are based on the position. Maybe adding an HTML id to each rendered row could be the solution to this.

JakeWags commented 5 months ago

One point of discussion here is that I'd like to add tests for UpSet plot interactions such as aggregate, sort, etc; however, it doesn't seem like there is a good way to determine the order of the subsets on the plot, as their selectors are based on the position. Maybe adding an HTML id to each rendered row could be the solution to this.

Addressed in https://github.com/visdesignlab/upset2/pull/358/commits/ab1a972bca924cc60ddf9eca412d1375a727c14c