fix(#413): use max of boundingRect and scrollHeight for email iframe …#471
fix(#413): use max of boundingRect and scrollHeight for email iframe …#471MrgSub merged 4 commits intoMail-0:stagingfrom
Conversation
|
@omp28 is attempting to deploy a commit to the Zero Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes introduce a new function, Changes
Sequence Diagram(s)sequenceDiagram
participant M as MailIframe Component
participant C as calculateAndSetHeight Function
participant B as Iframe Body
M->>C: Invoke calculateAndSetHeight (on mount)
C->>B: Check for iframe body presence
B-->>C: Return bounding rectangle height & scroll height
C->>C: Calculate max(height, scrollHeight)
C->>M: Set iframe height accordingly
Note over M: Wait for 500ms delay
M->>C: Invoke calculateAndSetHeight (after delay)
C->>B: Re-check body dimensions
B-->>C: Return updated dimensions
C->>C: Recalculate max value
C->>M: Update iframe height
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Conflicts please |
|
@MrgSub made the changes with (callback and conflicts) |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Improved Email Iframe Height Calculation
Description
This PR enhances the height calculation for mail iframes to ensure all content is visible. The change implements a more robust approach that compares both the bounding rectangle height and scroll height, using whichever is larger. This fixes issues where some email content was being cut off or not displaying properly.
Type of Change
Areas Affected
Testing Done
Security Considerations
Checklist
Screenshots/Recordings
By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.
Summary by CodeRabbit