feat: offer a non-Mews web page as a simplified view or in the browser
This commit is contained in:
parent
cea66fbb42
commit
00e42c925c
24 changed files with 863 additions and 152 deletions
2
SPEC.md
2
SPEC.md
|
|
@ -79,6 +79,8 @@ The v1 client presents one reader screen:
|
|||
|
||||
- An address field pinned at the top, below the status bar inset on phones; on touch devices it hides when the reader scrolls down and returns when they scroll up or reach the top, since a page that fits the viewport leaves nothing to scroll for it. A short tap on the page shows a hidden bar and hides a shown one, unless the tap opened something on the page — a link, a form, a control — for those leave the bar where it was. On pointer hosts it stays on screen, since the keyboard reaches it whenever it is needed. Its leading icons open the hub and, on pointer platforms, go back and forward. Its trailing icons reload the page, subscribe to the site, and bookmark the page; subscribing is offered only on a page that carries dated links or declares an Atom feed.
|
||||
- A web page that cannot be loaded offers to open in the reader's system web browser, since the web can be shown outside; a page over gemini or spartan has nowhere else to go, so its failures offer only trying again.
|
||||
- A web page that is not a Mews page is not a broken page. The client reads pages as strict XML (spec 7.1) and the web is not well-formed XML, so such a page is named as the web page it is and offered two ways on: a simplified view, or the reader's own browser. The simplified view is the same markup read as far as the Mews subset reaches — elements Mews supports are shown, the rest are unwrapped and keep their content, and markup that is not content is left out. A form is the one exception to that: Mews has forms, but a web page's form is left out of the view, since the reader cannot usefully answer a search box or a sign-in here and submitting one would only land them on another page this client cannot show as Mews. Only the form goes; content it wrapped is kept. It renders through the same reader presentation as any page, so its links are followed in the app and fail back the same way, its text can be kept as a quotation, and it says it is simplified. Asking for it belongs to the address it was asked for, so a link from it that also fails explains itself rather than simplifying unasked. A page that carries the conformance marker and still will not parse is reported as the markup error it is: the marker, not the MIME type, is what claims a page as Mews, since Mews pages are served as `text/html`.
|
||||
- A table cannot hold another (spec 4.2), so a nested one — the old web's way of laying out a page — is shown as a table of its own, after the table whose cell held it, rather than flattened into that cell's text. A row belongs only to the table that owns it, never to one it is nested inside. Rows of unequal length are filled out to the widest, since a table with holes cannot be drawn; a cell spanning several columns sits in the first of them.
|
||||
- On pointer hosts the keyboard drives the reader: Ctrl or Cmd+L focuses the address field with its text selected, Ctrl or Cmd+R reloads the page, and the walk goes back and forward with Alt+Left and Alt+Right, or on a Mac with Cmd+Left, Cmd+Right, Cmd+[ and Cmd+]. Touch devices navigate with gestures instead, and none of these shortcuts are offered there. The links on a page are reachable by keyboard as well: the page is one stop in the focus order, and once it holds the focus, Tab highlights its links in reading order and Enter opens the highlighted one; the page scrolls to keep the highlighted link in view, Shift+Tab walks back, Escape puts the highlight away, and a Tab past either end hands the focus back to the chrome.
|
||||
- A swipe right goes back and a swipe left goes forward through the history stack. On a pointer host the whole empty margin beside the text column accepts the swipe, with a 40 px floor, so the gesture stays clear of selecting text, and the address bar's buttons work as well. On a touch device, where the column leaves no margin, the page surface itself accepts the swipe: a finger that crosses the slop sideways, before the long press that starts a text selection completes, is swiping, while a finger that held still that long keeps its drag for the selection.
|
||||
- The client's own pages live under the `mews:` scheme. `mews:hub` names them and says what each one holds; `mews:posts`, `mews:quotations`, `mews:bookmarks`, `mews:subscriptions`, `mews:history` and `mews:settings` each carry a strip linking to the others. Bare `mews:` is the hub, and the hub is where a session with no history to return to starts. Each page is built as an ordinary Mews document and rendered by the same renderer as a fetched page, so it joins the history stack and the swipe transitions, and none of them is recorded in history or offered for subscription.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue