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

chore: Feature flag for embedding charts #20804

Merged
merged 5 commits into from
Jul 26, 2022
Merged

Conversation

geido
Copy link
Member

@geido geido commented Jul 21, 2022

SUMMARY

Users of Superset might not want to give the ability to embed charts, especially as embedding uses iFrames that might be disabled for security reasons. This PR adds a EMBEDDABLE_CHARTS flag to the config to enable/disable embedding charts. Default to True.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshot 2022-07-21 at 15 58 51

Screenshot 2022-07-21 at 15 59 29

TESTING INSTRUCTIONS

Set the feature flag off and make sure the Embed code option isn't appearing as a Share option in Explore.

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 Jul 21, 2022

Codecov Report

Merging #20804 (855318b) into master (922b4b8) will increase coverage by 0.04%.
The diff coverage is 95.95%.

❗ Current head 855318b differs from pull request most recent head bffa407. Consider uploading reports for the commit bffa407 to get more accurate results

@@            Coverage Diff             @@
##           master   #20804      +/-   ##
==========================================
+ Coverage   66.29%   66.34%   +0.04%     
==========================================
  Files        1758     1756       -2     
  Lines       66801    66749      -52     
  Branches     7055     7060       +5     
==========================================
- Hits        44288    44284       -4     
+ Misses      20713    20667      -46     
+ Partials     1800     1798       -2     
Flag Coverage Δ
javascript 51.98% <94.44%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
...ackages/superset-ui-core/src/query/types/Column.ts 100.00% <ø> (ø)
...ackages/superset-ui-core/src/utils/featureFlags.ts 100.00% <ø> (ø)
.../plugin-chart-echarts/src/MixedTimeseries/index.ts 25.00% <ø> (ø)
...ols/DndColumnSelectControl/ColumnSelectPopover.tsx 3.75% <0.00%> (ø)
...tend/src/explore/components/controls/ViewQuery.tsx 72.72% <ø> (ø)
superset/config.py 91.47% <ø> (ø)
superset/views/core.py 75.64% <50.00%> (-0.04%) ⬇️
superset/views/datasource/utils.py 95.34% <95.34%> (ø)
...et-ui-chart-controls/src/components/labelUtils.tsx 100.00% <100.00%> (ø)
...perset-ui-core/src/chart/components/SuperChart.tsx 100.00% <100.00%> (ø)
... and 13 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM

@apache apache deleted a comment from github-actions bot Jul 26, 2022
@geido
Copy link
Member Author

geido commented Jul 26, 2022

/testenv up FEATURE_EMBEDDABLE_CHARTS=false

@github-actions
Copy link
Contributor

@geido Ephemeral environment spinning up at http://34.214.222.137:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@geido geido merged commit a69f016 into master Jul 26, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@mistercrunch mistercrunch added 🏷️ 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
@mistercrunch mistercrunch deleted the chore/embedded_chart_flag branch March 26, 2024 16:08
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 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants