Settings: show Edit Profile/Organization buttons #2002
Conversation
…bile The Edit Profile and Edit Organization buttons kept their full label on small screens. Render them as labeled buttons on desktop (md+) and icon-only (size="icon" + aria-label) on mobile, mirroring the page-action buttons (e.g. "Edit Settings"). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📝 WalkthroughWalkthroughA shared responsive action button was added and adopted by three app cards. Desktop shows labeled actions, while mobile shows icon-only buttons with accessibility labels. Existing callbacks and navigation behavior remain in place. ChangesResponsive action button adoption
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
The New Ticket action in the customer details Tickets tab kept its full label on small screens. Render it labeled on desktop (md+) and icon-only (size="icon" + aria-label) on mobile, matching the Edit Profile/Organization buttons. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…obile actions Replace the duplicated two-button markup (labeled on desktop, icon-only on mobile) with a shared ResponsiveActionButton. CSS-toggled internally so there's no SSR/hydration flash. Used by Edit Profile, Edit Organization, and New Ticket. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
openframe/services/openframe-frontend/src/app/components/shared/responsive-action-button.tsx (1)
27-59: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueSolid responsive pattern; consider widening prop pass-through.
The dual-button CSS toggle correctly avoids hydration flash, and using
labelas both visible text and the icon-onlyaria-labelkeeps the mobile button accessible.One optional consideration: only
onClick,variant, anddisabledare forwarded. If a consumer later needstype,loading,id, etc., they can't pass them. A small...restspread (typed via the existingButtonProps) would future-proof this without changing current behavior.♻️ Optional: forward remaining Button props
export function ResponsiveActionButton({ label, icon, onClick, variant = 'outline', disabled, className, + ...rest }: ResponsiveActionButtonProps) {(Update the props interface to extend/pick from
ButtonProps, then spread{...rest}onto both buttons.)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@openframe/services/openframe-frontend/src/app/components/shared/responsive-action-button.tsx` around lines 27 - 59, The ResponsiveActionButton component is only forwarding a small subset of Button props, so consumers cannot pass through common options like type, loading, id, or data attributes. Update ResponsiveActionButtonProps to inherit the remaining ButtonProps and add a rest prop, then spread that rest onto both Button instances while keeping the existing responsive desktop/mobile behavior in ResponsiveActionButton unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@openframe/services/openframe-frontend/src/app/components/shared/responsive-action-button.tsx`:
- Around line 27-59: The ResponsiveActionButton component is only forwarding a
small subset of Button props, so consumers cannot pass through common options
like type, loading, id, or data attributes. Update ResponsiveActionButtonProps
to inherit the remaining ButtonProps and add a rest prop, then spread that rest
onto both Button instances while keeping the existing responsive desktop/mobile
behavior in ResponsiveActionButton unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9a363f4c-f5e3-4290-8c4d-33f724e79a6e
📒 Files selected for processing (4)
openframe/services/openframe-frontend/src/app/(app)/customers/components/details-tabs/customer-tickets-tab.tsxopenframe/services/openframe-frontend/src/app/(app)/settings/components/msp-organization-card.tsxopenframe/services/openframe-frontend/src/app/(app)/settings/components/profile-card.tsxopenframe/services/openframe-frontend/src/app/components/shared/responsive-action-button.tsx
The Edit Profile and Edit Organization buttons kept their full label on small screens. Render them as labeled buttons on desktop (md+) and icon-only (size="icon" + aria-label) on mobile, mirroring the page-action buttons (e.g. "Edit Settings").
Summary by CodeRabbit
aria-labelfor icon-only actions to improve usability with assistive technologies.