The current textarea-based form is still a bit confusing.

Possible solutions:

1) responsive textarea.
You put the cursor somewhere, and a box next to the textarea tells you about the current region and the criterion in that line of text. Something similar already exists in Block admin light. Requires jquery.caret.

I'd like this as a two-column solution. On the left the textarea, on the right the description, and/or a list of all available criteria.

2) Tabledrag / jQuery UI Sortable.
Problem: Different regions need a different drag behavior.
"enabled": Here the order matters.
"disabled": Order does not matter, should rather be ordered hierarchically / alphabetically.
"disabled by default": Order does not matter, and items go here automatically.
"inherit": Order does not matter, and items go here automatically.

It needs to be possible to move items between these differently-behaving regions.
Or at least, add and remove items from the "enabled" tabledrag, and implement the rest in another way.

I'd like this as a two-column solution.
On the left the tabledrag, on the right the description, and/or a list of all available criteria with "override/enable", "fallback/revert", "disable" buttons.
In the bottom, the implicitly and explicitly disabled criteria.

Duplicate: #918208: Convert textarea into tabledrag or some other widget

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DuaelFr’s picture

Why don't you think about something like blocks interface ?
It seems close to your needs and admins would not be lost.

Regards

donquixote’s picture

I have been thinking of a solution with two parts:

In the top half ("enabled"), a tabledrag thing like the blocks.
The other half would be a static list with checkboxes or dropdowns or buttons, having all the "disabled" and "inherit" rules.
Clicking "enable" or "override" in one of these rules would make it appear in the tabledrag.

The idea is, what is in "inherit" or "disabled" does not need to be sorted. Instead, these items should be displayed in hierarchical order.
The same conceptual problem exists in the blocks configuration, but I think it does not matter as much, because there is no hierarchical order of blocks, and there are not as many variations of the same thing.

What I would need is a tabledrag that allows to add and remove items. I know this is possible (did it in multicrud module), but a bit tricky..

DuaelFr’s picture

All this sounds tricky ;)

It would be nice to ask an ergonomist to have a look at this strategic screen. This is the big black point of your module so you may build it very carefully. The idea you have may be very good but I am unable to imagine it. If you have the time to make a quick mockup, I will ask some of my contacts to review it.

donquixote’s picture

Thanks, this would be great!
So far I hesitated to waste time on a solution that I was not sure about, when everything worked so fine for me with the text-only form :)

I am going to produce a demo maybe for tonight.

donquixote’s picture

The ugliest demo in the world..
http://static.dqxtech.net/crumbs-admin/

Not implemented in the demo:
- If you switch one of the below things to "enabled", it should appear in the drag interface at the top.
- Better visualization of the hierarchy of rules. (e.g. with nested list style)
- Description area in the right column, reacting on row hover.
- We may use buttons or clickable icons (enable, disable, use default) instead of the select options.

DuaelFr’s picture

OMG you are right ! It is ugly ;)
In this state it is ergonomically worst than the textarea...

I really think you might reuse commons drupal elements for simplicity and consistency. Best, this will include fallbacks for accessibility.
You need a nested draggable list ? Take a look at Menus or Fields/Field groups.

Easy to say, hard to do : keep it simple ;)
Good luck !

donquixote’s picture

On the Drupal Camp Gent 2012 I gave a session on Crumbs, where I also mentioned the issue of the configuration form feeling not intuitive for some users.

The feedback was that the draft in #5 is going in a good direction, while pure tabledrag would feel clunky and not as nice.

Of course, I do not deny your

In this state it is ergonomically worst than the textarea...

---------

As a design guideline, we do not want to let the user make choices that have no meaning.
E.g.,

  • Sorting stuff in the "disabled" or "inherit" section has no meaning.
  • Hierarchical sorting ("tree tabledrag") in the "enabled" section would have no meaning.

The other design problem is that all "disabled" items visible at all time.

DuaelFr’s picture

Very good !

I always think your demo is worst than your initial textarea in its actual state but it does not mean that it will stay unergonomic when properly designed and with all features included.

There are a few more points to try to help you at this task :
- I do not understand why you have to differentiate "disabled" and "disabled by default". Reducing this to "disabled" would clarify the interface.
- I also think that "inherit" section could be shown in an other way. Using nested elements the criteria inheritance and actual status would be clearer. For example you could have a box titled "comment" containing 3 smaller sortable boxes "comment", "reply" and "skip". Each of these contains a set of icons allowing to choose between "Enabled", "Disabled" or "Inherit" except for the main one which do not have "Inherit" choice (it would be non sense). You may use a color code to indicate when a criteria is active or not to ease inheritance understanding.

I would like to build some wireframes but I can not find a good tool :/

Good luck with all this ^^

donquixote’s picture

- I do not understand why you have to differentiate "disabled" and "disabled by default". Reducing this to "disabled" would clarify the interface.

I want/have to distinguish user choice from programmer choice.

Things in "disabled by default" are sitting there because the programmer said so. If you uninstall and reinstall Crumbs, the rule will still sit in the "disabled by default" section. Also, if a new rule enters the game, where the programmer said it should be disabled by default, it will start in this section. If the programmer changes the setting in code, the rule will move back to "inherit".

If a rule is sitting in "disabled", that means the user chose to not have it enabled. If you uninstall and reinstall Crumbs, the setting will be gone. If the programmer changes the default setting, it will have no effect, because it was an explicit user choice.

donquixote’s picture

- I also think that "inherit" section could be shown in an other way. Using nested elements the criteria inheritance and actual status would be clearer. For example you could have a box titled "comment" containing 3 smaller sortable boxes "comment", "reply" and "skip". Each of these contains a set of icons allowing to choose between "Enabled", "Disabled" or "Inherit" except for the main one which do not have "Inherit" choice (it would be non sense). You may use a color code to indicate when a criteria is active or not to ease inheritance understanding.

Not that quick :)
- comment.reply, comment.skip and comment.comment can be sorted not just within the comment box, but also outside of it.
- setting comment.* to "inherit" does make a lot of sense, because it would inherit its weight from the global * wildcard thing. In fact, that is what all plugins do by default.

DuaelFr’s picture

Things in "disabled by default" are sitting there because the programmer said so. If you uninstall and reinstall Crumbs, the rule will still sit in the "disabled by default" section. Also, if a new rule enters the game, where the programmer said it should be disabled by default, it will start in this section. If the programmer changes the setting in code, the rule will move back to "inherit".

If a rule is sitting in "disabled", that means the user chose to not have it enabled. If you uninstall and reinstall Crumbs, the setting will be gone. If the programmer changes the default setting, it will have no effect, because it was an explicit user choice.

What if rules were all disabled by default ?
I think you may weight the pros and cons of having this distinction.

Another solution would be to look at themes. While theme settings are not saved by the user, they are taken from the theme info file. If it changes, settings changes too (without considering drupal's internal cache system). Once saved by the user, even if the info file changes the theme settings are stuck in the database.

DuaelFr’s picture

- comment.reply, comment.skip and comment.comment can be sorted not just within the comment box, but also outside of it.

You are right, I spoke too quickly ;)

- setting comment.* to "inherit" does make a lot of sense, because it would inherit its weight from the global * wildcard thing. In fact, that is what all plugins do by default.

This wildcard would not be necessary with a clear and usable sortable list. User could directly drag his selection on top of the list.

donquixote’s picture

What if rules were all disabled by default ?
I think you may weight the pros and cons of having this distinction.

If you install a new module, e.g. Organic groups, then I want that those breadcrumb rules are automatically enabled, because they give you exactly the breadcrumbs that you expect.

However, some rules should only be enabled if the administrator chooses so, because either their effect may be undesired, or because they have a painful performance penalty.

Another solution would be to look at themes. While theme settings are not saved by the user, they are taken from the theme info file. If it changes, settings changes too (without considering drupal's internal cache system). Once saved by the user, even if the info file changes the theme settings are stuck in the database.

This is sometimes a bad thing. In many systems in Drupal, is hard for a user to see if something is overridden, or if it is just the default behavior. I always thought this distinction is useful to clarify how things work under the hood.

This wildcard would not be necessary with a clear and usable sortable list. User could directly drag his selection on top of the list.

The wildcard also specifies the place where new rules enter the board. I consider it useful :) although, there could be other ways to do this ..

wadley0’s picture

FileSize
172.81 KB

In my opinion, the problem with the demo is that the two parts feel very disjointed, and adds unnecessary complexity (a user must learn to use each part independently). I'll second DuaelFr's suggestion to use "something like block interface", and I do think this approach would still work here (especially since users already know how to use it). I've attached a screenshot of how it might look.

This would really be no different than what you currently have, except that the items are draggable, so users don't have to cut and paste.

You've pointed out that for the items in the three non-enabled sections, order does not matter. This also means that it won't hurt anything if they have an order. So to improve interface simplicity, let the user put them in order if they want, just ignore it (this is just like the block interface, order doesn't matter for disabled items there either).

donquixote’s picture

Maybe I am just mad insisting on my point :)

There is one difference with the blocks interface:
In the blocks interface, whatever is sitting in "disabled" is actually disabled.
In Crumbs, we do have the "inherit" section, where the status of each rule depends on the parent wildcard rule.

It would be very sweet if the interface could visualize this somehow.
I am aware the current textarea-based interface does not really visualize the connection. But at least it was cheap to build :)
(probably the blocks-style tabledrag is also cheap to build, so..)

syp’s picture

I subscribe #1 & #14.
Anyway, on the textarea ui, you can sort the disable and inherit rules. We know has no meaning, but possible.
I think that what we all think here, is that a clean and familiar ui will provide a much better first impression on people searching for a bread crumb customization module.

Two more suggestions:
- Put descriptions on a help page for even a more clean admin ui page.
- The key of this module is the "find parent" loop, but it's not intuitive to catch the idea until you read some documentation pages.

And beyond all of this: great job!

bojanz’s picture

I have to admit, the current UI is terrible :)

#14 looks closest to something usable.

Why don't we move the "inherit" information to help text below the UI, if changes to it (reordering, adding / deleting) make no difference?
Makes no sense to have it editable if those edits have no effect.
If I got it wrong, and they do have some effect, then I'd suggest moving the "inherit" editing UI to a collapsed fieldset (if it's a text area) or a separate tab (if it's a more complex interface), since it's an advanced UI that most users will probably just skip.

So, this then leaves you with enabled / disabled / disabled by default.
We might want to think about merging disabled & disabled by default. I realize it would be semantically less correct, but it would allow for a less confusing UI.

Alternatively, it might make sense to have a dropdown listing the "disabled by default" rules above the table, allowing them to be added to the table that way (and having a "remove" link on each row that moves the rule back to the dropdown). This would make the UI scale better for a large number of rules.

I don't see a problem with drag & drop not doing anything for disabled rules, that's how the other drag&drop UIs in Drupal work already.

donquixote’s picture

I finally agree that #14 is the solution.
Even after playing around with yet another fancy solution locally, #14 still appears to be the best.

My rationale so far had been that we want to visualize the parent/child structure.
I no longer think this is necessary.

We need a patch for #14 !

donquixote’s picture

I know I should rather be working on a patch implementing #14.

Nevertheless, here is one funky experiment I made, check out this branch:
http://drupalcode.org/project/crumbs.git/shortlog/refs/heads/7.x-1.x-adm...

I produced this a while ago, and want to share it because.. i don't want it to rot.
Still, #14 is the way to go.

donquixote’s picture

Status: Active » Needs review

Patch: Admin form based on tabledrag.
Branch: http://drupalcode.org/project/crumbs.git/tree/refs/heads/7.x-1.x-admin-t...

Happy testing!

donquixote’s picture

Grm, did I not post a patch??

donquixote’s picture

Timing:
I want to make at least one more stable release from the current -dev, before I merge the tabledrag in.

Notes:
- "Inherit" section is merged with "Disabled by default" section, it is now called "Inherit / automatic", indicating that the user has not made an explicit choice for these plugins. We can still find other ways to visualize.
- Probably it only works with js enabled, due to the way I use the tabledrag. We might change this, but for now I just want something basic to work with.
- We are now using system_settings_form().
- Display options moved to a separate config page, admin/structure/crumbs/display.

Left to do:
- Improve descriptions for plugins
- Show which plugins are "inherit" and which are "disabled by default".
- For "inherit" plugins, show which weight / status they inherit from the parent plugin.

Optional / future:
- Buttons to push plugins into another section (enabled, disabled, inherit)
- Optional submodule "crumbs_labs" to bring back the text-based config, and maybe also the exotic thingie from #19. This should be easily possible thanks to the hook_element_info() approach.

donquixote’s picture

I hate all those procedural callbacks.
Here is an attempt to move the stuff into objects.
- element types 'crumbs_weights_tabledrag' and 'crumbs_weights_textual' (not implemented)
- one class per element type
- one class instance per element instance
- reduce the form-related code in crumbs.module, leaving only some generic stuff.

donquixote’s picture

Please test the 7.x-2.x
(note: there is also a crumbs_labs submodule which gives you the textual form back)

bojanz’s picture

FileSize
28.76 KB

Looks awesome!
I don't see a point in retaining the old textual form, kill it.

One thing I noticed, before the form is saved, dragging something will add a "*" to it, which makes the rules look odd. See attached image.

donquixote’s picture

Which browser?

bojanz’s picture

Chrome. I don't think it's browser related, Drupal JS adds the asterisk automatically to dragged rows. That behavior needs to be disabled.

donquixote’s picture

Weird. It doesn't happen on my Chromium.

donquixote’s picture

Probably the theme. I use Rubik atm. Will try with Seven later.

donquixote’s picture

Ha.. got it :)
We could hide the asterisk with CSS.
I'm a little too lazy to figure this out with JS ...
(CSS can hide the asterisk both on rows and on the warning message at the top)

donquixote’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs review » Fixed

Follow-up: #1961858: More useful information on crumbs tabledrag form.

We have a working 7.x-2.x, but we need some fine-tuning on the design.

donquixote’s picture

#25 / #27
In the most recent version, the key is formatted with <code> tags, and appended by a space. This way the drag asterisk should be easier to distinguish from the wildcard asterisk on most themes.

Do you think this is enough? The drag asterisk has its benefits after all..

donquixote’s picture

Status: Fixed » Needs work

Grmmm
I am working on a big site now, and it turns out the tabledrag becomes really unpractical.
You need to scroll a lot, and you need to drag very far.
And if you don't know what to look for, you are doomed.

ptvv’s picture

Component: User interface » Code

What's the benefit of dragging stuff to different sections? If the plugins are just listed in alphabetical order with a dropdown offering numeric priorities, "disable", and "inherit" then that gives the required control, and the locality means that most of the time you'll be able to see what the inherited value would be. The existing display's feedback on the results of inheritance could presumably be kept, and IMO would be supplemented by an additional style for rows which are disabled (manually or by inheritance).

donquixote’s picture

What's the benefit of dragging stuff to different sections?

This is what everyone has been asking for..

If the plugins are just listed in alphabetical order with a dropdown offering numeric priorities, "disable", and "inherit"

There is a crazy proof-of-concept implementation in the crumbs_labs module, under admin/structure/crumbs/weights/expansible.
Mayyyybe the dropdown (select) would be easier than the graphics..

If we actually do a weights select dropdown, then the list of options should be updated whenever another plugin key is activated..
E.g. if only 1 plugin key is enabled, you only have one weight option on that plugin key, and two weight options on every other plugin key.
If 10 plugins are enabled, you have 10 weight options on the explicitly enabled plugin keys, and 11 weight options on the plugin keys that are currently on "inherit".

ptvv’s picture

Here's a first approximation. It could be improved with a "Compact values" button at least.

donquixote’s picture

simplytest.me fails to apply the patch.. any idea why?

ptvv’s picture

No. Its error message could be more helpful.

donquixote’s picture

After wget:
If I apply it, it says "unrecognized input". If I "less" it, it tells me it's a binary.

donquixote’s picture

Status: Needs work » Needs review
FileSize
8.58 KB

The browser seems to have no problem displaying the patch. So, I copied into a text file, which applies just fine, and I am re-uploading it here.

Status: Needs review » Needs work

The last submitted patch, crumbs-7.x-2.x-dropdown-admin-interface-1404018-36.patch, failed testing.

donquixote’s picture

Status: Needs work » Needs review

Tried, it works!
(I did not submit, atm I am more interested in the look & feel)

The downside is you have to scroll a lot to see all plugin keys with an explicit weight.

I think the solution is a collapse/expand tree, where those plugin keys with explicit user-specified weights are always shown, but those with "inherit" are shown only if the line is expanded.

We could use the collapse/expand mechanic from the "expansible" thingie.
If you run this with javascript disabled, you will see it is not that different from your "dropdown" version. Only with text fields instead of dropdowns.

I don't know if you dare to touch the javascript stuff. I could give it a shot myself.
We want to keep the collapse/expand, but not the psychedelic graphical stuff.

donquixote’s picture

And probably a good idea to come to a decision about default weights:
#2074473: Improve handling of default weights for plugin keys.

donquixote’s picture

DrupalCon is coming, and this is one of the top issues to discuss.
#2094933: Crumbs BoF/meeting on DrupalCon Prague 2013?

donquixote’s picture

Issue summary: View changes

Link to duplicate

donquixote’s picture

Issue summary: View changes
FileSize
55.96 KB

I made something new. But I need help with the design of the buttons.

donquixote’s picture

donquixote’s picture

I would like to share this on jsfiddle or sth, but don't know an easy way to export a website to jsfiddle with all the resources (css, js).
http://stackoverflow.com/questions/23039039/how-to-export-a-website-to-j...

Features of the new UI in #45:
- Tabledrag area for explicitly enabled rules. Currently at the bottom, but I consider to put it into a modal/popup dialog.
- TreeTable to visualize the hierarchy, where you can switch the status of rules (inherit, disable, enable), but not the weight.
- Rows/groups in the tree table are expansible, and the expand/collapse is animated.
- Live synchronization between the two areas.
- "Focus group": You click on any row, and it will highlight all other rows that inherit from the same parent. Again, this is synced between the tabledrag and the treetable widget. If the group is enabled, it will show up green if focused. If it is disabled, it will show up red if focused.

The challenge I think is the design of the Inherit/On/Off buttons in the tree table.

donquixote’s picture

geek-merlin’s picture

first impression:
* at admin/structure/crumbs/weights/expansible i only find broken graphics
* the new interface at admin/structure/crumbs/weights/dropdowns really looks promising!
for me it is more intuitive than what we had before.
i'll report back when i have fiddled more with it.

donquixote’s picture

Thanks for the feedback so far!

https://piratenpad.de/p/crumbs-ui

donquixote’s picture