Problem:
When adding new text format, the form shows empty "Filter processing order".
Solution:
Add a warning message to the table and the use #states to hide it as soon as a filter is selected.
Comment | File | Size | Author |
---|---|---|---|
#30 | Screenshot-After-Patch-30.png | 862.86 KB | Nikhil_110 |
#30 | Screenshot-Befor-Patch-1479210-30.png | 878.51 KB | Nikhil_110 |
#30 | Screenshot-1479210-30.png | 87.68 KB | Nikhil_110 |
#28 | interdiff_26-28.txt | 1.56 KB | Nitin shrivastava |
#28 | 1479210-28.patch | 3.04 KB | Nitin shrivastava |
Issue fork drupal-1479210
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
kika CreditAttribution: kika commentedComment #2
Bojhan CreditAttribution: Bojhan commentedYes, patch please! :)
Comment #3
BrockBoland CreditAttribution: BrockBoland commentedThe attached patch addresses the "Filter processing order" table and labels. The "Filter settings" section uses vertical tabs, so it should probably be fixed in the vertical tabs JS so that the fix applies to everywhere that it's used.
Comment #4
BrockBoland CreditAttribution: BrockBoland commentedI opened #1496552: Vertical tabs visible when empty to address the vertical tabs portion of this.
Comment #5
sunLatest HEAD no longer shows the empty "Filter settings" vertical tabs section when no filter is enabled.
Only the "Filter processing order" table(drag) is visible. Adjusting issue title accordingly.
That said, I'm actually not sure whether it is a good idea to clean this up, because 99.999% of all text formats should have filters applied.
As such, the existence of the empty "Filter processing order" table can also be understood as a hint/clue that "You should enable some filters, my friend."
Comment #6
Wim LeersMarked #949662: Improve text format dialog, perhaps by adding messages when no configurable filters are enabled and #1462744: UX issue when no Enabled filters are selected in the Text formats page as duplicates.
I agree with #5. Ideally, we would make that message explicit though, instead of leaving the UI in a weird state. Because when you create a new text format, it'll look this weird by default, which is not so great.
Comment #7
sunHow about this idea?
Add a UI-only checkbox (no config) that you have to toggle/enable, in order to explicitly save a text format without any filters?
If you don't enable it + try to save sans enabled filters, an error message appears that educates you further.
Comment #8
Bojhan CreditAttribution: Bojhan commented@sun What about a warning? I am not sure people would understand that checkbox, because the checkbox itself doesn't make it insecure?
Comment #9
Wim LeersHow about just using
#states
to disable the "Save" button until >1 filter is activated? (And maybe an accompanying message that is only visible while 0 filters are enabled.)Comment #10
sun#9 sounds nice and simple on the surface, but there are actually use-cases for having a format without any filters. ;)
However, we could use the #states idea and just apply it to a warning message instead? (similar to the tabledrag save warning, but reversed)
Comment #11
Bojhan CreditAttribution: Bojhan commented@sun We could, that sounds pretty nice actually. How do we deal with the "not seeing" it problem? Or is it within the screen scroll here?
Comment #20
catchThis is still an issue. Updating the issue summary and tagging novice.
Comment #26
carolpettirossi CreditAttribution: carolpettirossi at ImageX for Renesas Electronics Corporation commentedI confirm this issue still happens on Drupal 9.5.5.
I couldn't apply the patch provided on #3. So I'm attaching a re-roll for 9.5.x, including the es6 and transpiled JS files.
Comment #27
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #28
Nitin shrivastava CreditAttribution: Nitin shrivastava at OpenSense Labs commentedTry to fix CCF ERROR.
Comment #29
Nikhil_110 CreditAttribution: Nikhil_110 at Srijan | A Material+ Company commentedComment #30
Nikhil_110 CreditAttribution: Nikhil_110 at Srijan | A Material+ Company commentedPatch #26 has been applied successfully for Drupal 9.5.x and I have attached the screenshots as well.
Comment #31
smustgrave CreditAttribution: smustgrave at Mobomo commentedThis needs a test case showing the issue.