ProfileForm is the body of the Edit profile sheet. It is a grouped form with two labelled fields, a footer that says where the profile is published, and a second card holding the result messages and the "Save" row.
Kind: named component. Defined in: profile.contract, lines 61 to 118.
Used by
Screen | How |
|---|---|
Edit profile ( | Drawn once the profile has loaded without error. It is the whole content under the navigation bar |
No other screen or component uses it.
Props
Prop | Type | Effect |
|---|---|---|
| string | The visit id of the screen. It names the list so the sheet's bar follows its scrolling |
|
| The published profile: |
| bool | Disables both fields and the Save row, which then reads "Saving…" |
| bool | With nothing changed since, shows "Profile updated" |
| string | A save error, shown in red above Save |
| action | Called with the account, name and summary when Save is tapped |
The form keeps three things to itself: the typed name, the typed summary, and whether the name has been touched.
Anatomy
A list with appearance="auto" and listStyle="inset-grouped" (see list and section and Lists), holding two sections.
Section "Public profile"
Part | Detail |
|---|---|
"Display name" | A text label in |
"Summary" | The same label style over a |
Footer | "Published on hyper.media. Visible to everyone." The host is the current server with |
Each label and field pair is one row of the card, a column with gap=8. The label sits inside the row, above its field, not beside it.
Second section (no header)
Part | When | Style |
|---|---|---|
"Profile updated" | After a successful save, until something is edited |
|
"Enter a display name." | The name was edited and is now empty |
|
The save error | The last save failed |
|
"Save" / "Saving…" | Always | A plain button row, tinted when enabled |
Type styles are platform styles only, see Typography. Colours are platform roles, see Color and tokens.
States
State | Save row |
|---|---|
Name empty | disabled |
Nothing changed from the published profile | disabled, unless the profile is fresh |
Something changed, name not empty | enabled |
Saving | disabled, reads "Saving…", fields disabled |
"Changed" compares the trimmed text with the published values, so adding a space does not enable Save.
Rules for use
Use it only inside a sheet that has already loaded the profile. It has no loading or failure state of its own.
Do not add a second Save to the navigation bar. The messages about saving sit next to the row that caused them.
Keep the footer. It is the only place that says the profile is public and names the server.
For a new form elsewhere in the app, copy the layout rules from Forms and inputs instead of reusing this component: it is specific to the two profile fields.
Why it looks this way
Labels above fields. Most forms in the app use the placeholder as the label ("Name (optional)", "example.com"). Here both fields keep a visible label, because a filled field would otherwise not say what it is. Inferred from comparing this form with the Create identity sheet.
Messages in the card with the action. Success, validation and failure appear directly above "Save", in the order they are checked. This is the form's version of Honest state: every outcome of the tap is written where the tap happened.
No error before the person acts. The touched rule (fix B2 in the contract) keeps a new profile from opening with a red line.
Platform controls only. The fields, the card and the tinted row are what iOS draws for a grouped list. See Leave it unsaid.
A public name is the point. This form is how an identity gets the name the rest of the app prefers over an id. See Names, not identifiers.
User stories
This page helps deliver these stories. Each story lists this page in its Trace, so the link holds in both directions (traceability).
US-ID-07 Edit my public profile: The form with its fields, messages and Save row
US-APP-07 Read clear, consistent wording: A form with inline validation and a Save row
Related
Parent: Profile components. Screen: Edit profile.
Where the result shows: Me, Identity rows, Author profile.
Patterns: Buttons and actions, Loading, failure and empty states.
How it is built: Profile: editing name and summary.
Source: ProfileForm, exercised by profile.test.contract.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime