Pathoschild / StardewMods

Mods for Stardew Valley using SMAPI.
MIT License
712 stars 380 forks source link

[Lookup Anything] Only count revealed elements when deciding whether to collapse a list #1025

Closed blahpers closed 1 month ago

blahpers commented 3 months ago

Recommendation: List collapsibility limits should only count revealed elements. At most, the "show ### results" should only contribute a small amount toward the collapsibility limit.

For example, when viewing a villager's gift tastes with the "Show unknown gift tastes" option unchecked, the limit for collapsing large fields should only respect known gift tastes.

Rationale: Collapsing list items is invaluable for preventing UI clutter by enabling the user to "opt in" to the info dump they want to see. This doesn't really apply when the uncollapsed view is still within readable limits. It is not terribly helpful from a usability standpoint on Year 1 Spring 7 to see a see "Likes gifts: show 648 results" on a villager's information screen only to click "show 648 results" and see "Pizza, 647 unrevealed items".

Reproduction Steps Exact steps which reproduce the bug, if possible. For example:

  1. Open Lookup Anything's mod configuration screen using Generic Mod Configuration Manager.
  2. Uncheck "Show unowned gifts".
  3. Check "Collapse large fields".
  4. Set "NPC lookup: gift tastes" to 10.
  5. Start a new save.
  6. Wait until 12:00 pm.
  7. Purchase a Salad from Gus.
  8. Talk to Pierre.
  9. Give Pierre the Salad.
  10. Bring up the Lookup Anything lookup window for Pierre.

Expected Behavior "Likes gifts" shows "Salad, # unrevealed items", where # is the total number of gifts Pierre likes minus one.

Actual Behavior "Likes gifts" shows a link with the text "show # results", where # is the total number of gifts Pierre likes. Clicking the link replaces it with "Salad, # unrevealed items", where # is the total number of gifts Pierre likes minus one.

Screenshots If applicable, add screenshots to help explain your problem. image image

Pathoschild commented 1 month ago

Fixed via #1031 for the upcoming Lookup Anything 1.46.0. Thanks for the help!