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
Comment #2
jwilson3Comment #3
jwilson3Patch does two things:
Seven theme before
Seven theme after
Claro theme before
Claro theme after
Comment #4
pcate commentedPatch applied cleanly for me and the behavior matches the gif. This greatly improves the usability of the site alerts table list on smaller screens.
Comment #5
pcate commentedComment #6
pfrenssenGreat improvement, thanks!