fitzee opened a new pull request, #43634:
URL: https://github.com/apache/superset/pull/43634

   ### SUMMARY
   
   Fixes [Shortcut SC-112958](https://app.shortcut.com/preset/story/112958).
   
   The chart list rendered `viz_type` through the frontend chart metadata 
registry, but the paginated Chart API ordered the underlying `Slice.viz_type` 
slug. As a result, clicking **Type** produced an order that did not match the 
labels users saw.
   
   This change sends the active registry's slug-to-display-name mapping only 
when Type sorting is requested. The Chart API validates that bounded mapping 
and applies it as a request-scoped SQL `CASE` ordering expression before 
`OFFSET`/`LIMIT`, retaining the primary-key tie breaker for stable pagination. 
Unknown/custom slugs fall back to their slug, matching the cell renderer. The 
shared list resource hook now supports typed, per-request extra query 
parameters without allowing them to override pagination or order controls.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable. Behavior-only change: Type sorting now follows the friendly 
labels displayed in the column rather than the stored slugs.
   
   ### TESTING INSTRUCTIONS
   
   Automated:
   
   - `npm run test -- src/views/CRUD/hooks.test.tsx 
src/pages/ChartList/ChartList.listview.test.tsx` — 54 passed
   - `.venv/bin/python -m pytest -q tests/integration_tests/charts/api_tests.py 
-k 'friendly_viz_types or get_charts_filter' --maxfail=1` — 2 passed
   - `npm run lint -- src/components/ListView/types.ts 
src/pages/ChartList/index.tsx src/pages/ChartList/ChartList.listview.test.tsx 
src/views/CRUD/hooks.ts src/views/CRUD/hooks.test.tsx` — passed
   - `pre-commit run` on all staged files — passed, including mypy, frontend 
type checking, ruff, pylint, oxfmt, and oxlint
   
   Manual:
   
   1. Create enough charts with several types to span multiple chart-list pages.
   2. Open **Charts** and click **Type**.
   3. Verify ascending order follows the displayed friendly names across page 
boundaries.
   4. Click **Type** again and verify descending order also follows the 
displayed names.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: 
[SC-112958](https://app.shortcut.com/preset/story/112958)
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to