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

Add remove buttons for mod entries in custom preset lists #30357

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

CloneWith
Copy link
Contributor

Changes

To make it easier for users to remove unwanted mods in a custom mod preset.

Preview

  • Add remove buttons to the left of a mod entry, with a static tooltip
  • Block removing action and make the entry flash red when there is only one mode left in a preset

By the way should we consider add a Use current mods in the context menu? Thus we don't need to open the editor popup to apply mods to a preset.

Known Problems

  • Since we pass a fixed hashset to the mod row, it's unable to change the state of the remove button. I'm considering using a Bindable<Hashset<Mod>> for that.
  • The use of LocalisableString for tooltip text is being considered.

@bastianpedersen
Copy link
Contributor

The use of LocalisableString for tooltip text is being considered.

This is not even negotiable. It needs to be localised.

@bdach
Copy link
Collaborator

bdach commented Oct 21, 2024

Before we go too far into bikeshedding here I kind of don't get why this feature exists.

  • Is remaking / editing a preset really such an issue that this is required to exist? The "Use current mods" button exists, what's the point?
  • Why is removing mods made explicitly easier? Adding mods to a preset is still as cumbersome as it presumably was before. Why distinguish removal? Why introduce such asymmetry between the two operations?

@CloneWith
Copy link
Contributor Author

CloneWith commented Oct 21, 2024

Before we go too far into bikeshedding here I kind of don't get why this feature exists.

I could say for sure that it's here for yielding to the current version of preset popup design, since I tried not to modify that if not necessary.

My idea is that if the popup can be built into the preset list (or just add an entry to the context menu, as I've stated above), it should relieve the asymmetry problem.

Or if possible, we can also add a popup just for adding mods, for summetry, but I think that's going too far.

Why introduce such asymmetry between the two operations?

This is not introduced, just presented. Removing a mod entry is considerably easier than adding and modifying one in current context, until we change that.

@bdach
Copy link
Collaborator

bdach commented Oct 21, 2024

You still haven't told me why the current methods of doing this (either remaking the preset, or clicking "Use current mods") are insufficient or inadequate. I'd like the answer to that before considering this feature on merit.

@CloneWith
Copy link
Contributor Author

CloneWith commented Oct 21, 2024

You still haven't told me why the current methods of doing this (either remaking the preset, or clicking "Use current mods") are insufficient or inadequate. I'd like the answer to that before considering this feature on merit.

Weird positioning of the popup

  1. Due to the nature of popups, it disappears upon losing focus (e.g. cursor clicking outside the popup area), making it impossible to change the mod combination and the name / description at the same time (I, maybe other users, want to do this). Currently to achieve this we need to: adjust the mods first -> open the edit popup -> click use current mods and change the texts.
  2. Popups move with the preset entry without animation, even when the entry is out of screen of at a random weird position (even with animations it won't help much whatsoever, it just feels stuck somewhere), see the picture above.
  3. Blaming the interaction logic above, we are unable to create a preset from the start (i.e. get the name and description written first, then the mods. This is disabled), or consider creating a copy of an existing preset (would be good if we add that later).

From my perspective, I really hope that we can remake the preset UI first, which can help directly resolve the problems above. Then this PR can also be taken into account if possible.

@bdach
Copy link
Collaborator

bdach commented Oct 21, 2024

None of the problems you mention have anything to do with being able to delete a mod from the popover. I dunno why you'd want point (1), but I suppose it's not for me to decide; point (2) is borderline a bug that this change does nothing about, and for point (3) I'm not sure why you'd need to start a preset by typing in the name, and creating a copy is easy enough as just selecting the preset you want to copy, then doing whatever you need to do to the selected mods, and then saving the result to a new preset.

I dunno this feels fixing an issue nobody should have. @peppy your thoughts on this thing? I'd say we don't want it.

@peppy
Copy link
Member

peppy commented Oct 22, 2024

I don't see any harm in having it if the complexity overhead is minimal, but also not sure it's required. Since there's already a button explaining how to update the preset, I'd hope that most users can figure out how to remove mods using the existing flow.

Additionally, I see less value in adding a "remove" button if there's not also an "add" button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants