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

   ### SUMMARY
   
   Sunburst click cross-filters and drill-by take their values from formatted 
segment names, so temporal segments send labels such as `October` to timestamp 
columns. Monthly `smart_date` labels also omit the year.
   
   - Use the raw hierarchy `records` already retained on each node. Normalize 
raw temporal timestamps with the shared temporal filter helper; use 
upper-exclusive `TEMPORAL_RANGE` bounds for grained levels.
   - Send the matching `extraFormData.time_range`, as Timeseries does, because 
target queries rewrite temporal filter bounds from that value.
   - Share the filter construction between click, context-menu cross-filter, 
drill-by, and drill-to-detail.
   - Keep temporal selection identity independent of display formatting, while 
retaining categorical selection behavior.
   - Use the grain-aware formatter for `smart_date`; preserve explicit custom 
formats.
   
   Related work: https://github.com/apache/superset/pull/45571 adds the 
control/query path needed to configure grained Sunbursts in Explore. This PR is 
independent on master for raw temporal filtering and consumes grained responses 
using either the legacy temporal subject or that PR's temporal hierarchy 
lookup. It does not duplicate its grain UI/query changes.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   No screenshots captured: the local `http://localhost:8088/health` check 
refused the connection. Interactive dashboard acceptance remains unverified.
   
   Before: temporal filters contain display labels; monthly buckets from 
different years can share a label. After: payload tests expect raw timestamps 
or bucket ranges, and adaptive monthly labels include the year.
   
   ### TESTING INSTRUCTIONS
   
   Automated command, from `superset-frontend`:
   
   ```bash
   npm run test -- plugins/plugin-chart-echarts/test/Sunburst --maxWorkers=2
   ```
   
   - Same final tests against the two original source files from master: **13 
failed, 7 passed, 20 total**.
   - With this change: **20 passed**, 2 suites.
   - Shared `test/utils/xAxisDrillByFilter.test.ts`: **12 passed**, 1 suite.
   - Standalone targeted TypeScript checking with project references removed: 
exit 0, no diagnostics.
   - Staged-file `pre-commit run`: formatting, lint, custom rules, stylelint 
and applicable general hooks pass. The frontend type hook fails with **TS6305** 
because the referenced plugin's generated `lib/Sunburst/*.d.ts` declarations 
have not been built. No hook was disabled.
   
   Regression test: 'cross-filters a raw temporal segment with the timestamp 
rather than its label'. Additional tests exercise Month/Year bounds, dashboard 
grain overrides, temporal lookup, inner/outer rings, categorical filters, drill 
actions, nulls, repeated custom labels, click-to-clear and distinguishable 
adaptive labels.
   
   Siblings checked:
   - superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx — not 
affected: cross-filters use getCrossFilterValue on cell values rather than 
labels
   - 
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx
 — not affected: temporal cross-filters use timestamps with bucket bounds and 
time_range
   
   Manual verification:
   1. Add a Sunburst with categorical and temporal hierarchy levels to a 
dashboard with another chart in scope.
   2. Click a raw temporal segment: the target should select the matching 
timestamp without a timestamp parsing error.
   3. With a grained Sunburst (the related PR supplies the Explore grain 
controls), click Month and Year buckets: the target should include the entire 
bucket and exclude its upper boundary.
   4. Override the grain through a dashboard filter and repeat. Check both 
temporal ring positions.
   5. Check categorical clicks and click-to-clear. Right-click temporal 
segments and compare drill-by, drill-to-detail and cross-filter bounds.
   6. With adaptive date formatting, compare the same month in different years; 
each label should include its year. Custom date formats should remain respected.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] 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