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

   ### SUMMARY
   
   Fixes #34615.
   
   Calendar Heatmap formatted domain and subdomain date labels with the 
vendored D3 formatter directly, bypassing Superset's time formatter registry 
and its `D3_TIME_FORMAT` locale configuration.
   
   This change injects a timezone-safe date formatter from the Calendar plugin 
into the vendored calendar implementation. String-based formats use Superset's 
configured formatter, while functional formatters keep precedence and the 
original D3 formatter remains available as a fallback. The configuration 
documentation also clarifies the roles of `BABEL_DEFAULT_LOCALE` and 
`D3_TIME_FORMAT`.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before: Calendar Heatmap month labels remained in the vendor's default 
English locale.
   
   After: month and other date labels respect the configured `D3_TIME_FORMAT` 
locale.
   
   Screenshots are not included because the visible output depends on 
deployment-level locale configuration and the change does not affect layout.
   
   ### TESTING INSTRUCTIONS
   
   Automated validation:
   
   ```bash
   cd superset-frontend
   npm run test -- plugins/plugin-chart-calendar/test/buildQuery.test.ts 
plugins/plugin-chart-calendar/test/cal-heatmap.test.ts 
plugins/plugin-chart-calendar/test/controlPanel.test.ts 
plugins/plugin-chart-calendar/test/index.test.ts 
plugins/plugin-chart-calendar/test/ReactCalendar.test.tsx 
plugins/plugin-chart-calendar/test/tooltip.test.ts 
plugins/plugin-chart-calendar/test/transformData.test.ts 
plugins/plugin-chart-calendar/test/transformProps.test.ts 
plugins/plugin-chart-calendar/test/utils.test.ts
   npm run type
   cd ..
   pre-commit run
   ```
   
   Manual validation:
   
   1. Configure `BABEL_DEFAULT_LOCALE` and localized month names in 
`D3_TIME_FORMAT`.
   2. Restart Superset.
   3. Open a Calendar Heatmap that spans multiple months.
   4. Verify that month labels use the configured locale and that dates remain 
aligned with their original UTC calendar days.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: Fixes #34615
   - [ ] 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
   - [ ] 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