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: Introduce a library for embedded iframe <-> host communication #18652

Merged
merged 14 commits into from Feb 12, 2022

Conversation

suddjian
Copy link
Member

SUMMARY

This library is pretty simple, the code comments should explain everything.

This also uses the new library to provide a method to the sdk.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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

@@ -22,7 +22,7 @@
"module": "lib/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc & babel src --out-dir lib --extensions '.ts,.tsx' & webpack --mode production",
"build": "tsc ; babel src --out-dir lib --extensions '.ts,.tsx' ; webpack --mode production",
Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't realize this before but & actually starts a process in the background instead of working like Promise.all

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"build": "tsc ; babel src --out-dir lib --extensions '.ts,.tsx' ; webpack --mode production",
"build": "tsc && babel src --out-dir lib --extensions '.ts,.tsx' && webpack --mode production",

I suggest use && to execute that in series only if the predecessor was successful. In other words, stop as soon as an error occurs.

Copy link
Member Author

@suddjian suddjian Feb 11, 2022

Choose a reason for hiding this comment

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

These aren't really dependent on each other's result. Running each of them regardless of the others' status can output more useful information in the case of an error. Ideally I'd like to run them in parallel and wait for all to complete before the command exits, but I am not familiar with a convenient way to do that without writing a script, and that seems like overkill since these all run in about a second.

Copy link
Member

@lilykuang lilykuang left a comment

Choose a reason for hiding this comment

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

LGTM. please fix lint before merge :)

@codecov
Copy link

codecov bot commented Feb 10, 2022

Codecov Report

Merging #18652 (b48e636) into master (85c8d01) will decrease coverage by 0.08%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18652      +/-   ##
==========================================
- Coverage   66.30%   66.22%   -0.09%     
==========================================
  Files        1595     1605      +10     
  Lines       62629    62797     +168     
  Branches     6308     6341      +33     
==========================================
+ Hits        41527    41585      +58     
- Misses      19453    19560     +107     
- Partials     1649     1652       +3     
Flag Coverage Δ
javascript 51.28% <80.00%> (-0.09%) ⬇️

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

Impacted Files Coverage Δ
superset-frontend/src/embedded/index.tsx 0.00% <0.00%> (ø)
...ackages/superset-ui-switchboard/src/switchboard.ts 100.00% <100.00%> (ø)
.../src/explore/components/DataTableControl/index.tsx 74.28% <0.00%> (-23.09%) ⬇️
...et-frontend/src/explore/reducers/exploreReducer.js 25.71% <0.00%> (-7.62%) ⬇️
...re/components/controls/DatasourceControl/index.jsx 72.36% <0.00%> (-5.90%) ⬇️
.../src/dashboard/components/BuilderComponentPane.tsx 78.94% <0.00%> (-4.39%) ⬇️
...tiveFilters/FiltersConfigModal/FilterTitlePane.tsx 81.25% <0.00%> (-3.75%) ⬇️
...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx 59.01% <0.00%> (-0.86%) ⬇️
...eFilters/FiltersConfigModal/FiltersConfigModal.tsx 79.39% <0.00%> (-0.24%) ⬇️
.../explore/components/ExploreViewContainer/index.jsx 56.98% <0.00%> (-0.16%) ⬇️
... and 80 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85c8d01...b48e636. Read the comment docs.

@suddjian suddjian merged commit 225015f into apache:master Feb 12, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 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 preset-io size/XL 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants