Skip to content

fix(frontend): disable repeat remove buttons - #7995

Draft
anthonychengit wants to merge 1 commit into
apache:mainfrom
anthonychengit:fix/repeat-remove-disabled
Draft

fix(frontend): disable repeat remove buttons#7995
anthonychengit wants to merge 1 commit into
apache:mainfrom
anthonychengit:fix/repeat-remove-disabled

Conversation

@anthonychengit

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Rename the repeat row's *ngFor variable so it no longer shadows the component's field. The remove buttons now read the section-level templateOptions.disabled, matching the add button.

Before After
Remove buttons stay active while the section is disabled. All remove buttons and the add button are disabled together.

Permanent rendering tests cover both directions: every remove button is disabled for a disabled section, and every remove button remains available otherwise.

Any related issues, documentation, discussions?

Closes #7431

How was this PR tested?

cd frontend
node node_modules\@angular\cli\bin\ng.js test --watch=false --include src/app/common/formly/repeat-dnd/repeat-dnd.component.spec.ts
node .yarn\releases\yarn-4.14.1.cjs run format:ci
git diff --check

Result: 14 tests passed; the frontend Prettier and ESLint CI check passed; git diff --check passed.

The before/after evidence was captured from the actual Angular component in Playwright Chromium with templateOptions.disabled = true.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: OpenAI Codex (GPT-5)

@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @yrenat, @aglinxinyuan
    You can notify them by mentioning @yrenat, @aglinxinyuan in a comment.

@github-actions github-actions Bot added fix frontend Changes related to the frontend GUI labels Aug 26, 2026
@Yicong-Huang Yicong-Huang added the release/v1.2 back porting to release/v1.2 label Aug 26, 2026
@github-actions
github-actions Bot requested a review from xuang7 August 26, 2026 18:16
@github-actions

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. release/* labels drive the post-merge backport, so add or remove one to change where this fix lands.

Release branch Analysis
release/v1.2 Change detected on this branch — label added; this fix is queued to backport here. Requested review from @xuang7.

Auto-label run.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.21%. Comparing base (5de9bf9) to head (8341d1d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #7995   +/-   ##
=========================================
  Coverage     93.21%   93.21%           
  Complexity     4664     4664           
=========================================
  Files          1175     1175           
  Lines         47646    47646           
  Branches       5319     5319           
=========================================
+ Hits          44413    44414    +1     
  Misses         1752     1752           
+ Partials       1481     1480    -1     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from 5de9bf9
agent-service 99.32% <ø> (ø) Carriedforward from 5de9bf9
amber 89.31% <ø> (ø) Carriedforward from 5de9bf9
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from 5de9bf9
config-service 86.73% <ø> (ø) Carriedforward from 5de9bf9
file-service 86.70% <ø> (ø) Carriedforward from 5de9bf9
frontend 95.67% <100.00%> (+<0.01%) ⬆️
notebook-migration-service 79.31% <ø> (ø) Carriedforward from 5de9bf9
pyamber 97.74% <ø> (ø) Carriedforward from 5de9bf9
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from 5de9bf9

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aglinxinyuan

Copy link
Copy Markdown
Contributor

Please add a before-and-after screenshot.

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

Labels

fix frontend Changes related to the frontend GUI release/v1.2 back porting to release/v1.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repeat section's remove button is never disabled: ngFor shadows the field it reads

4 participants