fix: add break-word rule for text widgets#35046
Conversation
WalkthroughThe recent updates to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant WDSParagraphWidget
participant Text
User->>WDSParagraphWidget: Request paragraph
WDSParagraphWidget->>Text: Render text with wordBreak="break-word"
Text-->>WDSParagraphWidget: Return formatted text
WDSParagraphWidget-->>User: Display paragraph
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (4)
- app/client/packages/design-system/widgets/src/components/Text/src/Text.tsx (2 hunks)
- app/client/packages/design-system/widgets/src/components/Text/src/styles.module.css (1 hunks)
- app/client/packages/design-system/widgets/src/components/Text/src/types.ts (1 hunks)
- app/client/src/widgets/wds/WDSParagraphWidget/widget/index.tsx (1 hunks)
Files skipped from review due to trivial changes (2)
- app/client/packages/design-system/widgets/src/components/Text/src/styles.module.css
- app/client/packages/design-system/widgets/src/components/Text/src/types.ts
Additional comments not posted (3)
app/client/packages/design-system/widgets/src/components/Text/src/Text.tsx (2)
25-25: Good job on adding thewordBreakproperty!This addition enhances the flexibility of text handling within the component. Setting a default value of
"break-all"ensures that text will wrap appropriately if no specific value is provided.
46-46: Well done on utilizing thewordBreakproperty in the inline style!Incorporating the
wordBreakproperty here ensures that the text wrapping behavior is applied as intended.app/client/src/widgets/wds/WDSParagraphWidget/widget/index.tsx (1)
75-75: Nice addition of thewordBreakproperty!Adding
wordBreak="break-word"improves text rendering by allowing long words to break and wrap onto the next line, enhancing the overall layout and readability.
e7bcfda to
d0f7b27
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (2)
app/client/cypress/snapshots/AnvilHeadingWidgetSnapshot_spec.ts/anvilHeadingWidgetDeployIphone6.snap.pngis excluded by!**/*.pngapp/client/cypress/snapshots/AnvilParagraphWidgetSnapshot_spec.ts/anvilParagraphWidgetDeployIphone6.snap.pngis excluded by!**/*.png
Files selected for processing (4)
- app/client/packages/design-system/widgets/src/components/Text/src/Text.tsx (2 hunks)
- app/client/packages/design-system/widgets/src/components/Text/src/styles.module.css (1 hunks)
- app/client/packages/design-system/widgets/src/components/Text/src/types.ts (1 hunks)
- app/client/src/widgets/wds/WDSParagraphWidget/widget/index.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (4)
- app/client/packages/design-system/widgets/src/components/Text/src/Text.tsx
- app/client/packages/design-system/widgets/src/components/Text/src/styles.module.css
- app/client/packages/design-system/widgets/src/components/Text/src/types.ts
- app/client/src/widgets/wds/WDSParagraphWidget/widget/index.tsx
Description
Fix text wrapping into paragraph and heading widgets
Automation
/ok-to-test tags="@tag.Anvil"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10047055173
Commit: d0f7b27
Cypress dashboard.
Tags:
@tag.AnvilSpec:
Mon, 22 Jul 2024 19:49:10 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
wordBreakproperty to the text component for improved control over text wrapping and overflow.WDSParagraphWidgetto utilize the newwordBreakproperty, improving text layout and readability.Bug Fixes
TextPropsinterface to enhance clarity.Style