-
Notifications
You must be signed in to change notification settings - Fork 38
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
[UX] move text filter configuration into modals #1032
Comments
@klonos, I'd be interested to hear your thoughts on https://www.drupal.org/node/1834682, where I proposed moving the filter enabling/disabling to be within the vertical tabs. That issue was held up on debate, but I still think it's worth pursuing. |
👍 |
@quicksketch I was just about to file an issue about the very same thing just minutes before you posted your comment above. I was thinking to merge the enabling/disabling with the vtabs and -if possible- allowing tabs to be dragged/reordered. You read my mind. Will share my 2c in that issue + open one for Backdrop. |
...in the meantime, this issue here is a valid request I believe. |
Sorry guys, but I'm working crazy hours and have only a few hours to spare each day. Anyways, here's what I was thinking... Perhaps the vertical tabs is not a perfect match for what we are trying to do here. I was thinking that the same model we use in the modules page for the list of modules with the addition of draggability would be mode suitable:
This way, we merge all three sections of that page (enabling/reordering/configuring) into a single one. What do you guys think? |
I think this sounds like a pretty good plan of attack. We don't have a real pattern for this UI, but it sounds like it may work well. |
Yeah, originally I thought that perhaps we can create some sort of "hybrid" vtabs with a checkbox on their label (to enable/disable filters), but then I figured that the checkbox can reside within the vtab. That was when I was thinking to merge only the enabling/disabling section with the config section. That's when I had a "Wait a minute" moment and said if the checkbox was not on the label, then there's room for a drag cross in there. That would allow to merge everything in one UI. More thinking and browsing around the admin UI (plus having #1005 and the options element at the back of my head) got me considering the field UI and the modules page too. So the "hybrid" idea seemed to make more and more sense to me, but instead of the vtabs it seemed that expandable (in order to hold the config form) and draggable (in order to provide reordering functionality) table rows Another thought on the table is to use modals for config instead of expanding the table rows. Separate issue then? ...or re-title and re-purpose this one? |
Let's keep using this one. It'd be nice to see the options that we're exploring in one place, especially if this idea doesn't pan out. |
This seems a really good plan. I'd vote for modals for the config.
|
Hmm, thinking about this and will get back with (more) comments... In the meantime, I took the liberty to number the options you list in your comment @docwilmot so we can reference them in future comments. Hope you don't mind. ...off the top of my head, I don't particularly like option 4 unless that list gets reeeeally big. I prefer the user to be able to see the available filters without extra clicking around if possible. |
...here's a thought:
Just thinking out loud here. |
Reset to default option won't work once custom module-provided filters are enabled. There be no real "default" then. I think number 3 is the Drupal and Backdrop standard. Think the old blocks list, Display Suite, etc. |
Other option is not have separate enable and configure links but do the enabling in the configure modal. |
I'd suggest to keep it as close to admin/structure/types/manage/page/display as possible. |
I disagree with @MrHaroldA since the manage field display page will likely not be around for long (we should be using layouts for that instead). Let's think this through on it's own merits only. One thing to consider - in none of the options in @docwilmot's comment can you see which HTML tags are allowed without another click. One of the things that bothers me most about the current filter settings is that I need to click (into the vertical tab) to see that list. There's a lot of space in this list, however. Maybe we can add an additional 'summary' column that can display useful information (like allowed HTML tags)? |
Another option as proposed in https://www.drupal.org/node/1834682 Also worth a read: https://www.drupal.org/node/1087100 |
Yes, each time I read through the commends on that issue I feel so frustrated at how things (do not) move in Drupal land. Maybe I am feeling this way because I share @quicksketch's point of view and I saw a great UI improvement idea being shot down so many times over potential (and may I add pre-existing) security issues that by the way we can solve here by implementing #1033. I really do not care about the actual implementation (be it vertical tabs or dragable table rows), so long as we solve the main issue here of consolidating the filter enabling section and the filter settings section. That way users would see that there is something to configure (settings section) once they enable something in the enable/disable section. Consolidating the filter ordering section as well would be an added bonus. So far, I like @docwilmot's option 3 (minus the spacing and alignment details). So, the order of elements I think should be: drag cross, enable/disable checkbox, filter name, configure link. I also like the idea of the configuration living inside modal dialogs. @jenlampton: either way (dragable list or vertical tabs), you need an additional click to see the list of allowed HTML tags. Unless I'm missing something. We can have those shown in a "more" link that expands the row (à la modules page "required by" section). Still would require an additional click though :/ |
My mockup was incomplete, just to demo the order of things. The individual draggable rows could have information about the filters below the filter name. And I don't really like the vertical tabs for filters to be honest; it doesnt seem like this is an appropriate use of vtabs.
I suspect @MrHaroldA was referring to copying the UI mechanism of draggable rows above with disabled rows below. |
👍 |
I was thinking of starting to try to do this, but thought I'd get consensus first: tabs or draggable rows? My first 13 votes are for draggable rows. |
I think this is a good idea, especially if we can include summary-like information, such as the current allowed list of tags. I think nixing vertical tabs is also a good idea. Most of the time, settings on filters does not need to be changed, especially now that CKEditor will automatically adjust the tags based on the toolbar configuration. This will greatly simplify the overall configuration page for filters. If we go with dialogs here, we'll probably use a new mechanism that we haven't used in the past. Right now our other dialogs (Layouts and Views) both use AJAX-saving to temporarily save configuration until the entire page is saved. I think that may be overkill here, and we'd need to completely change the way filter settings are saved to use that approach. Instead, what we'll probably want to do is leverage some of the more typical jQuery UI functionality, where we simply have a dialog open and display part of the existing page, without an AJAX request. The non-JS fallback would be identical to the page as it is today, with just all the settings for all filters being shown on the page (the configure links should also not be shown in that case). We haven't done this particular kind of implementation before in Backdrop core. It will probably require a small amount of JS in filter.admin.js to wire it all up to the existing dialog system. |
First pass, minus @quicksketch's good advice re the filter saving, which is of course the right idea, but I hadnt seen it. But at least we can evaluate this new UI. |
...you know me, I'd love to check it out, but I still haven't sorted my local environment issues (#1072). |
...alright. Back in business!
|
Thanks @klonos. Please note the statement above:
This isnt near finished yet, I know, sorry; the drag/drop worked fine earlier, I must have changed something and not rechecked. Please note my jQuery skills are laughable. Excuse the "Empty"; just temporary; same for the How does it work as an alternative UI for filter formats though? Is it intuitive? Friendly? Friendlier than previous? |
I know, notice my statement:
So, yes very user-friendly and a great improvement over what was there previously. Thanx once again! |
Ahh we cross posted there. Thanks for the review; I tried the checkboxes second but note that this also goes contrary to common standard which is the cross-hairs should be associated closely with what youre dragging; we're dragging the filters, not the enable checkbox. That, and the fact that it doesn't look at all right to me. Perhaps if having the checkbox there is unacceptable, we could opt for enabled/disabled links instead? Agreed with the "Filter weight" header being wrong. Not sure about operations though; right now, all you can do with filters is configure them. There are no other operations. |
...just a thought here. In order to simplify code and UI... do we actually need both ways of enabling/disabling? Should we just keep the checkboxes and ditch dragging to a "Disabled" section? In that case, should we just do what we do for Views UI (gray-out and disabled rows)? |
I'm going to work on addressing the feedback from the latest code review. |
New pull request up at backdrop/backdrop#3131 I reworked the updating of the hidden "filtered_html" element and fixed the interaction between the configuration of CKEditor's buttons and the tag list. It should now work consistently when you drag in and out buttons like Image or Strike-Through. I also encountered a number of problems when creating a new text format, some PHP errors would be thrown when configuring filters before giving it a name. We need a code review and some additional testing on this. |
I'm testing the latest PR, thoughts:
These should maybe be a follow-ups:
|
I also thought that the checkbox might be more expected in the left-hand column, similar to enabling modules or any of the views bulk operations forms (i.e. admin/content). We can change the dialog submit button very easily, it's just the label on the button, no need to adjust any JS. |
Ah! Maybe it's the tests that will need to be updated? |
I added a few commits to the PR to update the CSS (adding RTL styles for filter UI) and updated the docs in one place to indicate Filters are stored as config, not in the database anymore, but as long as we can get someone else's eyes on that before it's merged, this issue is RTBC! |
Changed the dialog button label from the generic "Submit" to the slightly more specific "Update". |
Let's consider moving the checkbox for enabling as part of the follow-up we already have to style the Configure buttons over at #4378. |
Great, adding it there now :) |
Merged backdrop/backdrop#3131 into 1.x for 1.16.0. Thanks everyone for the extensive feedback and testing! HUGE THANK YOU to @docwilmot for spearheading this and making not one but TWO entire implementations to get this done. Really happy with how this has turned out. |
(Related: #975)
https://www.drupal.org/project/drupal/issues/1834682
Before:
After:
PR by @docwilmot: backdrop/backdrop#1023PR by @docwilmot: backdrop/backdrop#3074PR by @docwilmot: backdrop/backdrop#3077PR by @docwilmot: backdrop/backdrop#3096 using dialogsPR by @docwilmot and @quicksketch: backdrop/backdrop#3131
The text was updated successfully, but these errors were encountered: