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

   ### SUMMARY
   
   When you convert a chart from **Big Number with Time Comparison** or 
**Table** (both offer the "Inherit range from time filter" and "Custom" time 
shifts) into a timeseries chart such as Line or Bar, the `inherit`/`custom` 
value was carried over into the new chart's **Time shift** control. The 
timeseries Advanced Analytics "Time shift" reuses the same `time_compare` 
form-data key but does not offer those options, and because the control is 
free-form the value was accepted and left as a stray tag the user had to delete 
by hand on every edit.
   
   `StandardizedFormData.transform` preserves shared controls across viz-type 
switches. It now drops `inherit`/`custom` from `time_compare` when the target 
viz type's Time shift control does not list them as choices. Portable relative 
shifts (e.g. "1 year ago") are still carried over, and `inherit`/`custom` are 
preserved when switching between viz types that both support them (e.g. Table 
to Big Number).
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   After converting a Big Number (Time Comparison) chart with Time shift = 
"Inherit" into a Line chart:
   
   | Before | After |
   | :---: | :---: |
   | ![before](https://files.catbox.moe/ejiec0.png) | 
![after](https://files.catbox.moe/thj9na.png) |
   
   ### TESTING INSTRUCTIONS
   
   1. Create a **Big Number with Time Comparison** (or **Table**) chart.
   2. In **Time Comparison**, set **Time shift** to **Inherit range from time 
filter**.
   3. Switch the visualization type to **Line Chart** (or Bar).
   4. Open **Advanced Analytics → Time Comparison**.
   5. The **Time shift** field is empty; previously it showed a lingering 
`inherit` tag.
   
   Unit tests in `standardizedFormData.test.ts` cover both stripping (target 
viz without inherit/custom) and preservation (target viz that supports them).
   
   ### 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