Skip to content

Conversation

@ameer2468
Copy link
Contributor

@ameer2468 ameer2468 commented Oct 17, 2025

Summary by CodeRabbit

  • Style

    • Improved image controls: Upload button always visible and disabled during removal; Remove button disables and hides the trash icon while showing spinner-centered feedback.
    • Button spinner alignment adjusted for consistent visual spacing.
  • User Interface

    • Loading skeletons revamped to a responsive grid with separate cards for profile image, name, email, and organization; spacing and control sizes updated.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Profile image controls and skeletons were updated: upload button always renders (disabled during removal), remove button hides its trash icon and disables while removing, Button gained a spinnerClassName prop, and the account-settings loading layout was reworked into a responsive grid of cards.

Changes

Cohort / File(s) Summary
ProfileImage component UI and state handling
apps/web/app/(org)/dashboard/settings/account/components/ProfileImage.tsx
Upload button always rendered and disabled when removing; Remove button disabled when removing (and when loading), trash icon conditionally hidden during removal, spinner adjustments (spinnerClassName used, spinner centered via mx-auto) and isLoading semantics include isRemoving
Account settings loading skeleton UI
apps/web/app/(org)/dashboard/settings/account/loading.tsx
Replaced two-card flex layout with responsive grid (md:grid-cols-2); split skeleton into Profile image, Your name, Contact email, Default organization cards; adjusted skeleton sizes, spacing, and Save button skeleton from h-10 rounded-xl to h-9 rounded-lg
Button component API and rendering
packages/ui/src/components/Button.tsx
Added optional spinnerClassName prop and composed spinner class (mr-1 + spinnerClassName); LoadingSpinner uses new class composition when spinner is true; no behavior changes when spinner is false

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ProfileImage
    participant Button
    participant API
    Note over ProfileImage,Button: Normal state (isRemoving=false)
    User->>ProfileImage: Click Remove
    ProfileImage->>Button: set isRemoving=true (disable upload, hide trash icon, show spinner)
    Button->>API: call removeImage()
    API-->>Button: success / error
    Button-->>ProfileImage: callback (isRemoving=false, update state)
    ProfileImage-->>User: re-render (upload enabled, trash icon visible)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Web, Improvement

"I nibble bugs and tidy seams,
A spinner hums, then slips from beams,
Cards rearrange in gentle rows,
Trash hides shy where soft wind blows,
Hop—your dashboard gleams and beams!" 🐰✨

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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "chore: hide icon when removing profile image" refers to a specific, real change present in the ProfileImage.tsx file: the trash icon is now conditionally rendered and hidden when isRemoving is true. This is a clear and specific aspect of the changeset. However, the title captures only a narrow portion of the overall changes, which also include modifications to button rendering and disabled states in ProfileImage.tsx, as well as a significant redesign of the loading skeleton layout in loading.tsx (conversion from flex to grid, multiple new cards, and styling updates). The title is therefore partially related to the changeset—it describes a real part of the change but does not encompass the main scope of work across both modified files.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4cdc50d and fec778c.

📒 Files selected for processing (2)
  • apps/web/app/(org)/dashboard/settings/account/components/ProfileImage.tsx (1 hunks)
  • packages/ui/src/components/Button.tsx (3 hunks)

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.

@ameer2468 ameer2468 merged commit 494f4ff into main Oct 17, 2025
14 checks passed
@ameer2468 ameer2468 deleted the chore-hide-icon-when-deleting branch October 17, 2025 12:50
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