Skip to content

fix: fix text overflow in repeating group table summary#4224

Open
walldenfilippa wants to merge 2 commits into
mainfrom
fix/text-overflow-repeating-group-summary
Open

fix: fix text overflow in repeating group table summary#4224
walldenfilippa wants to merge 2 commits into
mainfrom
fix/text-overflow-repeating-group-summary

Conversation

@walldenfilippa
Copy link
Copy Markdown
Contributor

@walldenfilippa walldenfilippa commented May 22, 2026

Description

• Removes white-space: nowrap from .cellValue and .cellValidationMessage in RepeatingGroupTableSummary.module.css, introduced in #4155
• Replaces with overflow-wrap: break-word on .cellValue so long text wraps within the cell instead of overflowing the screen

PR #4155 added white-space: nowrap to keep validation messages horisontaly aligned across columns — with nowrap, all cell values stay on one line so validations start at the same horisontal position. However, this caused long text to overflow the table rather than wrapping.

With this fix, validation messages in different columns may not be perfectly horisontaly aligned when eg. a cell contains long wrapping text and others do'nt. A proper alignment solution would require grid on the table rows, which is a larger refactor and should be treated as a separate issue if prioritized.

Before:
image

After:
image

Related Issue(s)

Verification/QA

  • Manual functionality testing
    • I have tested these changes manually
    • Creator of the original issue (or service owner) has been contacted for manual testing (or will be contacted when released in alpha)
    • No testing done/necessary
  • Automated tests
    • Unit test(s) have been added/updated
    • Cypress E2E test(s) have been added/updated
    • No automatic tests are needed here (no functional changes/additions)
    • I want someone to help me make some tests
  • UU/WCAG (follow these guidelines until we have our own)
    • I have tested with a screen reader/keyboard navigation/automated wcag validator
    • No testing done/necessary (no DOM/visual changes)
    • I want someone to help me perform accessibility testing
  • User documentation @ altinn-studio-docs
    • Has been added/updated
    • No functionality has been changed/added, so no documentation is needed
    • I will do that later/have created an issue
  • Support in Altinn Studio
    • Issue(s) created for support in Studio
    • This change/feature does not require any changes to Altinn Studio
  • Sprint board
    • The original issue (or this PR itself) has been added to the Team Apps project and to the current sprint board
    • I don't have permissions to do that, please help me out
  • Labels
    • I have added a kind/* and backport* label to this PR for proper release notes grouping
    • I don't have permissions to add labels, please help me out

Summary by CodeRabbit

  • Bug Fixes
    • Improved text wrapping for validation messages and cell values, ensuring proper display on mobile devices without content truncation.

Review Change Stack

@walldenfilippa walldenfilippa added kind/bug Something isn't working backport This PR should be cherry-picked onto older release branches labels May 22, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

📝 Walkthrough

Walkthrough

This PR adjusts CSS styling in the repeating group table summary component to improve text wrapping on mobile. The change removes forced no-wrap behavior from validation messages and enables word-breaking for cell values, allowing longer text to display across multiple lines instead of overflowing.

Changes

Mobile table text wrapping in repeating group summary

Layer / File(s) Summary
Cell value and validation message wrapping
src/layout/RepeatingGroup/Summary2/RepeatingGroupTableSummary/RepeatingGroupTableSummary.module.css
.cellValue gains word-break: break-word to allow long content to wrap; .cellValidationMessage no longer forces white-space: nowrap, enabling normal text wrapping behavior in mobile table layouts.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

Suggested reviewers

  • lassopicasso
  • olemartinorg
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: fixing text overflow in the repeating group table summary component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description comprehensively covers all required template sections with detailed context, related issues, and thorough verification checklist completion.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/text-overflow-repeating-group-summary

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/layout/RepeatingGroup/Summary2/RepeatingGroupTableSummary/RepeatingGroupTableSummary.module.css`:
- Line 76: The CSS rule uses the deprecated declaration "word-break: break-word"
in RepeatingGroupTableSummary.module.css; replace that declaration with the
standard "overflow-wrap: break-word" (removing the deprecated word-break line)
so the RepeatingGroupTableSummary styles use overflow-wrap to achieve the
intended wrapping behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4a7ba2aa-21b4-4885-9581-07eddfd6d52b

📥 Commits

Reviewing files that changed from the base of the PR and between 1b72f54 and 4fd4b5c.

📒 Files selected for processing (1)
  • src/layout/RepeatingGroup/Summary2/RepeatingGroupTableSummary/RepeatingGroupTableSummary.module.css

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR should be cherry-picked onto older release branches kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant