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

Mod list fixes and improvements #3883

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

HebaruSan
Copy link
Member

Problems

  • If you have no mods installed, the Auto-installed column is still displayed even though it serves no purpose:
    image
  • A Discord user confused himself by scrolling the mod list to the right and forgetting that the checkbox to install a mod had scrolled off the edge of the grid:
    image

Causes

  • This column's visibility was managed in multiple places, and they conflicted with one another; an older one was hiding the Auto-installed column while a newer one was unhiding it
  • The checkbox columns are small but essential UI elements, so allowing them to scroll out of view has more disadvantages than advantages

Motivation

We have a very old TODO item here:

//TODO This would be a good place to have an event that alters the row's graphics to show it will be removed

This is not a very good place for it (it would be architecturally better for this class to be a pure data model, and this function could be called with a changeset that isn't meant to be applied to a grid), but the idea makes sense because showing users which mods will be removed could be helpful.

Changes

  • Now column visibility management is consolidated and cleaned up such that the Auto-installed column is hidden if no installed mods are visible:
    image
  • Now the mod list's checkbox columns are frozen at the left, so they'll always be visible even if you scroll to the right:
    image
  • Now when your changeset includes removing some mods (including user-selected, removed due to missing dependencies, and removed due to no longer being needed), they will be shown with a strikeout font on the main mod list:
    image
  • Another TODO regarding ModList.HandleTooManyProvides is resolved by deleting that delegate definition, which is no longer in use

Freeze checkbox columns at left
Hide Auto-installed column if no installed mods visible
Strikeout font for mods to be removed
Eliminate some unnecessary work
Improve encapsulation of ModList
@HebaruSan HebaruSan added Bug Something is not working as intended Enhancement New features or functionality GUI Issues affecting the interactive GUI labels Aug 17, 2023
Copy link
Member

@techman83 techman83 left a comment

Choose a reason for hiding this comment

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

Awesome, thanks @HebaruSan

@HebaruSan HebaruSan merged commit b361b38 into KSP-CKAN:master Aug 18, 2023
10 checks passed
@HebaruSan HebaruSan deleted the fix/autoinst-col-visible branch August 18, 2023 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Enhancement New features or functionality GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants