Server
The screen for choosing which Seed server the app reads from and publishes to: two presets, saved servers, and a field for another address.

Server is where a person chooses the Seed site the app talks to. The choice sets the home document of the Read tab, where profiles are read from, and where comments and profile edits are published. Most people never change it, so it is a short radio list with one field under it.

At a glance

Tab

Me

Route

server, path /me/server

Screen component

MeServerScreen in me.contract

Presentation

pushed

Title

inline: "Server"

How you get here

"Server" in the Connections section of Me; "Change server" on Edit profile when a profile fails to load

Where it leads

Nowhere. Back returns to the previous screen

The default: hyper.media checked, dev.hyper.media under it, and the "Another server" field with its disabled Connect button.
After connecting to two custom servers, a "Saved servers" section appears between the presets and the field. In this capture the tab bar highlights Read (inferred: the screen was opened by its address during testing).

Anatomy

One list listStyle="inset-grouped":

    Navigation bar. The platform back button and the inline title "Server".

    Presets (no header, a radio group labelled "Server" for VoiceOver). Two Server rows:

      "hyper.media" with "The public Seed network" under it.

      "dev.hyper.media" with "For testing" under it.

      A third row appears here when the server in use is neither a preset nor saved: its host, the full address under it, and the checkmark.

    Section "Saved servers", only when there are any. One row per custom server connected to before: the host, the full address in footnote, and the checkmark on the one in use. Footer: "Swipe a server to remove it. Removing the one in use returns to hyper.media."

    Section "Another server". A URL field with the placeholder "example.com" and a bordered "Connect" button on the same row. Footer: "The server is checked before it is used."

The checkmark is symbol:checkmark in the brand colour, on the row in use only.

States

State

What is shown

Default

"hyper.media" checked

Field empty

"Connect" disabled

Checking

The button reads "Checking…" and is disabled

Bad address

Footer in -exact-system-red: "Invalid URL. Enter a valid server address."

Not a Seed site

Footer in red: "This server has no registered site."

Unreachable

Footer in red: "Failed to connect: " and the reason

Connected

The field empties, the new server is checked and appears under "Saved servers"

An address that resolves to a preset is not saved: typing "hyper.media/some/page" simply selects hyper.media, because only the origin of an address is kept.

Actions

Gesture

Result

Tap a preset or a saved server

It becomes the server at once, with a selection haptic. No check is made

Type an address and tap "Connect", or press return

The address is checked. If it is a Seed site it becomes the server and is added to "Saved servers"

Swipe a saved server

iOS shows its Delete action. The server is forgotten with no alert. If it was in use, the app returns to hyper.media

The choice is kept across launches, and so is the list of saved servers.

Components used

Component

Kind

What it does here

Server rows

inline part

The preset rows, the custom row and the saved rows

list and section

primitive

The grouped list, its radio group sections and the field section

header, footer and nav

primitive

The bar title, the two section headers, the two footers

button

primitive

Each radio row (role="radio", saved rows also delete=), and "Connect" (buttonStyle="bordered")

input, textarea, select and label

primitive

The type="url" address field

text

primitive

Hosts, descriptions, addresses, the status footer

image and symbols

primitive

symbol:checkmark

row, column and view

primitive

The screen root, two line labels, the field and button row

No named component or platform part is used.

Why it is designed this way

    A radio list is the iOS way to pick one of a few. Rows with a trailing checkmark are what Settings uses, and the rows carry role="radio" so assistive technology hears a choice, not a set of buttons. See Leave it unsaid and Accessibility.

    Hosts, not URLs. The primary label is the host ("gabo.es"). The full address is secondary text. This is the server version of Names, not identifiers.

    Presets are trusted, anything typed is checked. A tap on a preset switches immediately. A typed address must answer as a Seed site first, and the footer promises that before the person types. See Honest state.

    Saved servers remember the effort. A server that passed the check does not need to be typed again. The contract comment names the source: the React Native app's known_servers. See What changed from the React Native app and why.

    Removing a saved server needs no alert. Nothing is lost that typing the address again would not restore, so the swipe acts directly, unlike removing an identity. Inferred from the missing dialog.

    Difference from DESIGN.md. It describes "choose/enter server (hyper.media default, dev.hyper.media, custom)". Saved servers were added later by the gaps pass.

User stories

This page helps deliver these stories. Each story lists this page in its Trace, so the link holds in both directions (traceability).

Related

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

Unsubscribe anytime