Skip to content

[SDK-431] notification-buttons-overflow-with-large-text#859

Open
lposen wants to merge 2 commits intoemb-ootb/masterfrom
loren/embedded/SDK-431-notification-buttons-overflow-with-large-text
Open

[SDK-431] notification-buttons-overflow-with-large-text#859
lposen wants to merge 2 commits intoemb-ootb/masterfrom
loren/embedded/SDK-431-notification-buttons-overflow-with-large-text

Conversation

@lposen
Copy link
Copy Markdown
Contributor

@lposen lposen commented Apr 22, 2026

🔹 JIRA Ticket(s) if any

✏️ Description

Fix long buttons overflowing container
Screenshot 2026-04-22 at 4 51 45 PM

@lposen lposen requested a review from Copilot April 22, 2026 23:54
@github-actions
Copy link
Copy Markdown

Lines Statements Branches Functions
Coverage: 67%
67.5% (484/717) 53.57% (180/336) 64.4% (161/250)

@qltysh
Copy link
Copy Markdown

qltysh Bot commented Apr 22, 2026

Qlty


Coverage Impact

This PR will not change total coverage.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@@ -88,7 +88,6 @@ export const Embedded = () => {

return (
<SafeAreaView style={styles.container}>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The changes that I made to this file is just so that the example page is not so crowded

@qltysh
Copy link
Copy Markdown

qltysh Bot commented Apr 22, 2026

2 new issues

Tool Category Rule Count
qlty Structure Function with high complexity (count = 9): Embedded 2

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Addresses SDK-431 by preventing long CTA button text in Embedded Notification views from overflowing its container, improving layout resilience for localized/large button titles.

Changes:

  • Truncate Notification button titles to a single line with tail ellipsis.
  • Update Notification button/container flex styles to allow shrinking and wrapping within the container.
  • Adjust related styling/example UI (Banner button font weight; example Embedded screen layout tweaks).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/embedded/components/IterableEmbeddedNotification/IterableEmbeddedNotification.tsx Adds numberOfLines + ellipsizeMode to prevent long CTA text overflow.
src/embedded/components/IterableEmbeddedNotification/IterableEmbeddedNotification.styles.ts Updates flex/wrapping/shrinking styles for buttons and button text.
src/embedded/components/IterableEmbeddedBanner/IterableEmbeddedBanner.styles.ts Changes banner button text weight (unrelated to stated PR scope).
example/src/components/Embedded/Embedded.tsx Reworks example screen controls/layout.
example/src/components/Embedded/Embedded.styles.ts Adds new example styles; minor formatting inconsistency introduced.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 100 to 103
<Text
ellipsizeMode="tail"
numberOfLines={1}
style={[
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

New truncation behavior (numberOfLines/ellipsizeMode) isn’t covered by tests. Since this repo already has @testing-library tests for IterableEmbeddedNotification, add an assertion that the button title renders with numberOfLines={1} (and ellipsizeMode="tail") so this overflow fix doesn’t regress.

Copilot uses AI. Check for mistakes.
Comment on lines 35 to 38
buttonText: {
fontSize: 14,
fontWeight: '400',
fontWeight: '700',
lineHeight: 20,
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

This PR is scoped to fixing Notification button overflow, but this change also alters Banner button typography (fontWeight 400 → 700). If this is intended, please mention it in the PR description / ticket context; otherwise consider reverting or splitting into a separate PR to avoid unexpected visual changes for Banner consumers.

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +36
container:{
...container,
marginHorizontal: 0,
marginTop: 0,
paddingHorizontal: 0,
},
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

Minor formatting inconsistency: container:{ is missing a space after the colon. Other style objects in the example app use key: { (e.g., Commerce.styles.ts). Update to container: { to keep formatting consistent and avoid churn in future diffs.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants