ProfileForm
The named component that draws the public profile form: display name, summary, the server footer, status messages and Save.

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 (ProfileScreen)

Drawn once the profile has loaded without error. It is the whole content under the navigation bar

No other screen or component uses it.

ProfileForm fills the sheet below the bar: the "Public profile" card with two fields and its footer, then the card with the message and "Save". The capture predates the rule that hides "Enter a display name." until the field is edited.

Props

Prop

Type

Effect

eid

string

The visit id of the screen. It names the list so the sheet's bar follows its scrolling

page

ProfilePage

The published profile: account, server, name, summary, and fresh (true when nothing was published yet). The fields start from name and summary; the footer shows server

saving

bool

Disables both fields and the Save row, which then reads "Saving…"

saved

bool

With nothing changed since, shows "Profile updated"

error

string

A save error, shown in red above Save

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 -exact-subheadline, 8 points above a single line input with the placeholder "Your name"

"Summary"

The same label style over a textarea with the placeholder "A little about you" and a minimum height of 100 points

Footer

"Published on hyper.media. Visible to everyone." The host is the current server with https:// removed

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

-exact-secondary-label

"Enter a display name."

The name was edited and is now empty

-exact-system-red

The save error

The last save failed

-exact-system-red

"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).

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime