Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow empty CSS in Handlebars #22422

Merged

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Allow empty CSS in Handlebars and also add a tooltip about the required HTML sanitization when using CSS.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2022-12-14.at.5.02.02.PM.mov

TESTING INSTRUCTIONS

  • You should be able to save a Handlebar without any CSS text.
  • A tooltip is displayed about the required HTML sanitization when using CSS.

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Dec 14, 2022

Codecov Report

Merging #22422 (9babf44) into master (aa0cae9) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master   #22422      +/-   ##
==========================================
- Coverage   66.90%   66.89%   -0.01%     
==========================================
  Files        1850     1850              
  Lines       70677    70682       +5     
  Branches     7749     7752       +3     
==========================================
  Hits        47285    47285              
- Misses      21376    21381       +5     
  Partials     2016     2016              
Flag Coverage Δ
javascript 53.85% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ars/src/components/ControlHeader/controlHeader.tsx 50.00% <ø> (ø)
...gin-chart-handlebars/src/plugin/controls/style.tsx 28.57% <0.00%> (ø)
...ars/src/components/Handlebars/HandlebarsViewer.tsx 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

<ControlHeader>
<div>
{props.label}
<InfoTooltipWithTrigger
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might be able to inspect the config, and only show this tooltip if it's not configured properly. And perhaps not show the code editor if it's not configured properly. But that's another PR...

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! Thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M v2.0 v2.0.1 🍒 2.0.1 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants