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

   Fixes #37678
   
   ### SUMMARY
   This PR enables conditional formatting for categorical columns (String and 
Boolean)
   in both the Standard Table plugin and the AG Grid Table plugin.
   
   Previously, categorical columns were blocked by control panel filtering 
logic,
   even though the conditional formatting UI already supported categorical 
operators.
   
   This change removes those restrictions and allows categorical columns to be 
used
   in conditional formatting rules.
   
   Changes made:
   
   Standard Table plugin
   File:
   superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx
   
   - Removed the `!hasTimeComparison` restriction that prevented String and 
Boolean
     columns from appearing in the conditional formatting selector.
   - Updated description text from:
     "Apply conditional color formatting to numeric columns"
     to:
     "Apply conditional color formatting to columns".
   
   AG Grid Table plugin
   File:
   superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx
   
   - Updated filtering logic to include:
     - GenericDataType.String
     - GenericDataType.Boolean
     in addition to GenericDataType.Numeric.
   - Updated description/label text for consistency.
   
   User impact:
   - String columns now support operators like:
     equals, begins with, ends with, contains, not contains
   - Boolean columns now support operators like:
     is true, is false, is null, is not null
   
   Technical notes:
   - Reused existing `GenericDataType` enum.
   - Minimal, targeted diff without structural refactoring.
   - Code formatted using Prettier.
   
   All relevant tests passed (254 tests).
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Not applicable.
   
   ### TESTING INSTRUCTIONS
   1. Run Superset locally.
   2. Create or open a dataset containing:
      - String columns
      - Boolean columns
   3. Create a Table visualization (Standard Table or AG Grid Table).
   4. Open "Conditional Formatting".
   5. Verify that:
      - String columns appear in the column selector
      - Boolean columns appear in the column selector
   6. Add formatting rules using categorical operators.
   7. Confirm formatting applies correctly in the rendered table.
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: Fixes #37678
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in SIP-59)
     - [ ] 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