Skip to content

UI changes for AccountSettingsCard Page as Discussed in The Meeting - #1737

Merged
rohan-pandeyy merged 2 commits into
AOSSIE-Org:devfrom
Takitxt:UI-UX-improvements-AccountsSettingsPage
Nov 22, 2026
Merged

rohan-pandeyy merged 2 commits into
AOSSIE-Org:devfrom
Takitxt:UI-UX-improvements-AccountsSettingsPage

Conversation

@Takitxt

@Takitxt Takitxt commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Addressed Issues:

Fixes #1711 : Improvement in the UI/UX of Account Information Page.

Problem Statement:

The current UI of the Account Information Page was made by me in September and it consists with multiple issues which were discussed in the meeting also like:

Not Responsive for 4K, 2K and different screen sizes.
Avatars are too big in size.
There is a thick border around the PFP imageViewer.
Problems with the centering of the PFP image Viewer and things like less amount of highlights.

Screenshots/Recordings:

PictoPy Before:
Screenshot 2026-11-14 at 10 00 02 AM

PictoPy After:

Minimized Versions:
Screenshot 2026-11-22 at 11 36 28 AM
Screenshot 2026-11-22 at 11 36 38 AM

FullScreen:
Screenshot 2026-11-22 at 11 36 17 AM

Video Refrence:

Screen.Recording.2026-11-22.at.11.51.55.AM.mov

Additional Notes:

Files Changed: Only one file is changed since it was a ui/ux issue and improvement.
File Name: AccountsSettingsCard.tsx

Changed Code:

return (
      <div className="@container -mt-7 w-full min-w-0 *:mx-0 *:mt-0 *:w-full *:max-w-none *:pb-0">
        <SettingsCard
          icon={User}
          title="Account Information"
          description="Manage your account details and profile information."
        >
          <CardContent
            className={cn(
              // -mt-6 cancels the gap SettingsCard adds below its divider.
              '-mt-6 p-0',
              // --k scales every size below and steps up with the card's own width.
              '[--k:1] @max-xl:[--k:0.85] @7xl:[--k:1.1] @min-[100rem]:[--k:1.2] @min-[125rem]:[--k:1.4] @min-[160rem]:[--k:1.6] @min-[200rem]:[--k:1.8]',
              // Avatar size grows with the card width up to a cap.
              '[--av:clamp(4.25rem,8cqw,calc(7rem*var(--k)))] [--gap:calc(2.25rem*var(--k))]',
              '[--fs-label:calc(0.8rem*var(--k))] [--fs-md:calc(1rem*var(--k))] [--fs-sm:calc(0.95rem*var(--k))]',
              '[--ctl-h:calc(2.75rem*var(--k))] [--field-h:calc(2.25rem*var(--k))] [--field-w:calc(20rem*var(--k))]',
            )}
          >
            <div className="flex flex-col gap-(--gap) px-8 py-(--gap) @max-xl:px-6">
              {/* TOP ROW: avatar preview + display name */}
              <div className="flex min-w-0 items-center gap-6 @max-[26rem]:flex-col @max-[26rem]:items-start">
                <Button
                  variant="ghost"
                  type="button"
                  onClick={handleUploadClick}
                  aria-label="Change profile avatar"
                  className="group focus-visible:ring-ring focus-visible:ring-offset-card relative inline-flex size-(--av) shrink-0 items-center justify-center rounded-full p-0 hover:bg-transparent focus-visible:ring-2 focus-visible:ring-offset-2"
                >
                  <span className="ring-primary/60 ring-offset-card relative inline-flex size-(--av) items-center justify-center rounded-full ring-2 ring-offset-2">
                    {selectedAvatar ? (
                      <img
                        src={selectedAvatar}
                        alt="Current avatar"
                        className="size-(--av) rounded-full object-cover"
                      />
                    ) : (
                      <div className="bg-muted text-muted-foreground flex size-(--av) items-center justify-center rounded-full">
                        <User className="size-6" />
                      </div>
                    )}
                  </span>
                  <span className="bg-primary text-primary-foreground ring-card absolute -right-0.5 -bottom-0.5 flex size-7 items-center justify-center rounded-full shadow-md ring-2">
                    <Pencil className="h-3.5 w-3.5" />
                  </span>
                </Button>

                <div className="w-full max-w-(--field-w) min-w-0 space-y-3">
                  <Label className="text-foreground/70 text-(length:--fs-label) leading-none font-semibold tracking-wider uppercase">
                    Display name
                  </Label>
                  {isEditingName ? (
                    <>
                      <Input
                        aria-label="Name"
                        autoFocus
                        placeholder={
                          nameError ? "Name can't be empty" : 'Enter your name'
                        }
                        value={nameDraft}
                        onChange={(e) => handleNameDraftChange(e.target.value)}
                        onBlur={handleSaveNameEdit}
                        onKeyDown={(e) => {
                          if (e.key === 'Enter') {
                            e.preventDefault();
                            handleSaveNameEdit();
                          } else if (e.key === 'Escape') {
                            e.preventDefault();
                            handleCancelNameEdit();
                          }
                        }}
                        className={cn(
                          'bg-background focus-visible:ring-primary/30 h-(--field-h) w-full rounded-lg border px-4 text-(length:--fs-md) shadow-none focus-visible:ring-2 md:text-(length:--fs-md)',
                          nameError
                            ? 'border-destructive placeholder:text-destructive/70'
                            : 'border-border focus-visible:border-primary',
                        )}
                      />
                      {longWordError ? (
                        <p className="text-destructive text-(length:--fs-sm)">
                          A single word in your name cannot exceed 30
                          characters.
                        </p>
                      ) : (
                        <p className="text-muted-foreground text-(length:--fs-sm)">
                          Press Enter to save • Esc to cancel
                        </p>
                      )}
                    </>
                  ) : (
                    <Button
                      variant="ghost"
                      type="button"
                      onClick={handleStartEditName}
                      aria-label="Edit name"
                      className="group border-input hover:border-primary/50 bg-background hover:bg-background focus-visible:ring-primary/30 flex h-auto min-h-(--field-h) w-full min-w-0 items-center justify-between gap-3 rounded-lg border px-4 py-1.5 text-left transition-colors motion-reduce:transition-none"
                    >
                      <span className="min-w-0 text-(length:--fs-md) font-medium wrap-anywhere whitespace-normal">
                        {name || 'Add your name'}
                      </span>
                      <Pencil className="text-muted-foreground group-hover:text-foreground size-4 shrink-0 transition-colors motion-reduce:transition-none" />
                    </Button>
                  )}
                  {!isEditingName && (
                    <p className="text-muted-foreground text-(length:--fs-sm)">
                      Shown on albums and shared memories.
                    </p>
                  )}
                </div>
              </div>

              {/* AVATAR PICKER */}
              <div>
                <Label className="text-foreground/70 text-(length:--fs-label) leading-none font-semibold tracking-wider uppercase">
                  Choose avatar
                </Label>
                <div className="-m-2 overflow-x-auto p-2">
                  <div className="mt-5 grid w-max grid-cols-[repeat(8,var(--av))] gap-[calc(1.1rem*var(--k))] @max-3xl:grid-cols-[repeat(4,var(--av))]">
                    {avatars.map((avatar) => {
                      const isSelected = selectedAvatar === avatar;
                      return (
                        <Button
                          variant="ghost"
                          type="button"
                          key={avatar}
                          onClick={() => handleAvatarSelect(avatar)}
                          className={cn(
                            'group focus-visible:ring-ring focus-visible:ring-offset-card relative size-(--av) shrink-0 rounded-full p-0 transition-transform duration-200 hover:bg-transparent focus-visible:ring-2 focus-visible:ring-offset-2 motion-reduce:transition-none',
                            isSelected
                              ? 'ring-primary ring-offset-card ring-2 ring-offset-2'
                              : 'bg-muted ring-border hover:ring-foreground/30 opacity-90 ring-1 hover:opacity-100 motion-safe:hover:-translate-y-0.5',
                          )}
                        >
                          <span className="block h-full w-full overflow-hidden rounded-full">
                            <img
                              src={avatar}
                              alt="Avatar"
                              className="h-full w-full object-cover"
                            />
                          </span>
                          {isSelected && (
                            <span className="bg-primary text-primary-foreground ring-card absolute -top-1 -right-1 flex h-6 w-6 items-center justify-center rounded-full shadow-md ring-2">
                              <Check className="h-3.5 w-3.5" strokeWidth={3} />
                            </span>
                          )}
                        </Button>
                      );
                    })}
                  </div>
                </div>
              </div>
            </div>

            {/* FOOTER */}
            <div className="border-border bg-muted/30 flex flex-col items-stretch gap-4 border-t px-6 py-[calc(1rem*var(--k))] @xl:flex-row @xl:items-center @xl:justify-between @xl:px-8">
              <p
                role="status"
                aria-live="polite"
                className={cn(
                  'flex items-center gap-3 text-(length:--fs-md) font-medium',
                  hasUnsavedChanges
                    ? 'text-amber-700 dark:text-amber-500'
                    : 'text-muted-foreground',
                )}
              >
                <span
                  aria-hidden="true"
                  className={cn(
                    'size-3 shrink-0 rounded-full transition-colors',
                    hasUnsavedChanges
                      ? 'bg-amber-500 motion-safe:animate-pulse'
                      : 'bg-green-500',
                  )}
                />
                {hasUnsavedChanges
                  ? 'You have unsaved changes'
                  : 'All changes saved'}
              </p>
              <div className="flex w-full gap-2 @max-[26rem]:flex-col-reverse @xl:w-auto @xl:justify-end">
                <Button
                  variant="outline"
                  onClick={handleDiscardChanges}
                  disabled={!hasUnsavedChanges}
                  className="h-(--ctl-h) flex-1 px-[calc(1.5rem*var(--k))] text-(length:--fs-md) font-medium @xl:flex-none"
                >
                  Cancel
                </Button>
                <Button
                  onClick={handleSave}
                  disabled={
                    !selectedAvatar || longWordError || !hasUnsavedChanges
                  }
                  className="h-(--ctl-h) flex-1 px-[calc(1.5rem*var(--k))] text-(length:--fs-md) font-medium @xl:flex-none"
                >
                  Save Changes
                </Button>
              </div>
            </div>
          </CardContent>

          <AvatarCropDialog
            open={cropDialogOpen}
            onOpenChange={setCropDialogOpen}
            imageSrc={rawImage}
            onCropped={handleCropped}
          />

          <Dialog open={leaveDialogOpen} onOpenChange={setLeaveDialogOpen}>
            <DialogContent className="sm:max-w-md">
              <DialogHeader>
                <DialogTitle>Unsaved changes</DialogTitle>
              </DialogHeader>
              <p className="text-muted-foreground text-sm">
                You have unsaved changes to your profile. Save before leaving?
              </p>
              <DialogFooter className="flex-col gap-2 sm:flex-row">
                <Button
                  type="button"
                  variant="outline"
                  onClick={handleLeaveCancel}
                  className="sm:mr-auto"
                >
                  Cancel
                </Button>
                <Button
                  type="button"
                  variant="outline"
                  onClick={handleLeaveDiscard}
                >
                  Discard
                </Button>
                <Button type="button" onClick={handleLeaveSave}>
                  Save
                </Button>
              </DialogFooter>
            </DialogContent>
          </Dialog>
        </SettingsCard>
      </div>
    );
  },
);

Summary: Previous UI looked less professional but now this ui takes the reference from the previous ui for this page on pictopy when we didnt had a edit pfp option.

  • Now it looks more professional and easy to add more things.

AI Usage Disclosure:

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: Claude Sonnet 5.5(extra), Lovable for designs, gemini chatgpt and grok bot for cleanups.

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • User Interface
    • Updated the account settings layout and controls with responsive, width-scaled styling.
    • The avatar picker adapts between four and eight columns based on available space.
    • Refined the display name editor and avatar choices, and added a live status indicator to the footer.
    • Save and discard controls retain their existing availability and behavior.

@github-actions github-actions Bot added the enhancement New feature or request label Nov 17, 2026
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The account settings card now has a responsive layout for the avatar, display name, avatar picker, and footer. Existing profile editing, avatar selection, save and discard actions, and dialog handlers remain in place.

Changes

Account settings card UI

Layer / File(s) Summary
Responsive account card
frontend/src/pages/SettingsPage/components/AccountSettingsCard.tsx
The identity section and display-name editor use a responsive layout. The avatar picker uses a responsive grid with eight columns by default and four columns at the specified container breakpoint. The footer has a status indicator and responsive action buttons. Existing editing, save, discard, and dialog behavior remains wired.

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

Change: Feature · Severity of issue fixed: Low

Suggested labels: TypeScript/JavaScript

Suggested reviewers: shivagupta-14, rohan-pandeyy

Merge Risk: Minimal · up to bde4a

This updates the account settings card layout and responsiveness without changing the save, cancel, or avatar selection behavior. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the affected page and the general kind of change (UI changes), so it refers to a real part of the changeset. It does not name the main specifics, such as the responsive layout, the ava…
Linked Issues check Passed Linked issue #1711 lists four UI requirements. The reviewed head contains code for each one in AccountSettingsCard.tsx. The previous assessment cited an earlier version (4-column picker, fixed --av va…
Out of Scope Changes check Passed The whole-PR scope is one file, AccountSettingsCard.tsx. The raw summary reports no changes to exported declarations. The changed elements relate to #1711: container-based layout, avatar sizing, ring …
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the affected page and the general kind of change (UI changes), so it refers to a real part of the changeset. It does not name the main specifics, such as the responsive layout, the avatar grid switching between eight and four columns, or the live save-status indicator. It also includes the phrase "as Discussed in The Meeting", which adds no information for a teammate scanning history. The title is therefore partially related: it is accurate but broad.

Full details: Linked Issues check

Explanation

Linked issue #1711 lists four UI requirements. The reviewed head contains code for each one in AccountSettingsCard.tsx. The previous assessment cited an earlier version (4-column picker, fixed --av values). Those details are stale. The current head is used here.

(1) Responsiveness [#1711]: The root uses @container. CardContent sets --k and steps it up with @7xl, @min-[100rem], @min-[125rem], @min-[160rem], and @min-[200rem]. The avatar picker switches from 8 columns to 4 columns at @max-3xl. The top row stacks at @max-[26rem]. The footer changes layout at @xl. Layout depends on container width. No rendered 4K or 2K check is in the evidence.

(2) Oversized avatars [#1711]: The preview and picker tiles use --av, which is clamp(4.25rem, 8cqw, calc(7rem*var(--k))). The old fixed h-40/w-40 preview (10rem) is replaced. At the default and smaller widths, the avatar is smaller than before. At very wide containers, --av can grow to about 12.6rem (7rem times k 1.8). This growth may conflict with the 'too big' complaint at large sizes. This is a design judgment, not a missing requirement.

(3) Thick border [#1711]: The preview ring is now ring-primary/60 with ring-2 and ring-offset-2. The ring width is unchanged. Only color and offset changed. Whether the ring now looks thin enough is a visual judgment. The code change is present.

(4) Centering and highlights [#1711]: The top row uses flex items-center. The footer adds a role=status indicator (amber or green dot). The selected avatar has a primary ring and check badge. These are present.

No automated tests are added. The issue does not require tests for these visual changes. Because the footer and the end of the file are truncated in the evidence, the save, cancel, and leave logic was checked only through the visible hunks and the raw summary. The raw summary states that handlers keep their behavior.

Full details: Out of Scope Changes check

Explanation

The whole-PR scope is one file, AccountSettingsCard.tsx. The raw summary reports no changes to exported declarations. The changed elements relate to #1711: container-based layout, avatar sizing, ring styling, status indicator, Button-based controls, and the 8-to-4 column picker.

Some additions go beyond the issue text: the helper text 'Shown on albums and shared memories.', the muted background and opacity on unselected avatars, and the pulse animation on the unsaved indicator. These are presentational and sit inside the same card. They do not add new features or change data flow, so they are not unrelated changes.

The name, avatar, crop, save, discard, and leave-dialog handlers appear unchanged in the visible hunks. The raw summary states that save and discard retain their enablement and handlers. The truncated tail of the file was not read.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the profile view,
And finds the layout fresh and new.
Eight avatars line up in rows,
Four appear when the container slows.
A status light shines by the save,
The rabbit hops, content and brave.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 29f9e9d and bde4ad0.

Files selected for processing: 1

  • frontend/src/pages/SettingsPage/components/AccountSettingsCard.tsx

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@Takitxt

Takitxt commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@rohan-pandeyy I have created the old school 42 grid ui for avatars just like old ui was . It looks more professional while using it in realtime.
But if you want me to create the 8
1 grid for the avatars, i would be happy to do that too.

I have already implemented if you want me to change i can it would look like this:

Screenshot 2026-11-14 at 10 06 12 AM .. .. Screenshot 2026-11-14 at 5 12 54 PM

If you want me to change some things and edit some things in these ui's you can give me suggestions and your ideas, i would be happy to implement them and repair or polish the ui if something looks out of order.

Thank You ☺️☺️

@rohan-pandeyy

Copy link
Copy Markdown
Member
image The above one is the one that we want. The layout, font sizing, gaps, and everything is perfect.

Have a look at this below picture.
I know this is how it would look like in pictopy's component colors and styles, but still a lot of these can be improved taking reference from the above image, ie. the one created via lovable.
image

@Takitxt

Takitxt commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

@rohan-pandeyy ok i will change it 😊.

@Takitxt

Takitxt commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

@rohan-pandeyy i have done the suggested changes. Please do check them out and let me know if something needs to be changed.😊

@rohan-pandeyy

Copy link
Copy Markdown
Member

LGTM!

@rohan-pandeyy
rohan-pandeyy merged commit bf6bc0f into AOSSIE-Org:dev Nov 22, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI: Improvement in the UI/UX of Account Information Page.

2 participants