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

feat: Disables HTML rendering in Toast by default #21853

Merged

Conversation

michael-s-molina
Copy link
Member

SUMMARY

This PR disables HTML rendering in toast messages by default. I couldn't find any instances of toast messages with HTML content but it is a valid use case, so I created an allowHtml property for this scenario.

TESTING INSTRUCTIONS

1 - Make sure toast messages don't render HTML by default
2 - Make sure toast messages render HTML if allowHtml is enabled

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

@michael-s-molina
Copy link
Member Author

Reviewers, please let me know if we actually have an instance where we use HTML in toast messages already. I couldn’t find one.

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

Lgtm. I'm not aware of any toast with html content

Copy link
Member

@lyndsiWilliams lyndsiWilliams left a comment

Choose a reason for hiding this comment

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

LGTM! I did a quick scour through the code and it doesn't look like we have any existing toasts with HTML, I think this should be safe to implement 😁

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.

LGTM!

@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Merging #21853 (009fc23) into master (383dc29) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #21853      +/-   ##
==========================================
- Coverage   66.93%   66.92%   -0.01%     
==========================================
  Files        1805     1805              
  Lines       69066    69070       +4     
  Branches     7369     7373       +4     
==========================================
+ Hits        46227    46228       +1     
- Misses      20932    20936       +4     
+ Partials     1907     1906       -1     
Flag Coverage Δ
javascript 53.33% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...et-frontend/src/components/MessageToasts/Toast.tsx 78.78% <ø> (ø)
...d/plugins/plugin-chart-echarts/src/utils/series.ts 84.29% <0.00%> (ø)
...ugins/plugin-chart-echarts/src/utils/annotation.ts 86.27% <0.00%> (ø)
...lugin-chart-echarts/src/Timeseries/transformers.ts 50.00% <0.00%> (ø)
...chart-echarts/src/Timeseries/EchartsTimeseries.tsx 0.00% <0.00%> (ø)
...ols/MetricControl/AdhocMetricEditPopover/index.jsx 75.53% <0.00%> (+1.06%) ⬆️

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

@michael-s-molina michael-s-molina merged commit 47b1e0c into apache:master Oct 19, 2022
AAfghahi pushed a commit that referenced this pull request Nov 1, 2022
eschutho pushed a commit that referenced this pull request Nov 2, 2022
AAfghahi pushed a commit that referenced this pull request Nov 18, 2022
AAfghahi pushed a commit that referenced this pull request Dec 15, 2022
michael-s-molina added a commit that referenced this pull request Jan 5, 2023
@mistercrunch mistercrunch added 🍒 1.5.3 🍒 2.0.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
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/XS v1.5 v2.0 v2.0.1 🍒 1.5.3 🍒 2.0.1 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants