Skip to content

fix(breakpoints)!: target the requesting iframe - #2950

Merged
doubleface merged 1 commit into
masterfrom
fix/parentBasedIframe
Jul 30, 2026
Merged

doubleface merged 1 commit into
masterfrom
fix/parentBasedIframe

Conversation

@doubleface

@doubleface doubleface commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

@bundlemon

bundlemon Bot commented Jul 29, 2026

Copy link
Copy Markdown

BundleMon

Unchanged files (3)
Status Path Size Limits
dist/cozy-ui.min.css
17.73KB -
transpiled/react/stylesheet.css
11.23KB -
dist/cozy-ui.utils.min.css
11.21KB -

No change in files bundle size

Groups updated (1)
Status Path Size Limits
transpiled/react/**
393.34KB (+32B +0.01%) -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Comment thread react/providers/Breakpoints/useIframeConnection.jsx
Comment thread react/providers/Breakpoints/useIframeToSendWidth.jsx
@JF-Cozy

JF-Cozy commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

this all thing doesn't seams to be a good idea anymore #2806 (comment) did you speak with @zatteo about iframe messaging?

@zatteo

zatteo commented Jul 29, 2026

Copy link
Copy Markdown
Member

this all thing doesn't seams to be a good idea anymore #2806 (comment) did you speak with @zatteo about iframe messaging?

I add the topic of "resizing of iframe related to useBreakpoints" in the topic related to File Picker. We may need a more general approach but we need to think to what extend our other Flutter/Calendar apps are concerned. But if it solve an issue right now, let's merge this kind of fix (taking into account the BC).

@doubleface
doubleface force-pushed the fix/parentBasedIframe branch from bfeeb1f to 61b244e Compare July 29, 2026 13:48
@doubleface doubleface changed the title fix(breakpoints): target the requesting iframe fix(breakpoints)!: target the requesting iframe Jul 29, 2026
@doubleface
doubleface force-pushed the fix/parentBasedIframe branch from 61b244e to 527fc48 Compare July 29, 2026 14:14
@JF-Cozy

JF-Cozy commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

@doubleface for the BC I prefere something really specific to avoid any thought. Could you please add this in the BC message?

So you must use const { iframeWindow } = useIframeConnection({ parentBasedIframe })and useIframeToSendWidth({ iframeWindow })

The parent breakpoint bridge assumed the intent occupied a fixed frame
index. This crashed when the requesting intent was the first or only
iframe.

Keep the message source and send initial and resized widths back to that
window.

Closes #2949

BREAKING CHANGE: replace the old hook usage with:

const { iframeWindow } = useIframeConnection({ parentBasedIframe })
useIframeToSendWidth({ iframeWindow })
@doubleface
doubleface force-pushed the fix/parentBasedIframe branch from 527fc48 to 02e2919 Compare July 30, 2026 08:29
@doubleface

Copy link
Copy Markdown
Contributor Author

@doubleface for the BC I prefere something really specific to avoid any thought. Could you please add this in the BC message?

So you must use const { iframeWindow } = useIframeConnection({ parentBasedIframe })and useIframeToSendWidth({ iframeWindow })

Done

@doubleface
doubleface merged commit b222ae2 into master Jul 30, 2026
12 checks passed
@doubleface
doubleface deleted the fix/parentBasedIframe branch July 30, 2026 08:49
@cozy-bot

Copy link
Copy Markdown

🎉 This PR is included in version 141.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

doubleface added a commit to linagora/twake-drive that referenced this pull request Jul 30, 2026
Add gap utilities and fix iframe breakpoint targeting

 cozy-ui 140.5.2 → 141.0.0
 - cozy/cozy-ui#2281
 - cozy/cozy-ui#2950
doubleface added a commit to linagora/twake-drive that referenced this pull request Jul 30, 2026
Add gap utilities and fix iframe breakpoint targeting

 cozy-ui 140.5.2 → 141.0.0
 - cozy/cozy-ui#2281
 - cozy/cozy-ui#2950
doubleface added a commit to linagora/twake-drive that referenced this pull request Jul 30, 2026
Add gap utilities and fix iframe breakpoint targeting

 cozy-ui 140.5.2 → 141.0.0
 - cozy/cozy-ui#2281
 - cozy/cozy-ui#2950
doubleface added a commit to linagora/twake-drive that referenced this pull request Jul 30, 2026
Add gap utilities and fix iframe breakpoint targeting

 cozy-ui 140.5.2 → 141.0.0
 - cozy/cozy-ui#2281
 - cozy/cozy-ui#2950
doubleface added a commit to linagora/twake-drive that referenced this pull request Jul 30, 2026
Add gap utilities and fix iframe breakpoint targeting

 cozy-ui 140.5.2 → 141.0.0
 - cozy/cozy-ui#2281
 - cozy/cozy-ui#2950
doubleface added a commit to linagora/twake-drive that referenced this pull request Jul 30, 2026
Add gap utilities and fix iframe breakpoint targeting

 cozy-ui 140.5.2 → 141.0.0
 - cozy/cozy-ui#2281
 - cozy/cozy-ui#2950
doubleface added a commit to linagora/twake-drive that referenced this pull request Jul 31, 2026
Add gap utilities and fix iframe breakpoint targeting

 cozy-ui 140.5.2 → 141.0.0
 - cozy/cozy-ui#2281
 - cozy/cozy-ui#2950
doubleface added a commit to linagora/twake-drive that referenced this pull request Jul 31, 2026
Add gap utilities and fix iframe breakpoint targeting

 cozy-ui 140.5.2 → 141.0.0
 - cozy/cozy-ui#2281
 - cozy/cozy-ui#2950
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BreakpointsProvider crashes when a parent-based iframe is the only iframe

4 participants