Skip to content
This repository was archived by the owner on Aug 10, 2025. It is now read-only.

Sorting#42

Open
melon164 wants to merge 2 commits into
Jacudibu:mainfrom
melon164:sorting
Open

Sorting#42
melon164 wants to merge 2 commits into
Jacudibu:mainfrom
melon164:sorting

Conversation

@melon164

Copy link
Copy Markdown

This refactors the sort implementation a little to:

  1. Support sorting by category, and set that as the default on the Base Planner screen
  2. Sort the inputs/outputs list on base planner screen and resort whenever a recipe is added/removed (previously materials were sorted by the first recipe left-to-right that they appeared in)
  3. Sort the production tables on the Empire View screen by category

I copied my changes from my working copy into Github via the Github web editor, so I hope it still builds! Lmk if there's any code style I should be following.

@Jacudibu

Jacudibu commented Nov 29, 2022

Copy link
Copy Markdown
Owner

Me likey!

But adding the Category column causes the values in the rows to not align properly with their columns anymore.
I'd propose to either add a margin as a quick fix (tho that might cause numbers to be squished), or, requiring some more work, I wonder if it would be better to have the sort-mode as a dropdown (or, well, two dropdowns to also select ascending/descending separately) somewhere, that'd also help to make it more obvious which sorting is currently active. It could then also be reused in the empire overview to manually select the preferred sorting mode there as well. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants