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

   ### SUMMARY
   
   Fixes #37674.
   
   Superset 5 let you center the Big Number value and subheader. The Emotion 
CSS-in-JS migration hardcoded `align-items: flex-start` on the shared 
`BigNumberViz` render component, and there's been no way to get centered (or 
right-aligned) text back since — a user hit exactly this in #37674, asking how 
to center the value in v6.
   
   This adds a real `header_alignment` control (Left / Center / Right) to both 
**Big Number** and **Big Number with Trendline**, rather than just documenting 
a custom-CSS workaround. Default is `Left`, matching current behavior, so no 
dashboards change unless someone opts in.
   
   `#37794` attempted something in this area but its diff went well beyond 
alignment — dropped axis/grid config, the drill-to-detail context menu, 
conditional formatting, and forced date formatting along the way (confirmed by 
review). This PR is scoped to alignment only and doesn't touch any of that.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — text-only style change, easiest to verify via the testing instructions 
below in Explore.
   
   ### TESTING INSTRUCTIONS
   
   1. Create a **Big Number** or **Big Number with Trendline** chart.
   2. Under Chart Options, set **Alignment** to Center or Right.
   3. Confirm the metric value, kicker, subheader, and subtitle all shift 
together.
   4. Leave it on the default (Left) and confirm nothing changes from current 
behavior.
   
   Automated:
   ```
   cd superset-frontend
   npx jest plugins/plugin-chart-echarts/src/BigNumber
   ```
   34 tests pass across all 6 suites in that directory, including 3 new 
alignment-specific tests in `BigNumberViz.test.tsx`.
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: Fixes #37674
   - [ ] 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
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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