As an identity holder, I want to set the name and short summary people see for me, so that my comments and documents carry my name instead of an identifier.
Situation
I have an identity on this phone. Its rows show a key name or a short id because I never published a profile, or I want to change what I published. I am online, on the Me tab.
What I do
Open the identity and tap "Edit profile".
Type a display name and, if I like, a summary.
Tap "Save".
Wait for "Profile updated", then tap "Done".
What I should see
A sheet titled "Edit profile" opens with "Cancel" in the bar. See Edit profile.
While my profile is fetched it says "Loading profile…".
A section "Public profile" holds "Display name" (hint "Your name") and "Summary" (hint "A little about you").
The fields start with what is published. For a first profile the name starts as my key name, if I gave one.
Under the fields: "Published on hyper.media. Visible to everyone.", naming the server I read from.
"Save" is a row under the fields. It is disabled while the name is empty, and for a published profile until I change something.
While saving, the row reads "Saving…", the fields and "Cancel" are disabled.
On success the phone gives a success tap, "Profile updated" appears above the row, and "Cancel" becomes "Done". The sheet stays open.
"Done" returns me to Me, where my row shows the new name. Bylines and author pages in Read show it too.
When something goes wrong
If I clear the name, "Enter a display name." appears in red and "Save" is disabled. I type a name.
If saving fails, the reason appears in red above "Save", for example "The server refused the profile (500). Try again." My text stays and I tap "Save" again.
If the profile cannot be loaded, I see the reason with "Retry" and "Change server".
If this identity's key is not on the phone, I see "This identity is no longer on this device." with "Import identity".
Not included
I cannot set or change my picture. Only name and summary. See Current limits and known gaps.
If my home page points to another document, the app says "This home points to another document. Edit it from Seed desktop."
The profile is published to the server I read from only. See Choose which Seed server I read from.
Trace
Story US-ID-07, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.
Design
Page | Part it plays |
|---|---|
The sheet: loading, error, form, saved | |
Entry point: the Edit profile row | |
Where the new name appears after Done | |
Recovery path when the key is missing | |
Recovery path through Change server | |
The public page that shows the name and summary | |
The form with its fields, messages and Save row | |
Rows whose label becomes the profile name | |
Bylines that show the published name | |
The name field and the summary text area | |
Errors wait for an edit; Save is in the form | |
Lists this form with every message | |
Loading, key missing, load failed, saving, save failed, saved | |
The success haptic and the written confirmation | |
A sheet that stays open after saving | |
Public name versus local key name | |
Confirmed only after the server shows the change |
Implementation
Page | Part it plays |
|---|---|
Loading, publishing, confirming, and the known limits | |
The Edit profile link and the meProfiles names that update | |
signerFor: the key that signs the profile | |
The signed changes and ref that make up a profile update | |
CBOR encoding of the publish request | |
The PublishBlobs request and its responses | |
Account, Resource and ListChanges reads before and after the write | |
The API client the profile reads go through | |
profileData, profileSaved, profileReady and profileError | |
Stale replies are ignored by account, server and visit; saved profile refreshes names, authors and documents | |
The profile-edit route and profileClose | |
The yield between reading history and signing | |
The UI test that publishes twice on the dev server | |
Unit tests for history, refusal and confirmation |
Code
File | What |
|---|---|
ProfileScreen | |
ProfileForm | |
Edit profile link on Identity detail | |
pkg:profile decl | |
profileClose, profileRetry, profileSave, profileAfterSave | |
view wiring for the profile-edit route | |
profileLoad and profilePublish sources | |
loadProfile | |
publishProfile | |
previousProfile | |
createProfilePublishBlobs | |
Builds and signs the profile change | |
Builds the version ref that publishes it |
Tests
File | What it checks |
|---|---|
profile: prefill, validate, publish and reread a public profile on dev | |
profile: a missing key cannot edit or publish | |
profile history; Account prefills server metadata; empty name and missing private key refuse before any request; network failure and redirects never bootstrap a new home; a successful upload without the new Account metadata is not reported as confirmed; the server can refuse a publish | |
profile blob parity vectors |
Delivery
Delivered by #1470.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime