backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 40 forks source link

[META][UX] Layouts: Revisit layout conditions. #2620

Open klonos opened 7 years ago

klonos commented 7 years ago

Create a layout with its path set to node/% and open the "add visibility" dialog. Here's the list of options that you get for conditions:

image

Let's examine them one by one...

Front page

image

No specific comments for improvement here. We are not asking the user to type some weird <front> "special" path πŸ‘ and we are covering the reverse case of NOT the front page πŸ‘. All good here.

Node: NID

image

  1. Could we rename this to "Content ID (NID)" instead, in order to avoid using the word "node"?
  2. Could we also allow more than one NIDs to be specified here by making the text field a multi-line one? That would spare users having to add multiple conditions if they need to specify multiple NIDs.
  3. Let's also add some help text.

Basically something like this:

image

Node: Type

image

This is mostly OK. Just again replace the word "node" with "content" and do not have the word "type" capitalized. Perhaps add some help text (although things are obvious). Something like this instead:

image

NEW ISSUE = https://github.com/backdrop/backdrop-issues/issues/6436

Site language

image

My only minor objection here is with the help text that is using dev language ("pass" as in "pass the conditional check"). Perhaps more simple-user lingo, like "This layout will be used only for the selected languages.". If we want to be technically precise, then "This layout will be used only if the language of the page being rendered is one of the selected languages."

URL path

image

Why do we use two different methods/UI patterns for reversing the conditions? In NID we have a "reverse" checkbox after the condition, here we have a set of radio buttons before the condition. Can we please choose one and stick with it?

User account: UID

image

Again, we should allow multiple UIDs to be entered to avoid repetitive work.

User: Permission

image

Would be great if we can make this work with multiple permissions. I'm thinking "+add another permission" button that inserts additional instances of the drop-down menu??

User: Role

image

  1. We are allowing the selection of more than one role, so the checkboxes label should be plural "Roles".
  2. "Only the checked roles will be granted access." what??? Should be something like "This layout will be used only when the user viewing the page has any of the selected roles."
klonos commented 7 years ago

...eventually, when we have the reference feature in core, I would like us to replace the NID and UID visibility conditions with reference autocomplete fields that search by content title + NID and username + UID. I think that @docwilmot was working on that on an issue somewhere if I'm not mistaken.

Al-Rozhkov commented 7 years ago

In NID we have a "reverse" checkbox after the condition, here we have a set of radio buttons before the condition. Can we please choose one and stick with it?

I like all improvements, but consistent use of "reverse" checkbox most of all.

klonos commented 7 years ago

but consistent use of "reverse" checkbox most of all.

@Al-Rozhkov do you have a specific preference as to what should be used (single "revert" checkbox vs two radio options) and where the control should be placed (above vs below the setting)?

Al-Rozhkov commented 7 years ago

I like single "Reverse (NOT)" checkbox. It is compact and understandable. I used to position below the setting, but position above feels better in semantic sense: NOT node 1, NOT "about" path.

jenlampton commented 3 years ago

@klonos I love these suggestions, but each one should have its own issue (linked from this meta) so that they can be tackled one-by-one.

klonos commented 3 years ago

Thanks @jenlampton ...yes, it makes sense. I'll get to it soon as I can πŸ‘πŸΌ