flamewave000 / dragonflagon-fvtt

DragonFlagon FoundryVTT Modules
BSD 3-Clause "New" or "Revised" License
64 stars 59 forks source link

DF Settings Clarity: searching reveals extremely long text descriptions for every setting #418

Open teranian opened 1 year ago

teranian commented 1 year ago

Module DF Settings Clarity v3.3.0

Describe the issue When I enter a fuzzy keyword search, the results settings list loads a very long block of text that repeats for each setting in the same module. It makes reading the settings list quite difficult for modules with very long fields. The long text remains even after the search field has been cleared.

To Reproduce Steps to reproduce the behavior:

  1. Go to Module Settings
  2. Enter a search term in top left corner
  3. Clear the search field
  4. Browse settings

Expected behavior A clear and concise description of the individual setting, rather than the massive wall of text.

Screenshots (Optional)

Before searching: image

After searching: image

After clearing the search input: image

Other examples: image image

image

cs96and commented 1 year ago

Seeing this too. It seems to be a bad interaction with Tidy UI. If either DF Settings Clarity or Tidy UI are disabled, then the problem goes away.

teranian commented 1 year ago

The workaround i've found is to do the search then re-open the settings window. It seems to reload the proper text descriptions.

  1. Search for the setting as in the original post
  2. Click on the right nav to open the settings window again
cs96and commented 1 year ago

I've found the cause of this. It's because Tidy UI adds a "module-settings-wrapper" element around all the settings for a module...

image

DF Settings finds .categories > .scrollable, then loops through the grandchildren of that element. If Tidy UI is installed, then it finds the wrong elements, and ends up concatenating the notes of all the settings for a module into one big wall of text.

The solution is to find .form-groups in the children of .categories > .scrollable instead.