Skip to content

Conversation

olemartinorg
Copy link
Contributor

@olemartinorg olemartinorg commented Sep 25, 2025

Description

This property was not supported in RepeatingGroup table cells

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

  • New Features

    • Added configurable text wrapping for Repeating Group cells via a new setting that toggles word-break between breaking long words and normal wrapping, giving better control over column text layout.
  • Style

    • Standardized word-break behavior across the app for more consistent, theme-friendly rendering and improved readability.

@olemartinorg olemartinorg self-assigned this Sep 25, 2025
@olemartinorg olemartinorg added kind/bug Something isn't working backport-ignore This PR is a new feature and should not be cherry-picked onto release branches labels Sep 25, 2025
Copy link

coderabbitai bot commented Sep 25, 2025

📝 Walkthrough

Walkthrough

Introduces a configurable CSS variable --cell-word-break used by RepeatingGroup; getColumnStyles now sets --cell-word-break to break-word or normal based on columnSettings.textOverflow?.lineWrap; tests updated to expect the new CSS property.

Changes

Cohort / File(s) Summary
Styling: RepeatingGroup word-break variable
src/layout/RepeatingGroup/RepeatingGroup.module.css
Replaced hard-coded word-break: break-word with word-break: var(--cell-word-break) and introduced the --cell-word-break variable.
Utils: Column styles hook for word-break
src/utils/formComponentUtils.ts
getColumnStyles now derives lineWrap and sets --cell-word-break to break-word when columnSettings.textOverflow?.lineWrap is true, otherwise normal.
Tests: update expected column styles
src/utils/formComponentUtils.test.ts
Updated tests to include the new --cell-word-break CSS property, expecting break-word or normal per lineWrap.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description follows the template structure but omits a proper issue reference (using a Slack link instead of a “closes #”), leaves the automated tests section unmarked despite test updates, and does not fully complete the Verification/QA checkboxes as required by the repository template. Please update the Related Issue(s) section to use a formal “closes #” entry, mark or clarify the Automated tests section to reflect the added test changes or confirm no tests are needed, and ensure all Verification/QA checkboxes are completed according to the template.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly states that the textOverflow.lineWrap feature is being implemented in the RepeatingGroup component, directly matching the main change described in the pull request summary.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bug/word-break-repgroup

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04a2d54 and 8c2b239.

📒 Files selected for processing (1)
  • src/utils/formComponentUtils.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/utils/formComponentUtils.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Install
  • GitHub Check: Type-checks, eslint, unit tests and SonarCloud

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.

@olemartinorg olemartinorg added the squad/utforming Issues that belongs to the named squad. label Sep 26, 2025
@olemartinorg olemartinorg moved this to 🔎 In review in Team Altinn Studio Sep 26, 2025
@olemartinorg olemartinorg moved this from 🔎 In review to 👷 In progress in Team Altinn Studio Sep 26, 2025
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-ignore This PR is a new feature and should not be cherry-picked onto release branches kind/bug Something isn't working squad/utforming Issues that belongs to the named squad.
Projects
Status: 👷 In progress
Development

Successfully merging this pull request may close these issues.

1 participant