Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

feat: add a plugin API to resize iframe by plugins #181

Merged
merged 9 commits into from
Mar 4, 2022
Merged

Conversation

rot1024
Copy link
Member

@rot1024 rot1024 commented Mar 1, 2022

type PluginAPIUI = {
  // ...
  render: (html: string, options: {
    visible?: boolean;
+   width?: number | string;
+   height?: number | string;
+   extended?: boolean;
  }) => void;
+ resize: (
+   width: number | string | undefined,
+   height: number | string | undefined,
+   extended: boolean | undefined
+ ) => void;
};

@netlify
Copy link

netlify bot commented Mar 1, 2022

✔️ Deploy Preview for reearth-web ready!

🔨 Explore the source changes: 1f9f991

🔍 Inspect the deploy log: https://app.netlify.com/sites/reearth-web/deploys/6220a78d668aaf00073f10d0

😎 Browse the preview: https://deploy-preview-181--reearth-web.netlify.app

@codecov
Copy link

codecov bot commented Mar 1, 2022

Codecov Report

Merging #181 (1f9f991) into main (f7345c5) will decrease coverage by 0.40%.
The diff coverage is 8.10%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
- Coverage   45.14%   44.74%   -0.41%     
==========================================
  Files          60       60              
  Lines        1309     1323      +14     
  Branches      212      215       +3     
==========================================
+ Hits          591      592       +1     
- Misses        659      669      +10     
- Partials       59       62       +3     
Impacted Files Coverage Δ
src/components/atoms/Plugin/IFrame/index.tsx 75.00% <ø> (ø)
src/components/atoms/Plugin/hooks.ts 2.98% <0.00%> (-0.25%) ⬇️
src/components/molecules/Visualizer/Plugin/api.ts 0.00% <0.00%> (ø)
...rc/components/molecules/Visualizer/Plugin/hooks.ts 0.00% <0.00%> (ø)
...c/components/molecules/Visualizer/Plugin/index.tsx 0.00% <0.00%> (ø)
src/components/atoms/Plugin/IFrame/hooks.ts 45.58% <18.18%> (-3.60%) ⬇️
src/components/atoms/Plugin/index.tsx 25.00% <100.00%> (ø)

@rot1024 rot1024 changed the title fix: plugin widgets are sometimes displayed with their edges cut off feat: plugin API to resize iframe by plugins Mar 2, 2022
@rot1024 rot1024 changed the title feat: plugin API to resize iframe by plugins feat: add a plugin API to resize iframe by plugins Mar 2, 2022
@rot1024 rot1024 merged commit 7c1019c into main Mar 4, 2022
@rot1024 rot1024 deleted the fix-widget-sizing branch March 4, 2022 02:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant