Generated with the help of an LLM.

Problem/Motivation

Looking at test failures and widget UX.

Proposed resolution

Changes:
* Move add button out of widget items, to bottom.
* Don't include empty new season, use add button.
* Focus on new season widget items.
* Change add/delete links to form buttons.

Remaining tasks

Review and merge.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mortona2k created an issue. See original summary.

mortona2k’s picture

Issue summary: View changes
Status: Active » Needs review

  • johnv committed 1e09d708 on 8.x-1.x
    Issue #3635657: Redesign SeasonWidget add/remove
    
johnv’s picture

Indeed, this is better.
Although the dropbutton was less prominent in the UI.
And the 'Add season' may be interpreted by the user as being outside of the field .

Can you fix that the season titles are updated, when a new season is added?

  • johnv committed 8838114f on 8.x-1.x
    Issue #3635657: Change Drupal ruleset in phpcs.xml.dist for local  PHP...

mortona2k’s picture

I made some adjustments to improve UX:

  1. Wrap field, regular hours, seasons in details to clarify how they are related.
  2. Hide exceptions table when empty, set title to Exceptions (N) to align with other details. (Undoes work in #3638023: No 'empty' text in Exceptions widget table)
  3. Update season title when collapsed as well as create new season. Set title to Seasons (N).
  4. Use flexbox to show delete button next to season when there's space available.

Desktop

Office hours widget desktop

Mobile

Office hours widget mobile

johnv’s picture

Status: Needs review » Needs work

The 'Delete season' button takes up too much space.

One would:
- open the season to be deleted
- see a (drop)button in-line with season name/from/to
- press the dropbutton.

I think Drupal UI is moving to dropbuttons (as in an 'Operations' table column)

mortona2k’s picture

I am trying to understand what you're proposing.

Here is the current widget for a single season on 1.x, rendered in my theme:

Office hours widget 1.x

The delete button is in line with season name/from/to. But it's not a dropbutton. If it was, what else would be in it?

I may have misinterpreted #5, I wasn't sure what you meant by "Although the dropbutton was less prominent in the UI." I took that to mean that the delete button should be outside of the details so it's easier to use without having to expand it.

I tried putting this in a table first, with an operations column for the button. However, that made the layout too rigid and added unnecessary headers. The table is already pretty wide, so it needs to collapse somehow for tablet/mobile.

The wide table in the widget is already causing problems in claro.

Office hours widget claro table overlap

Do you like the new groupings at least? Help me understand more about what you're looking for and I'll take another shot.

johnv’s picture

"current widget for a single season on 1.x," This looks fine.
I do not really care about button ore dropbutton - some people do. It would now only contain the 'Delete season' operation.

For the responsiveness. Please check #3297121: Make Office hours form responsive on mobile.