feat(components): Add Stack and Columns layout components#2941
Open
Shubhdeep12 wants to merge 4 commits intoresend:canaryfrom
Open
feat(components): Add Stack and Columns layout components#2941Shubhdeep12 wants to merge 4 commits intoresend:canaryfrom
Shubhdeep12 wants to merge 4 commits intoresend:canaryfrom
Conversation
…' to package.json and index.ts. - Updated docs.json to include new components in the documentation.
|
@Shubhdeep12 is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: d1759c5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
Contributor
There was a problem hiding this comment.
2 issues found across 23 files
Confidence score: 3/5
- Some risk due to layout behavior in email clients; the issues are user-visible in Outlook and could affect spacing/alignment.
packages/stack/src/stack.tsxusesmarginBottomon table rows for gaps, which Outlook may ignore and collapse spacing.- Pay close attention to
packages/stack/src/stack.tsxandpackages/columns/src/columns.tsx- Outlook table/padding width handling may break intended layout.
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/stack/src/stack.tsx">
<violation number="1" location="packages/stack/src/stack.tsx:30">
P2: Stack uses `marginBottom` on a `<table>` (`Row`) to implement gaps, but Outlook (Word rendering engine) does not reliably support margins on tables, so spacing can collapse in Outlook clients.</violation>
</file>
<file name="packages/columns/src/columns.tsx">
<violation number="1" location="packages/columns/src/columns.tsx:38">
P2: Column widths are set to 100/cols% while horizontal gap is added via left/right padding on each <Column>. In email clients (especially Outlook), <td> padding adds to the effective cell width when a width is set, so the total width exceeds 100% and columns can overflow or wrap. Consider reducing widths to account for the gap or using spacer cells/nested tables for gutters instead of padding on width‑constrained cells.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
- Enhanced gap handling in <Columns> and <Stack> components to use spacer columns and padding for better Outlook compatibility. - Updated documentation to clarify the implementation of gaps and their effects on layout. - Adjusted tests to reflect changes in gap application and ensure accurate rendering.
Contributor
There was a problem hiding this comment.
1 issue found across 5 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/columns/src/columns.tsx">
<violation number="1" location="packages/columns/src/columns.tsx:56">
P2: `cols` is ignored when `gap` is provided because widths are divided by `n` (children count) instead of `cols`, leading to inconsistent layout behavior based on whether `gap` is set.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
- Updated the gap calculation logic in the Columns component to ensure proper distribution of space when gaps are applied. - Adjusted the calculation to use the correct number of columns, improving layout consistency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@react-email/stack- vertical stacking with gap@react-email/columns- horizontal columns with gap and optional columnWidths@react-email/componentsstack.mdxandcolumns.mdxrelated #2940