Skip to content

feat(profile): add Edit Profile with bio and cover picture - #1693

Merged
bmc08gt merged 9 commits into
feat/profile-refresh-other-profilefrom
feat/profile-refresh-edit-profile
Oct 7, 2026
Merged

bmc08gt merged 9 commits into
feat/profile-refresh-other-profilefrom
feat/profile-refresh-edit-profile

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Fourth slice of the profile refresh, matching code-payments/code-ios-app#988: Edit Profile replaces the temporary Profile section in Settings, and you can now set a bio and a cover picture. Stacked on #1692.

Edit Profile (features/myaccount, Figma frame around node 10961:185)

  • An inset cover card with a "Change cover" chip, and the avatar with a camera badge and "Change photo".
  • Field cards for Name, Username, Bio and Minimum to Chat. Minimum to Chat shows startChattingFee for yourself, so it falls back to the regional default like the You tab.
  • Username is always shown. With no username, or an auto-assigned one, it reads "Claim your username" and goes through the existing balance gate before the editor opens.
  • The You tab's Edit Profile button opens this screen. Settings' Profile section, its view-model branches and its strings are removed.
  • The screen keeps collecting the user state, so a value saved in an editor is there when the editor pops.

Bio (features/user-profile)

  • BioDraft counts code points, so an emoji counts once. 160 is the limit, a blank bio over a non-blank one is a valid save, and an unchanged bio can't be saved.
  • SetBioError.FailedModerated and InvalidBio show their own errors; editing clears them.

Cover picture

  • UpdateProfileStep.Cover reuses the photo picker with a Slot (Avatar or Cover) passed in when the view model is created, so a cover upload can never land on the avatar. The preview uses the banner shape from ProfileCover.
  • A moderated or unclassified rejection shows "Couldn't Upload Your Cover". Other rejection reasons keep the existing generic wording.

Keyboard focus

  • Name, Username and Bio request focus only after the Nav3 push has settled (RequestFocusWhenSettled), instead of during the slide.

Profile card export

Tests

  • BioDraftTest, EditBioViewModelTest (including clearing a bio), EditProfileViewModelTest (including each branch of the username gate), PhotoSelectionViewModelTest (slot isolation and the cover and avatar rejection alerts), ProfileCardViewModelTest and TipCodeExportNameTest.
  • UsernameGate and its test move to userflags so Menu and Edit Profile share it.

@bmc08gt bmc08gt self-assigned this Oct 6, 2026
@github-actions github-actions Bot added the type: feature New functionality label Oct 6, 2026
@bmc08gt
bmc08gt force-pushed the feat/profile-refresh-edit-profile branch from 573f057 to 4943996 Compare October 6, 2026 22:58
@bmc08gt
bmc08gt added this pull request to stack #1696 October 7, 2026 01:28
@bmc08gt
bmc08gt force-pushed the feat/profile-refresh-edit-profile branch from 4943996 to 4b999fb Compare October 7, 2026 01:51
@bmc08gt
bmc08gt force-pushed the feat/profile-refresh-edit-profile branch from 4b999fb to c265e38 Compare October 7, 2026 01:56
@bmc08gt
bmc08gt force-pushed the feat/profile-refresh-edit-profile branch from c89e9d2 to 08c3e95 Compare October 7, 2026 02:40
Cover, photo, name, username, bio and minimum to chat on one screen, each
opening its editor. The You tab's Edit Profile opens it, and Settings loses
its temporary Profile section. The username balance gate moves from
features/menu to shared/userflags so both screens use it.
The exported file is now "Chat with <name>", or "Profile Card" when the
profile has no name, instead of one derived from the card signature.
… tests

Sanitise the display name before building the profile card file name, so a name of only hostile characters falls back to "Profile Card" instead of "Chat with ". Cover the upload failure paths, the username row's gate, and clearing a bio with tests. Drop the unused My Account row strings and the ic_profile_picture drawable, and correct the TipCodeExportStorage KDoc.
Match EditBioScreen.swift: a centred title, the field 20dp under the bar
in textLarge (iOS appDisplayXS, 20pt bold), the counter directly under
the field with any error below it, and Save 20dp off the bottom. The 8pt
gaps round to the 5dp static grid.
Checked against iOS EditProfileScreen.swift and ChangeCoverPictureScreen.swift:

- The cover editor is titled "Cover", sits 20dp under the bar instead of
  centred, and uses the banner's placeholder fill with a secondary plus.
- Replacing a cover saves without the "Change Cover?" prompt. iOS only
  confirms a replacement avatar, so the avatar keeps its prompt and the
  two unused cover prompt strings go.
- Save sits 20dp from the bottom on both pickers, as on iOS.
- Edit Profile's "Change cover" chip frosts the cover behind it, like
  iOS's glass CoverChip, and takes iOS's sentence case.
- The camera badge sits 6dp right and 2dp down off the avatar, as iOS
  offsets it.
- "Minimum to Chat" takes iOS's casing.
@bmc08gt
bmc08gt force-pushed the feat/profile-refresh-edit-profile branch from 08c3e95 to da93a90 Compare October 7, 2026 03:04
@bmc08gt
bmc08gt merged commit 6ca0310 into code/cash Oct 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant