web/dreamstop.openfp.net · commit
Call the codepoint categories positions
parents: 7f5d99b051
Call the codepoint categories positions Force, mood, aspect and the rest are positions, and a clause's main, relative, adverbial or complement role is its place. The ChangeLog, README, prose notes and doc comments now say so. The doc comments on the kept sources no longer garden-path.
7 files changed
Diff
dreamstop-openfp-net-web/ChangeLog.md | 4 ++-- dreamstop-openfp-net-web/README.md | 6 +++--- dreamstop-openfp-net-web/src/Site/Content.hs | 22 +++++++++++----------- dreamstop-openfp-net-web/src/Site/View.hs | 22 +++++++++++----------- dreamstop.css | 1 - nix/site.nix | 6 +++--- prose/front.vx | 4 ++-- 7 files changed, 32 insertions(+), 33 deletions(-) diff --git a/dreamstop-openfp-net-web/ChangeLog.md b/dreamstop-openfp-net-web/ChangeLog.md index 29ade98..8ef8d0c 100644 @@ -7,7 +7,7 @@ ## 0.3.0.0 — 2026-12-06 - The front page now shows a clear ChangeLog entry from horizon-flake-parts, with the reading of each sentence under it. -- The front page now has a menu of the nine codepoint layers in place of its colour legend and its separate verdict and modality examples. Each layer now shows a clear, an ambiguous and a nonsense example where a real one exists, each with its readings and what the layer's codes decide in it. Without JavaScript, every layer's examples are now shown one after another. +- The front page now has a menu of the nine codepoint positions in place of its colour legend and its separate verdict and modality examples. Each position now shows a clear, an ambiguous and a nonsense example where a real one exists, each with its readings and what the position's codes decide in it. Without JavaScript, every position's examples are now shown one after another. - The front page now says that each kind of document has its own rules, each with examples. It no longer describes how a program marks up clauses or what the manual covers. - The page's description and preview card now say that dreamstop shows which sentences can be read more than one way, so authors can rewrite them. - The minimal pair's note now says in plain words that changing “moved” to “moves” leaves one reading. @@ -27,7 +27,7 @@ ## 0.2.0.0 — 2026-12-06 - The front page now explains in plain words what dreamstop checks, and says that a program marks up every clause with codepoints. -- The front page and the manual now colour each codepoint by its layer, such as force, aspect or modality, and the front page shows a legend of the colours. +- The front page and the manual now colour each codepoint by its position, such as force, aspect or modality, and the front page shows a legend of the colours. - The front page now shows examples quoted from the OpenFP Quality Control Handbook, including a contrast between required, allowed and able. - The front page and the manual's Verdicts chapter now list the readings of an ambiguous sentence as a numbered list, each with a plain gloss. - The front page and the manual now define a minimal pair as two sentences that differ by the smallest possible edit that makes the sentence clear. diff --git a/dreamstop-openfp-net-web/README.md b/dreamstop-openfp-net-web/README.md index 64f4fe7..633d7d6 100644 @@ -2,7 +2,7 @@ The dreamstop.openfp.net website: the front page of dreamstop, a language for disambiguating text. The page says what dreamstop is, shows a clear -ChangeLog entry and, for each codepoint layer, a clear, an ambiguous and a +ChangeLog entry and, for each codepoint position, a clear, an ambiguous and a nonsense example where a real example exists, and teaches minimal pairs with one pair from a real ChangeLog. It links the dreamstop user manual, a PDF served at `/manual/dreamstop.pdf`. @@ -14,8 +14,8 @@ The dreamstop.openfp.net page as one design-kit `Site` in Miso. - `Site.Page` is the document head: the title, the description, the icon, the stylesheets and the preview card. - `Site.Content` is what the page says that is data: the links, the ChangeLog - entry, the examples for each layer and the minimal pair. -- `Site.View` is the body. Its one state is the layer the menu shows, which + entry, the examples for each position and the minimal pair. +- `Site.View` is the body. Its one state is the position the menu shows, which a click or the arrow, Home and End keys on a tab change. - `dreamstop-openfp-net-web-render` writes the page to stdout as `index.html` under node at build time, so the page reads in full without diff --git a/dreamstop-openfp-net-web/src/Site/Content.hs b/dreamstop-openfp-net-web/src/Site/Content.hs index a6262c2..87a5d46 100644 @@ -1,5 +1,5 @@ -- | What the page says that is data: its links, a clear ChangeLog entry, the +-- examples for each codepoint position and the minimal pair. Every example is -- quoted word for word from the OpenFP Quality Control Handbook 0.18.0.0 or -- from a real document named in its source. -- @@ -65,8 +65,8 @@ data Example = MkExample } -- | A whole ChangeLog entry: its release heading, each bullet with its one +-- reading, and where it was published. Review checks the source, and the +-- page does not show it. -- -- @since 0.3.0.0 type Entry :: Type @@ -100,7 +100,7 @@ entry = ] "From the ChangeLog of horizon-flake-parts, release 0.21.0, as published in tag 0.46.1." +-- | A codepoint position, in the order the manual's reference table lists them. -- -- @since 0.3.0.0 type Layer :: Type @@ -116,13 +116,13 @@ data Layer | Nominalisation deriving stock (Eq, Enum, Bounded) +-- | Every position, first to last. -- -- @since 0.3.0.0 layers :: [Layer] layers = [minBound .. maxBound] +-- | A position's name, which is also the class codepoints.css colours it by. -- -- @since 0.3.0.0 layerName :: Layer -> MisoString @@ -152,9 +152,9 @@ verdictName = \case Ambiguous -> "Ambiguous" Nonsense -> "Nonsense" +-- | One example under a position: its verdict, the sentence with its readings, +-- what the position's codes decide in it, and where it is quoted from. +-- Review checks the source, and the page does not show it. -- -- @since 0.3.0.0 type LayerExample :: Type @@ -165,8 +165,8 @@ data LayerExample = MkLayerExample , layerSource :: MisoString } +-- | A position's clear, ambiguous and nonsense examples, each turning on that +-- position. A verdict with no real sentence for the position is left out. -- -- @since 0.3.0.0 layerExamples :: Layer -> [LayerExample] diff --git a/dreamstop-openfp-net-web/src/Site/View.hs b/dreamstop-openfp-net-web/src/Site/View.hs index 032ea13..3aad7f3 100644 @@ -1,8 +1,8 @@ -- | The page's body: what dreamstop is, a clear ChangeLog entry, a menu of +-- examples for each codepoint position, a minimal pair, and the manual. -- Every word is in the rendered HTML, so the page reads in full without +-- JavaScript: the render shows every position's examples, and the stylesheet +-- shows only the selected position once the script runs. Every sentence of -- prose is annotated in prose/front.vx. -- -- @since 0.1.0.0 @@ -44,14 +44,14 @@ import Site.Content (Entry (entryHeading, entrySentences), repository) import Site.Page (name) +-- | The position whose examples the menu shows. -- -- @since 0.1.0.0 type Model :: Type newtype Model = MkModel Layer deriving stock (Eq) +-- | Selecting a position, by a click or by a key on its tab. -- -- @since 0.1.0.0 type Action :: Type @@ -59,7 +59,7 @@ data Action = Select Layer | Key Layer KeyCode +-- | Rendered and hydrated with the same view, the first position selected. -- -- @since 0.1.0.0 app :: App Model Action @@ -94,7 +94,7 @@ holdTabKeys _ = do void (event # "preventDefault" $ ()) void (document # "addEventListener" $ ("keydown" :: MisoString, listener)) +-- | The position @n@ steps along the menu, wrapping at either end. step :: Int -> Layer -> Layer step n l = toEnum ((fromEnum l + n) `mod` length layers) @@ -261,16 +261,16 @@ view (MkModel selected) = reading :: Reading -> [View Model Action] reading r = [codepoints (readingCodes r), text (": " <> readingGloss r)] +-- | A position's tab. tabId :: Layer -> MisoString tabId l = "tab-" <> layerName l +-- | A position's panel. panelId :: Layer -> MisoString panelId l = "panel-" <> layerName l -- | A reading's codes, each in its own class, which codepoints.css colours by +-- the code's position, with brackets, separators and places in neutral grey. codepoints :: MisoString -> View model action codepoints s = code_ [] (map token (groupBy sameCase (fromMisoString s :: String))) @@ -281,6 +281,6 @@ codepoints s = token :: String -> View model action token w = span_ [classList [if length w == 3 && all isUpper w then "cp-" <> toMisoString w else "cp-mark"]] [text (toMisoString w)] +-- | The CSS class of a position. layerClass :: Layer -> MisoString layerClass l = "cp-" <> layerName l diff --git a/dreamstop.css b/dreamstop.css index b6c8a2d..18de5ba 100644 @@ -135,7 +135,6 @@ ul.entry-bullets { list-style: none; margin: 0; padding: 0; } ul.entry-bullets > li { margin: 1rem 0 0; } ul.entry-bullets blockquote.entry { margin: 0 0 .4rem; } - /* The layer menu. Without JavaScript the tabs are hidden and every layer's * panel shows under its own heading. With it, only the selected panel * shows, and the tab names it. Tab colours come from codepoints.css. */ diff --git a/nix/site.nix b/nix/site.nix index 74ec6ef..f022f99 100644 @@ -29,7 +29,7 @@ local: libraryHaskellDepends = [ p.inkwell-dsl ]; }; }; - # The colour of each codepoint layer, and the codes in it, as the + # The colour of each codepoint position, and the codes in it, as the # manual's reference table lists them. The front page's stylesheet and # the manual's Typst show rules are both printed from this table. Every # colour reaches WCAG AA (4.5:1) on the page's white and zinc-100 surfaces. @@ -109,11 +109,11 @@ local: ]; }; }; - # Brackets, separators and positions. + # Brackets, separators and places. mark = "#52525b"; }; layerNames = builtins.attrNames codepoints.layers; - # Each layer's colour as a class, and each code's class in its layer's + # Each position's colour as a class, and each code's class in its position's # colour, for the front page. codepointsCss = pkgs.writeText "codepoints.css" ( lib.concatMapStrings ( diff --git a/prose/front.vx b/prose/front.vx index 2b227b1..3c0416d 100644 @@ -1,7 +1,7 @@ -- Every sentence of the dreamstop.openfp.net front page, with its dreamstop -- reading under the website kind: one clause per finite verb group, codes in +-- display order, and each subordinate clause's place and parent after a +-- slash. Headings, navigation, button labels, the position menu's tab names and -- the sentences shown as examples, with their readings, glosses, the line -- saying what the codes decide and their sources, are not prose and are not -- listed. No check reads this file yet: review judges each reading.