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

Let admins control ordering of featured mods #505

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

HebaruSan
Copy link
Contributor

Motivation

@cheese3660 has been helping to admin KSP2 and gave some feedback that it would be good to be able to control the ordering of featured mods. Currently the most recently featured mod always sorts to the front of the list, so some reordering could be done by de-featuring and re-featuring mods in the desired order, but that would be extremely cumbersome.

Changes

Now left and right chevrons (with explanatory tooltips) can be clicked to move a mod around in the featured list:

image

On the back end, the featured table now has a priority column that holds each featured mod's position within the featured list. This is a per-game, non-negative integer that is incremented by the left chevron and decremented by the right chevron. Existing featured mods' priorities will be defaulted based on the current ordering. A newly featured mod is given the highest priority (as it works today) and can then be moved around in the list. De-featuring a mod decrements each higher priority by 1 to close gaps in the list.

@HebaruSan HebaruSan added Area: Backend Related to the Python code that runs inside gunicorn Priority: Normal Type: Feature Status: Ready Area: Frontend Related to HTML, JS, CSS, or other browser things Area: Migration Related to Alembic database migrations Scope: Medium Moderately complex changes requiring non-trivial time and effort to develop and review labels Jan 3, 2024
@HebaruSan HebaruSan merged commit ff03fdf into KSP-SpaceDock:alpha Jan 3, 2024
3 checks passed
@HebaruSan HebaruSan deleted the feature/featured-sort branch January 3, 2024 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Backend Related to the Python code that runs inside gunicorn Area: Frontend Related to HTML, JS, CSS, or other browser things Area: Migration Related to Alembic database migrations Priority: Normal Scope: Medium Moderately complex changes requiring non-trivial time and effort to develop and review Status: Ready Type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant