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

   ### SUMMARY
   
     When using Table charts with Time Comparison and filtering columns 
(showing only % diff, collapsing groups, etc.), the group headers would become 
misaligned with the actual data columns.
   
     **Root cause:** Two issues in header rendering logic:
     1. `groupHeaderColumns` was computed from `filteredColumnsMeta` while 
`getColumnConfigs` used `visibleColumnsMeta` (which also filters out 
`config.visible === false`)
     2. `Object.entries` iteration didn't ensure correct visual column order
   
     **Fix:**
     - Move `visibleColumnsMeta` definition earlier and use it for 
`groupHeaderColumns`
     - Sort `Object.entries` by `startPosition` before rendering headers
     - Update `renderGroupingHeaders` lookup to use `visibleColumnsMeta` for 
consistency
   
     Added test case to verify header alignment when columns are hidden via 
config.
   
     ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
     N/A - This is a logic fix. The visual result is that group headers now 
correctly align with their respective data columns when filtering time 
comparison columns.
   
     ### TESTING INSTRUCTIONS
   
     1. Create a Table chart with 3+ metrics and Time Comparison enabled
     2. Filter to show only "%" columns - verify headers align correctly with 
data
     3. Collapse first metric group - verify remaining headers align correctly
     4. Try various combinations of filtering and collapsing groups
   
     ### ADDITIONAL INFORMATION
   
     - [x] Has associated issue: Fixes #37074
     - [ ] Required feature flags:
     - [ ] 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
   
    Fixes #37074


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