profile.contract defines two components. ProfileScreen is a screen and is documented as Edit profile. The other, ProfileForm, is the only named component of the profile package, and the only named component that belongs to the Me tab.
The component
Component | What it is | Used by |
|---|---|---|
The editable form for a public profile: display name, summary, a footer naming the server, status messages and the Save row |
Why it is a component at all
The rest of the Me tab is written inline inside its screen components: identity rows, server rows and the vault panels are inline parts, not named components. ProfileForm is separate for one reason: it holds the text being typed. ProfileScreen decides between loading, failure and the form, and only when a profile has loaded does it draw ProfileForm, which starts its fields from the published name and summary. Inferred from the contract: the form declares its own state for the two fields, initialised from the page it is given, so it has to be created after the page exists.
This gives the form three properties a person can see:
The fields open filled with what is already published.
"Save" is enabled only when what is typed differs from what is published.
"Enter a display name." appears only after the name has been edited.
What it does not include
The sheet's navigation bar ("Cancel" or "Done", "Edit profile") belongs to the screen.
The loading line "Loading profile…" and the failure state with "Retry", "Import identity" and "Change server" belong to the screen.
There is no avatar or icon field. The profile's picture is shown by Avatar elsewhere, but it cannot be changed in the mobile app.
Related
Parent: Component toolkit. Siblings: Shared components, Inline parts.
Screens: Edit profile, Identity detail, Author profile.
Patterns: Forms and inputs. Philosophy: Names, not identifiers.
How it is built: Profile: editing name and summary.
Source: profile.contract.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime