Skip to content

Conversation

@DiogoABastos
Copy link
Contributor

@DiogoABastos DiogoABastos commented Nov 7, 2025

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation
  • Other... Please describe:

What is the current behaviour? (You can also link to an open issue here)

What is the new behaviour?
Improvements:

  • Improve placement for x delete button for rows. (specially in tab and mobile view)
  • Remove newRowsLimit and add maxNumberOfRows
  • Add disabled state
  • Ensure unique row id is reflected in each widget for each row
  • Add tooltip on hover on delete row cross button

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

@DiogoABastos DiogoABastos requested a review from alep85 November 10, 2025 16:38
@DiogoABastos DiogoABastos marked this pull request as ready for review November 10, 2025 16:39
@alep85 alep85 requested a review from Copilot November 10, 2025 16:45
Copy link
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

This PR refactors the repeatable section functionality in forms, renaming newRowsLimit to maxNumberOfRows for clarity and adding read-only state support for repeatable sections. The changes improve the UI/UX by repositioning the delete button and adding tooltips.

Key changes:

  • Parameter renamed from newRowsLimit to maxNumberOfRows throughout the codebase
  • Added read-only state handling for repeatable sections and their child fields
  • Refactored value update logic by extracting getFormValue() method
  • Repositioned delete row button in the UI with improved styling and tooltip support

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/core/src/lib/i18n/en.json Added translation key for "Delete row" tooltip
lib/core/src/lib/form/components/widgets/repeat/repeat.widget.spec.ts Updated parameter names and test values; removed obsolete getAddedRowsCount tests
lib/core/src/lib/form/components/widgets/repeat/repeat.widget.scss Removed collapsible cursor styles; added readonly state styling
lib/core/src/lib/form/components/widgets/repeat/repeat.widget.html Updated to use maxNumberOfRows and element.field.rows.length; added disabled state support
lib/core/src/lib/form/components/widgets/core/form-field.model.ts Major refactoring: renamed parameter, added read-only state propagation, extracted getFormValue(), updated unique ID generation
lib/core/src/lib/form/components/widgets/core/form-field.model.spec.ts Added comprehensive tests for disabled state behavior in repeatable sections
lib/core/src/lib/form/components/form-renderer.component.ts Added MatTooltipModule import
lib/core/src/lib/form/components/form-renderer.component.spec.ts Updated CSS selectors to match new button class names
lib/core/src/lib/form/components/form-renderer.component.scss Updated styles for repositioned delete button and disabled state
lib/core/src/lib/form/components/form-renderer.component.html Repositioned delete button with tooltip and disabled state support

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

@alep85 alep85 force-pushed the feature/AAE-27107-create-repeatable-section-widget-v2 branch from 31b6c1a to b764575 Compare November 10, 2025 17:19
@DiogoABastos DiogoABastos force-pushed the feature/AAE-27107-create-repeatable-section-widget-v2 branch from b764575 to 5c163db Compare November 10, 2025 18:10
@sonarqubecloud
Copy link

@DiogoABastos DiogoABastos merged commit 0d670dd into develop Nov 11, 2025
18 checks passed
@DiogoABastos DiogoABastos deleted the feature/AAE-27107-create-repeatable-section-widget-v2 branch November 11, 2025 10:09
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