Problem/Motivation
The current implementation of the table sort indicator assumes the element is only visible when the table column is used for sorting. However, some themes might want to provide an icon for sortable table columns that are inactive.
Proposed resolution
Introduce a new 'inactive' option for the 'style' variable in table sort indicator template.
Remaining tasks
- Provide patch
- Create change record
API changes
In tablesort_indicator
template, 'style'
variable will be populated with 'inactive' string besides 'asc' and 'desc'.
Comment | File | Size | Author |
---|---|---|---|
#15 | 3025726-nr-bot.txt | 167 bytes | needs-review-queue-bot |
#5 | interdiff-3025726-2-5.txt | 1.79 KB | huzooka |
#5 | core-tablesort_inactive-3025726-5.patch | 6.67 KB | huzooka |
#2 | core-tablesort_inactive-3025726-2.patch | 5.69 KB | huzooka |
Comments
Comment #2
huzookaComment #3
lauriiiDo we really need this change in the template?
Comment #4
huzookaWe should't check style in the system's template, but keep it in stable for UI BC reasons.
Comment #5
huzookaChanges since #2:
/core/modules/system/templates/tablesort-indicator.html.twig
/core/modules/system/css/components/tablesort.module.css
/core/misc/icons/787878/twistie-passive.svg
Comment #6
lauriiiWould be nice to get a small review of the new icon/default styles from the UX team.
Comment #15
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.