Skip to content

feat: add edit functionality to BindingDetailDialog#447

Merged
stefinie123 merged 1 commit intoopenchoreo:mainfrom
stefinie123:ac-ui-fixes
Mar 19, 2026
Merged

feat: add edit functionality to BindingDetailDialog#447
stefinie123 merged 1 commit intoopenchoreo:mainfrom
stefinie123:ac-ui-fixes

Conversation

@stefinie123
Copy link
Contributor

@stefinie123 stefinie123 commented Mar 19, 2026

Purpose

Add edit functionality to BindingDetailDialog

Screen.Recording.2026-03-19.at.13.47.29.mov

Summary by CodeRabbit

  • New Features
    • Added edit functionality to the binding details dialog, allowing users to modify role bindings directly when they have update permissions.
    • Updated dialog title to display the binding name instead of the scope label.

- Introduced an optional `onEdit` prop to the BindingDetailDialog component, allowing users to trigger an edit action.
- Updated the dialog title to display the binding name instead of a static label.
- Integrated the edit functionality into both ClusterRoleBindingsContent and NamespaceRoleBindingsContent components, enabling editing of selected bindings.

Signed-off-by: Stefinie Fernando <minolispencer@gmail.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 096f29c6-058b-465c-b003-9511bfbe928f

📥 Commits

Reviewing files that changed from the base of the PR and between 1306d45 and 41e3da4.

📒 Files selected for processing (3)
  • plugins/openchoreo/src/components/AccessControl/MappingsTab/BindingDetailDialog.tsx
  • plugins/openchoreo/src/components/AccessControl/MappingsTab/ClusterRoleBindingsContent.tsx
  • plugins/openchoreo/src/components/AccessControl/MappingsTab/NamespaceRoleBindingsContent.tsx

📝 Walkthrough

Walkthrough

The BindingDetailDialog component's API is refactored to replace the scopeLabel prop with binding.name for the dialog title and introduce an optional onEdit callback. This enables editing from the detail view. Both ClusterRoleBindingsContent and NamespaceRoleBindingsContent are updated to conditionally pass an edit handler that looks up and invokes editing for the selected binding.

Changes

Cohort / File(s) Summary
BindingDetailDialog Component Update
plugins/openchoreo/src/components/AccessControl/MappingsTab/BindingDetailDialog.tsx
Updated props interface to add optional onEdit callback and remove scopeLabel string prop. Changed dialog title to use binding.name instead of ${scopeLabel} Role Binding Details. Added conditional "Edit" button in DialogActions that invokes onEdit when provided.
Role Bindings Content Consumers
plugins/openchoreo/src/components/AccessControl/MappingsTab/ClusterRoleBindingsContent.tsx, plugins/openchoreo/src/components/AccessControl/MappingsTab/NamespaceRoleBindingsContent.tsx
Updated BindingDetailDialog invocation to conditionally provide onEdit handler when canUpdate is true and detailBinding is available. Handler performs name-based lookup in bindings, clears detail state, and invokes handleEditBinding. Removed scope-specific scopeLabel prop usage.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • sameerajayasoma
  • jhivandb
  • kaviththiranga

Poem

🐰 A rabbit hops through the code with glee,
Edit buttons bloom where details be,
No labels cluttering the binding name,
From cluster to namespace, all the same,
Details dance with edit's gleaming call! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete and largely off-template. It provides only a Purpose section with minimal detail and lacks Goals, Approach, User stories, Release notes, Documentation, and other required sections from the template. Complete the description by adding Goals, Approach (with UI/UX details if applicable), User stories, Release notes, Documentation impact, and other required template sections to provide comprehensive context for reviewers.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding edit functionality to BindingDetailDialog, which aligns with the primary modifications across all three files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@stefinie123 stefinie123 merged commit 208b570 into openchoreo:main Mar 19, 2026
6 checks passed
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