Problem/Motivation

The manage site alerts page does not show you the title of the alert. If you have multiple alerts you have to click "edit" to see what you're changing. This makes the module extremely hard to use from a mobile device, where one might need to set a critical alert on a site if away from a desktop computer.

Area of code exhibiting the problem:

// in SiteAlertListBuilder::buildHeader()
    $header = [
      'active' => [
        'data' => $this->t('Active'),
        'field' => 'active',
        'specifier' => 'active',
        'class' => [RESPONSIVE_PRIORITY_LOW],
      ],
      'label' => [
        'data' => $this->t('Label'),
        'field' => 'label',
        'specifier' => 'label',
        'class' => [RESPONSIVE_PRIORITY_LOW],
      ],
      'message' => [
        'data' => $this->t('Message'),
        'field' => 'message',
        'specifier' => 'message',
        'class' => [RESPONSIVE_PRIORITY_LOW],
      ],
      'scheduling__value' => [
        'data' => $this->t('Start time'),
        'field' => 'scheduling__value',
        'specifier' => 'scheduling__value',
        'class' => [RESPONSIVE_PRIORITY_LOW],
      ],
      'scheduling__end_value' => [
        'data' => $this->t('End time'),
        'field' => 'scheduling__end_value',
        'specifier' => 'scheduling__end_value',
        'class' => [RESPONSIVE_PRIORITY_LOW],
      ],
    ];
    return $header + parent::buildHeader();
  }

Proposed resolution

In addition to the "operations", ensure the "label" and ideally the "active" state are be visible for tablet & mobile screen sizes.

  • Remove RESPONSIVE_PRIORITY_LOW from the label column so it is visible in mobile, tablet, and desktop.
  • Change to RESPONSIVE_PRIORITY_MEDIUM for the active column so it is visible in tablet and desktop.

Remaining tasks

Write patch.
Screenshots.

User interface changes

Each Site Alert label will be visible in manage site alerts page on mobile devices and small screens.

API changes

n/a

Data model changes

n/a

Comments

jwilson3 created an issue. See original summary.

jwilson3’s picture

Issue summary: View changes
jwilson3’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new697 bytes
new922.68 KB
new889.45 KB

Patch does two things:

  • Remove RESPONSIVE_PRIORITY_LOW from the label column so it is visible in mobile, tablet, and desktop.
  • Change to RESPONSIVE_PRIORITY_MEDIUM for the active column so it is visible in tablet and desktop.

Seven theme before

Seven theme after

Claro theme before

Claro theme after

pcate’s picture

Patch applied cleanly for me and the behavior matches the gif. This greatly improves the usability of the site alerts table list on smaller screens.

pcate’s picture

Status: Needs review » Reviewed & tested by the community
pfrenssen’s picture

Status: Reviewed & tested by the community » Fixed

Great improvement, thanks!

  • pfrenssen committed 1524e16 on 8.x-1.x authored by jwilson3
    Issue #3156134 by jwilson3, PCate: Manage Site Alerts responsive table
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.