nextcloud / assistant

✨ Nextcloud Assistant
GNU Affero General Public License v3.0
23 stars 4 forks source link

Custom task select #3

Closed julien-nc closed 11 months ago

julien-nc commented 1 year ago

Here is the custom button-based task selector.

https://github.com/nextcloud/assistant/assets/11291457/d8a18eb2-0d6d-4356-b6e3-24ac431ef847

julien-nc commented 1 year ago

refs https://github.com/nextcloud/server/issues/39478

skjnldsv commented 1 year ago

Does the menu component not allow for a text-only dropdown without the space for icons on the left? @skjnldsv @raimund-schluessler

No, it was deemed to be best to always have an icon for clearer understanding. This is what is recommended by many, including material desing: https://m3.material.io/components/menus/overview

raimund-schluessler commented 1 year ago

Does the menu component not allow for a text-only dropdown without the space for icons on the left?

No, it was deemed to be best to always have an icon for clearer understanding.

This is what is recommended by many, including material desing: https://m3.material.io/components/menus/overview

While I also think having an icon is better, we do have NcActionText which allows to not show an icon next to the label. If the component has style issues as stated above, and you really don't want an icon, I think it would be best to fix the style issues upstream.

raimund-schluessler commented 1 year ago
  • Can they be ellipsized into the action menu after 1 line of action? Looks a bit off right now with 1½ lines of actions.

For this, the NcActions component implements the inline prop.

jancborchardt commented 1 year ago

This is what is recommended by many, including material desing: https://m3.material.io/components/menus/overview

The Material Design guidelines and examples have the icon as optional though. We could do it similarly?

nimishavijay commented 1 year ago

Example of how it might look without any icons:

image

Alternatives:

Show the same icon image

We've encountered this problem multiple times now (setting a time for the snooze feature also had discussions regarding this) so it could be best to allow an action menu without any icons also.

it also looks a bit awkward if some items have an icon and some don't (see screenshot) so we could have variants of the action menu where all items have icons or none of the items have icons, what do you think?

image

julien-nc commented 1 year ago

When only using NcActionButton + NcActions (with inline and force-name) it does not display the action names for those out of the menu. So for now i'm sticking to buttons + NcActionsButtons (in menu only).

For now we can fix the NcActionButton icon issue with CSS. image

Can they be ellipsized into the action menu after 1 line of action? Looks a bit off right now with 1½ lines of actions.

@jancborchardt I don't know how to implement this :grin: . Even when switching to NcActionButton + NcActions, we can only set a number of visible items, so if names are long, it wraps anyway.

julien-nc commented 11 months ago

Some news here. If one selects a task from the action menu, it now replaces the last inline button. The last inline button that was replaced is moved in the action menu.

https://github.com/nextcloud/assistant/assets/11291457/719c55a3-b534-4e51-b4df-30c571a12225