Skip to content

Mod list fixes and improvements#3883

Merged
HebaruSan merged 1 commit into
KSP-CKAN:masterfrom
HebaruSan:fix/autoinst-col-visible
Aug 18, 2023
Merged

Mod list fixes and improvements#3883
HebaruSan merged 1 commit into
KSP-CKAN:masterfrom
HebaruSan:fix/autoinst-col-visible

Conversation

@HebaruSan
Copy link
Copy Markdown
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
@HebaruSan HebaruSan requested a review from techman83 August 17, 2023 19:35
Copy link
Copy Markdown
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
@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