-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Sort the Calculations Tab breakdown lists by value #7211
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 Calculations Tab breakdown lists by value #7211
Conversation
There is already a sort by type, but this is not used for a lot of breakdowns. Applying a sort by value should make it easier to read the breakdown without disrupting the sort by type.
Some breakdowns can contain a mix of `number` and `boolean`. e.g. the skill buffs breakdown if you have a golem active will have a `Condition: have golem` with value of `true`. The values in this kind of breakdown are pretty sparse and sorting them in a coherent way is not easy, so for the sake of this PR we can just keep skip(return false) when comparing number and boolean.
If we try to sort on the original modlist, we'll actually change the order of the values in memory and next time we sort again, some of the mods can move position. Using a copy of the table--which will be discarded after use--will prevent this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently doesn't sort the stat requirements for gems
Breakdowns can also accept direct breakdown tables and slots values. These also need to be sorted by value.
|
Yes, the value column on the left in your screenshot is sorted in descending order. Previously it would've been in a random order (it's possible the previous listing looked similar so you didn't notice the change) |
|
Yeah I'm stupid, was expecting alphabetical for some reason. |



There is already a sort by type, but this is not used for a lot of breakdowns. Applying a sort by value should make it easier to read the breakdown without disrupting the sort by type.
Fixes #4433 #7228
Description of the problem being solved:
The calculations breakdown popups are unsorted, making it harder to compare between builds.
Steps taken to verify a working solution:
Before screenshot:
After screenshot: