Skip to content

Conversation

thecodealchemy
Copy link

@thecodealchemy thecodealchemy commented Sep 16, 2025

What does this PR do?

  • Replaces text-based action buttons with icons on the domain settings page.

Why?

  • Improves UI consistency and reduces clutter.

Related issue

Fixes #405
#405

nixopus_issues_405.mp4

Summary by CodeRabbit

  • New Features
    • Added hover tooltips to Edit and Delete actions, showing clear labels for each icon.
  • Style
    • Replaced text-based Edit/Delete buttons with compact icon-only buttons (Edit, Trash) for a cleaner, space-saving UI.
    • Updated hover states and sizing for improved visual consistency.
  • Refactor
    • Internal UI rendering streamlined without changing behaviors or dialogs (edit/delete flows remain the same).

Copy link
Contributor

coderabbitai bot commented Sep 16, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Replaces text-based Edit/Delete buttons with icon-only buttons wrapped in tooltips in the domain settings DomainActions component. Keeps existing handlers and modal flow unchanged. Imports lucide-react icons (Edit, Trash2) and Tooltip components. Adjusts button styling to small icon buttons while preserving component signature.

Changes

Cohort / File(s) Summary of Changes
Domain settings UI actions
view/app/settings/domains/components/domain-actions.tsx
Switched text buttons to icon-only buttons (Edit, Trash2) with Tooltip wrappers; added Tooltip imports; maintained handleEdit/handleDelete triggering UpdateDomainDialog/DeleteDomain modals; updated styling for small icon buttons; no public API/signature changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant DomainActions
  participant Tooltip
  participant UpdateDomainDialog as EditDialog
  participant DeleteDomain as DeleteDialog

  User->>DomainActions: Hover Edit icon
  DomainActions->>Tooltip: Show "Edit" label
  User->>DomainActions: Click Edit icon
  DomainActions->>EditDialog: Open edit modal

  User->>DomainActions: Hover Delete icon
  DomainActions->>Tooltip: Show "Delete" label
  User->>DomainActions: Click Delete icon
  DomainActions->>DeleteDialog: Open delete modal
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

nixopus-view

Suggested reviewers

  • raghavyuva
  • zhravan

Poem

A twitch of whiskers, click so neat,
Icons hop where words once sat—how sweet! 🐇
Tooltips whisper what they mean,
Edit, Delete—sleek and clean.
In fields of domains, I proudly preen. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "Replace text actions with icons on domain settings page (Fixes #405)" concisely and accurately summarizes the primary change and references the linked issue; it clearly communicates the main intent (replace text Edit/Delete actions with icons and tooltips) for a reviewer scanning history.
Linked Issues Check ✅ Passed Based on the diff for view/app/settings/domains/components/domain-actions.tsx, the PR replaces text-based Edit/Delete actions with lucide-react icon buttons, wraps them in TooltipTrigger/TooltipContent so tooltips show action labels, and preserves existing handlers and component signatures, which meets the coding objectives of issue #405. The implementation uses lucide-react icons and tooltips as requested, but the change is limited to this single DomainActions component so I cannot verify from the PR alone whether every other domain listing in the repo is covered by this update.
Out of Scope Changes Check ✅ Passed The changes are confined to UI replacements within view/app/settings/domains/components/domain-actions.tsx (icon buttons, tooltip imports, and styling adjustments) with no public API/signature changes or edits to unrelated files, so there are no apparent out-of-scope modifications in this PR.

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
view/app/settings/domains/components/domain-actions.tsx (2)

31-45: Add accessible name and prevent unintended form submit.

Icon-only buttons need an accessible name; tooltips don’t provide one to AT. Also explicitly set type="button".

Apply this diff:

           <TooltipTrigger asChild>
             <Button 
               variant="ghost" 
               size="sm"
               className="h-8 w-8 p-0 text-primary hover:text-primary/80 hover:bg-primary/10" 
-              onClick={handleEdit}
+              onClick={handleEdit}
+              type="button"
+              aria-label={t('settings.domains.actions.edit')}
+              title={t('settings.domains.actions.edit')}
             >
-              <Edit className="h-4 w-4" />
+              <Edit aria-hidden="true" className="h-4 w-4" />
             </Button>

33-36: Optional: increase hit area on small screens.

Consider 40–44px targets for touch. Example: make default h/w 10 (40px) and reduce on md+.

-              className="h-8 w-8 p-0 text-primary hover:text-primary/80 hover:bg-primary/10" 
+              className="h-10 w-10 md:h-8 md:w-8 p-0 text-primary hover:text-primary/80 hover:bg-primary/10" 
-              className="h-8 w-8 p-0 text-destructive hover:text-destructive/90 hover:bg-destructive/10" 
+              className="h-10 w-10 md:h-8 md:w-8 p-0 text-destructive hover:text-destructive/90 hover:bg-destructive/10" 

Also applies to: 51-54

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6777ca8 and 288f584.

📒 Files selected for processing (1)
  • view/app/settings/domains/components/domain-actions.tsx (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
view/app/settings/domains/components/domain-actions.tsx (1)
view/components/rbac/PermissionGuard.tsx (1)
  • ResourceGuard (78-95)
🔇 Additional comments (2)
view/app/settings/domains/components/domain-actions.tsx (2)

3-4: LGTM on imports.

Correctly pulls Tooltip bits and lucide icons per issue #405.


48-62: Use semantic destructive tokens + add a11y props (and type).

Destructive tokens exist in the repo (view/components/colors.ts, view/components/ui/button.tsx, view/app/globals.css) — replace the hard-coded red classes and add type/ARIA as shown below.

           <TooltipTrigger asChild>
             <Button 
               variant="ghost" 
               size="sm"
-              className="h-8 w-8 p-0 text-red-500 hover:text-red-600 hover:bg-red-50" 
+              className="h-8 w-8 p-0 text-destructive hover:text-destructive/90 hover:bg-destructive/10" 
               onClick={handleDelete}
+              type="button"
+              aria-label={t('settings.domains.actions.delete')}
+              title={t('settings.domains.actions.delete')}
             >
-              <Trash2 className="h-4 w-4" />
+              <Trash2 aria-hidden="true" className="h-4 w-4" />
             </Button>

Confirm there are no visible text-labeled "Edit"/"Delete" Buttons under view/app/settings/domains — the prior grep for those labels failed with "unrecognized file type: tsx", so re-run the search without a file-type filter or verify manually.

Copy link
Collaborator

@zhravan zhravan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your time and contribution!! Really appreciate your efforts on the first contribution!!

Stay around look for more issues, we have plenty more coming. Look forward for more contributions 💚

PR LGTM

@zhravan zhravan changed the base branch from master to feat/develop September 16, 2025 07:08
@zhravan zhravan deleted the branch raghavyuva:feat/develop September 16, 2025 20:37
@zhravan zhravan closed this Sep 16, 2025
@zhravan zhravan reopened this Sep 16, 2025
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.

enhancement: replace text actions with icons on domain settings page
3 participants