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

   <!---
   
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   
   Example:
   
   fix(dashboard): load charts correctly
   
   -->
   
   ### SUMMARY
   This PR is a first, targeted step toward the long‑term control panel revamp 
described in #35655: moving away from string/config‑driven controls toward 
explicit React components.
   
   Concretely, for the Word Cloud plugin:
   
   - **Rotation control**: replaced the old config‑object entry in 
`controlPanel.tsx` with a dedicated `RotationControl` React component, and 
wired it through `ControlPanelsContainer` so it receives `value`/`onChange` and 
uses `renderTrigger` for live updates.
   - **Color scheme control**: replaced the `color_scheme` string reference 
with a `ColorSchemeControlWrapper` React component, backed by a local copy of 
the Explore `ColorSchemeControl`. This keeps the plugin self‑contained while 
letting the control behave like any other React component (props, `onChange`, 
`renderTrigger`).
   - **Control layout & state**: left the higher‑level 
`controlPanelSections`/`controlSetRows` structure intact (per the “start small” 
guidance), but proved that individual controls can be swapped from 
config/string references to React components without breaking existing behavior.
   - **Tests**: added focused tests for `RotationControl` and for the Word 
Cloud `controlPanel` to ensure the new React controls are present in the 
`Options` section and correctly wired.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   _Not applicable – this change affects Explore control behavior, not the 
visual layout._
   
   ### TESTING INSTRUCTIONS
   
   1. **Install frontend deps (if needed)**
   
     
      cd superset-frontend
      npm install
      2. **Frontend type checking (includes Word Cloud plugin)**
   
      From the repo root:
   
     
      pre-commit run --all-files type-checking-frontend
      3. **Run Word Cloud plugin tests**
   
      From `superset-frontend`:
   
     
      npm run test -- 
plugins/plugin-chart-word-cloud/test/RotationControl.test.tsx
      npm run test -- plugins/plugin-chart-word-cloud/test/controlPanel.test.ts
      4. **Manual verification in Explore**
   
      - Start Superset and open a **Word Cloud** chart in Explore.
      - In the **Options** section:
        - Change **Word Rotation** and confirm the chart updates immediately 
without clicking **Update chart**.
        - Change **Color scheme** and confirm the chart updates immediately 
without clicking **Update chart**.
      - Confirm both controls are present under **Options** and behave as 
expected on a couple of different datasets.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI  
     (Explore behavior for Word Cloud changes: rotation and color scheme now 
live‑update.)
   - [ ] 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