Skip to content

fix: disable actions for unavailable table rows - #223

Open
hellsontime wants to merge 3 commits into
mainfrom
feat/disable-unavailable-table-actions
Open

fix: disable actions for unavailable table rows#223
hellsontime wants to merge 3 commits into
mainfrom
feat/disable-unavailable-table-actions

Conversation

@hellsontime

@hellsontime hellsontime commented Jul 30, 2026

Copy link
Copy Markdown
  • Disable declarative action buttons when resource.isAvailable is false.
  • Prevent unavailable table rows and their actions from emitting click events.
  • Use the resource status as the disabled action's accessible name.

Supports platform-mesh/portal-ui-lib#438.

Tests: npm test — 454 tests passed.

Summary by CodeRabbit

  • New Features

    • Resource buttons now reflect unavailable states with disabled behavior and appropriate accessible names.
    • Table rows now support availability-aware click handling.
  • Bug Fixes

    • Prevented click events from being emitted for unavailable resource buttons and table rows.
    • Restored pointer interaction styling for disabled table elements.

Signed-off-by: Roman Konopeshko <hellsontime@gmail.com>
@hellsontime
hellsontime requested review from a team as code owners July 30, 2026 08:51
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d85b356e-e207-4997-8c28-9ee504a1fcd9

📥 Commits

Reviewing files that changed from the base of the PR and between 582b92a and 47f5bd5.

📒 Files selected for processing (7)
  • projects/ngx/declarative-ui/resource-field/resource-field.component.html
  • projects/ngx/declarative-ui/resource-field/resource-field.component.spec.ts
  • projects/ngx/declarative-ui/resource-field/resource-field.component.ts
  • projects/ngx/declarative-ui/table/declarative-table/declarative-table.component.html
  • projects/ngx/declarative-ui/table/declarative-table/declarative-table.component.scss
  • projects/ngx/declarative-ui/table/declarative-table/declarative-table.component.spec.ts
  • projects/ngx/declarative-ui/table/declarative-table/declarative-table.component.ts

📝 Walkthrough

Walkthrough

Unavailable resources no longer emit button or table-row click events. ResourceField buttons expose disabled state and availability-aware accessible names, while DeclarativeTable routes row clicks through an availability check.

Changes

Unavailable resource interactions

Layer / File(s) Summary
ResourceField button availability handling
projects/ngx/declarative-ui/resource-field/resource-field.component.*
ResourceField derives disabled and accessible-name state for unavailable resources, binds those values to ui5-button, suppresses buttonClick, and adds tests.
DeclarativeTable row availability handling
projects/ngx/declarative-ui/table/declarative-table/declarative-table.component.*
Table row clicks now pass through onRowClick, which suppresses tableRowClicked for unavailable resources; styling and coverage are updated accordingly.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: enhancement

Suggested reviewers: gkrajniak, lpgarzonr, sobyt483

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: disabling actions for unavailable table rows and related button behavior.
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.
✨ 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 feat/disable-unavailable-table-actions

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.

Signed-off-by: Roman Konopeshko <hellsontime@gmail.com>
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.

2 participants