iquercorb / OpenModMan

Open Mod Manager - Open source and generic Mod ("Modifications") manager.
GNU General Public License v3.0
88 stars 5 forks source link

[Suggestion] Right logic for dependencies #87

Closed lmiol closed 2 months ago

lmiol commented 2 months ago

Currently, when installing a mod that has a dependency, the required dependent mod is also installed, which is good and expected. However, the dependency should be marked with a blue checkmark instead of a green one. If I uninstall the current mod that has the dependency, the dependency should also be automatically removed.

Detailed Case Scenarios

Let's consider the following scenarios:

Scenario 1:

  1. Installation: If I click on the installation of Mod 2, both Mod 1 and Mod 2 are installed, but a blue checkmark is placed on Mod 1.
  2. Uninstall: When I click "Uninstall" on Mod 2, a check is performed to see if there are any other mods that depend on Mod 1.
    • Dependency Exists: If another mod depends on Mod 1, the blue checkmark on Mod 1 remains.
    • No Dependency: If there are no other dependencies, a notification appears: "Deletion dependency."
      • Delete: If I click "Delete," Mod 1 is uninstalled, and the blue checkmark is automatically removed.
      • Keep: If I click "Keep," the dependency remains but with green checkmark

Scenario 2 (Opposite Case):

  1. Installation: I install Mod 1 manually, a green checkmark is placed on it.
  2. Installation: I install Mod 2. A green checkmark is replaced by blue one on Mod 1, and a green checkmark is placed on Mod 2.

English isn't my native so here is steps on screens for Scenario 1 image

Reason for the Improvement

Currently, if I uninstall the main mod, the dependent mod remains installed. I didn't install the dependent mod myself (it was pulled in automatically), so I might not remember why it's there. For dependencies, there should be an option to uninstall them alongside the main mod, but only if no other mod is using that dependency.

I think this feature for User-friendliness This feature is a low priority, i think. But it significantly improves the user experience by making dependency management more intuitive and streamlined.

Dependencies were tested on version 1.2.7

Regards

iquercorb commented 2 months ago

Currently, if you uninstall a Mod that has "children" dependant Mods, it also uninstall dependant Mods (after warning you). What is not done automatically by default is the opposite, when you uninstall a "children" Mod that requiere another "parent" Mod to be installed. This because a "parent" mod can be standalone and can work without "dependant" mods.

Anyway, there is currently a special "Clean uninstall" command that perform what you ask, in this case if tou "Clean uninstall" a "child" Mod, the "parent" dependencies are also checked and uninstalled if, and only if, there is no other dependant "child" mod installed. I admit the "Clean uninstall" denomination is not very clear, I am open to suggestion.

I keep the idea of the "blue check" (or another color) to signal that a mod is dependant "child" of another.

lmiol commented 2 months ago

Yes, Clean Uninstal is what i thought it about, but i dont knew about before you said. Thx. Now i know ho to delete with dependent files. But in everyday using as user scenario i do just double clicks on mods what i want to install/uninstall. I dont remember what mods have depencies to make Clean Uninstall. And first time i did not notice icon of depencies on box. So this suggestion just do some userfriendly experience for fast double click using. And as i said this suggestion very very low priority =) I made it just to not forget =)

PraetorAugustus commented 2 months ago

Anyway, there is currently a special "Clean uninstall" command that perform what you ask, in this case if tou "Clean uninstall" a "child" Mod, the "parent" dependencies are also checked and uninstalled if, and only if, there is no other dependant "child" mod installed. I admit the "Clean uninstall" denomination is not very clear, I am open to suggestion.

Ah! I didn't know this either. For now, you could probably add a Tool Tip on hover: "Clean Uninstall removes parent and all dependent mods."

I'll think about what to call it that makes sense in English. (I'm a native-speaker.) Maybe "Complete Uninstall" with a Tool Tip like "Parent + Dependent Mods"?

I'll keep thinking...

I keep the idea of the "blue check" (or another color) to signal that a mod is dependant "child" of another.

I agree, it's a good idea. Simple but effective.

iquercorb commented 2 months ago

Added new status icons, blue check for properly installed Mod with dependencies, orange check for installed Mod with missing dependencies. Changed contextual menu text to "Complete Uninstall (clean dependencies)" and added channel's option to perform Complete Uninstall as default action (double-click on Mod).

lmiol commented 2 months ago

I tested version 1.2.8.

  1. The green icon and blue icon on dependency mods should be swapped with each other because green represents the main mods that I installed. (Blue is not the one I chose; it was installed automatically.) I can explain also as "Green main mods, what i installed, blue is depedency mods"

  2. Also, consider the logic of what I mentioned. Currently in 1.2.8 we have the following negative user scenario: 1) I installed mod1 with dependency mod2. 2) I uninstalled mod1 that I had previously installed As a result, we are left with mod2, which I did not choose, and I don't know why it is there

https://github.com/sedenion/OpenModMan/assets/264879/29d36fa0-4dd7-4243-856e-e3dfeca09d33