feat(cms): sortable table (for TACC project pages redesign)#1167
Conversation
Vanilla sort for table.o-sortable-table (not tablesort: APG button headers). Init from assets_core_delayed on #cms-content. Co-authored-by: Cursor <cursoragent@cursor.com>
Review Summary by Qodo(Agentic_describe updated until commit 044a1b5)Add sortable table module for CMS project pages
WalkthroughsDescription• Add client-side sortable table functionality for CMS pages • Implement accessible sort buttons with ARIA attributes • Include CSS styling for sort indicators and button states • Initialize sortable tables on delayed page assets load Diagramflowchart LR
A["assets_core_delayed.html"] -->|imports| B["sortableTable.css"]
A -->|imports| C["sortableTable.js"]
C -->|initializes| D["table.is-sortable"]
D -->|renders| E["Sort Buttons"]
E -->|updates| F["aria-sort Attributes"]
F -->|triggers| G["Client-side Sort"]
File Changes1. taccsite_cms/templates/assets_core_delayed.html
|
Code Review by Qodo
1.
|
Return empty sort keys and warn in the console so CMS editors can fix markup. Co-authored-by: Cursor <cursoragent@cursor.com>
Pair sortableTable.css with JS; use table.is-sortable and c-button--as-link. Note Core-Components as future home. Co-authored-by: Cursor <cursoragent@cursor.com>
## Overview Skins Django CMS Bootstrap 4 Alert plugin output using `x-message`. ## Related - [RT #42216](https://tickets.tacc.utexas.edu/Ticket/Display.html?id=42216) - required by TACC/tup-ui#558 - pairs with TACC/Core-CMS#1167 ## Changes - **added** Bootstrap 4 `alert` component ## Testing 1. `npm run build:css` 2. `npm start` 3. Open the [Bootstrap 4 Alerts demo](http://localhost:3000/components/detail/alert). 4. Review styles. 5. Compare to [C Message demo](http://localhost:3000/components/detail/c-message--type). ## UI | Alerts | Primary Alert = Global Message | | - | - | | <img width="1066" height="1581" alt="Alerts" src="https://github.com/user-attachments/assets/9567db25-6ec6-4ad1-af7c-a3684a23187a" /> | <img width="900" height="470" alt="Primary Alert : Global Message" src="https://github.com/user-attachments/assets/a78f31a7-76a1-4ae6-8f01-027e0259af84" /> | https://github.com/user-attachments/assets/87f3f3f7-f642-41de-a0f7-8ceca25fcba3 --------- Co-authored-by: Cursor <cursoragent@cursor.com>
|
Code review by qodo was updated up to the latest commit 044a1b5 |
|
Approving, so —
— but I really should replace with tristen/tablesort. |
## Overview Sortable CMS tables use List.js 2.3.1 instead of custom sort logic. Editors use `js-sortable` on the table and `not-sortable` on non-sort columns; row order stays as authored until a header is clicked. ## Related - [RT #42216](https://tickets.tacc.utexas.edu/Ticket/Display.html?id=42216) - closes #1168 - supersedes #1167 - required by TACC/tup-ui#558 ## Changes - **added** List.js 2.3.1 from jsDelivr in delayed assets (SRI) - **refactored** `sortableTable.js` for List prep, row `data-*`, aria-sort sync - **updated** `sortableTable.css` for `js-sortable` and `.sort` controls ## Testing 1. Deploy or load delayed assets with List.js + `sortableTable` on `#cms-content`. 2. Use a table with `o-fixed-header-table js-sortable` and `th.not-sortable` on Description. 3. On load: CMS row order, all `aria-sort="none"`. <sup>⚠️ CMS strips `data-attribute`.</sup> 4. Click headers: sort toggles; other columns reset to `none`. 5. Column with link in cell sorts on link text. 6. Add `<fieldset>` with filter UI (see `tmp/pr-1169.html`). 7. Verify filtering works. ## UI https://github.com/user-attachments/assets/52ab6aed-2e43-47f1-be46-6df493128f86 --------- Co-authored-by: Cursor <cursoragent@cursor.com>
Overview
Sort tables on CMS pages.
Important
Reconsider implementation. See:
Sorting moved to List.js in follow-up PR.
Related
Changes
Testing
UI
using.the.feature.mov