Skip to content
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] Views: Table format: Improve the description of the "Row class" field #3695

Open
klonos opened this issue Apr 21, 2019 · 1 comment
Open

Comments

@klonos
Copy link
Member

klonos commented Apr 21, 2019

The description of the "Row class" field in the table format settings dialog reads as follows:

The class to provide on each row. You may use field tokens from as per the "Replacement patterns" used in "Rewrite the output of this field" for all fields.

Screen Shot 2019-04-22 at 5 28 34 am


Problems

  1. Either the "from" bit or the "as per" bit needs to be removed.

  2. It is not clear if the field supports adding one or multiple classes to each row (I personally think that there is no reason to not be supporting multiple), or if these are to be separated by spaces or commas.

    If multiple classes are supported, then the field label should be changed to "Row classes" instead (plural). The help text will also need to be updated to say "The classes to be added to each row..." (plural: classes), and the usual "separate by comma or space" text added as well.

    If only one class is to be supported, then we are missing form validation here, because I tried adding abc 123, and the form was saved; and so was the view afterwards. I then also tried using a mix of commas and spaces by changing the value of the field to abc, 123 zyx, and that was saved also. I have confirmed that the classes are being added properly to the table rows in both cases (with 123 converted to _23 as expected).

  3. Here, we are assuming that the user knows which replacement patterns are available, or we are forcing them to close this dialog, then edit one of the fields to see which tokens are available, then close that dialog, then finally (re)edit the table format, to come back and finish the task that they originally started to do. This is very poor UX.

    Usually, when a field supports tokens, we simply say that it does so, and we linkify the "tokens" word to pop up a token browser. Using the token browser, the user can drill down to supported tokens and click to add them to the field. I realize that because this is a dialog already, we may not be able to support this as a pop up, but we should at the very least be able to provide a fieldset, same as we do with the "Rewrite the output of this field" setting:

    Screen Shot 2019-04-22 at 5 36 29 am
  4. Related to point 3 above: the user needs to either be a Drupal/Backdrop user with lots of Views experience, or plain lucky to click on the last field to see available tokens. This is because of the weirdness that replacement patterns are, and their requirement to "properly" order fields: [UX] Views: Fix the replacement patterns weirdness #3696

@bugfolder
Copy link

WRT your problem #2: in D7, this field supports space-delimited multiple classes (so I agree that it should be titled "Row classes"). But the functionality is broken; see #5116.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants