- Issue created by @Anybody
- π¨π¦Canada star-szr
Hi, first of all thanks for writing this up! I really appreciate you taking the time to do this.
The UI of this module was loosely inspired by https://www.drupal.org/project/stringoverrides β , however this pattern of always having an empty row to fill out probably shows up in other places too. I didn't study this to see if it's a "good" pattern or not, just trying to follow what I see and make a smooth user experience. After reviewing their interface again, I realize I may have missed one important bit of UI/UX polish, more on that below.
With stringoverrides you always get an extra row at the bottom of the form to fill in new overrides, and that is the intention here too. However, the two modules do have some key differences in this aspect:
1. We have the preset set of filters that you always start with when configuring this plugin on a new text format, whereas with stringoverrides you start with a blank slate (and one empty row). With our module if you remove all the pre-configured filters and save, you will also end up with one empty row.
2. With stringoverrides the "Replacement" box is hidden until you enter some text in the "Original" box. This is the bit of polish that I think we are currently missing.I think we have some options, of course aside from doing nothing:
A. Don't add the empty row when there are filters configured already. Users will need to click the "Add another filter" button to add more filters.
B. Only show the "Replacement" box if there is text in the "Search expression" input box.We also could do both. After thinking about it, I definitely want to at least do B, but I'm still not sure about whether to do A. I think B also has the added benefit of making the process of deleting filters a little bit more discoverable.
What do you think?
For the record, the empty filter never gets saved into config, so therefore never gets executed on paste. We also have form validation that the search pattern must be filled out and automated tests (Nightwatch) to cover most of what I have described.
- π©πͺGermany Anybody Porta Westfalica
Thank you very much @star-szr. From my perspective, definitely A.
I wouldn't invest time in B, but I think it's also fine.The reason for A is, that there are already many good defaults and adding custom selectors won't happen in most cases. And if you need it, you'll want to click the button to explicitly add a new line. The empty row is just confusing, I think.
- π¨π¦Canada star-szr
Thanks for your thoughts @Anybody! Restructuring the issue relationships for now, unless/until we create an overarching UX βPlanβ issue.
-
star-szr β
committed 3bc9838c on 1.0.x
fix: remove empty filter row when there are filters configured Fixes: #...
-
star-szr β
committed 3bc9838c on 1.0.x
- Status changed to Fixed
over 1 year ago 12:26am 22 August 2023 Automatically closed - issue fixed for 2 weeks with no activity.