NixLabConnectionconnecting
CommitsCommit
web/dreamstop.openfp.net · commit

Fix the review's findings on the position notes

SmSmartypants, 2026-12-06 22:035c35a7f3c5#55 · 21/21

parents: a5f56833e5

Fix the review's findings on the position notes

The Evidence note and three older notes now use present-tense complements
the website kind allows. The Aspect, Phase and Modality notes now match the
manual's meanings. The codes check now needs each code in a span with its own
colour class, and the ChangeLog bullets say what the page and check do.

3 files changed

Diff

 dreamstop-openfp-net-web/ChangeLog.md        |  4 ++--
 dreamstop-openfp-net-web/src/Site/Content.hs | 24 ++++++++++++------------
 nix/site.nix                                 |  6 +++---
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/dreamstop-openfp-net-web/ChangeLog.md b/dreamstop-openfp-net-web/ChangeLog.md
index 656a2ec..a2887f7 100644
--- a/dreamstop-openfp-net-web/ChangeLog.md
+++ b/dreamstop-openfp-net-web/ChangeLog.md
@@ -2,10 +2,10 @@
  
 ## 0.4.0.0 — 2026-12-06
  
-- The menu of positions now comes first on the front page, and the clear ChangeLog entry now follows it.
+- The menu of positions now comes straight after the front page's introduction, and the clear ChangeLog entry now follows it.
 - Each position's tab now ends with a short plain note on what the position records, naming its codes.
 - Readings of an ambiguous sentence are now lettered A, B, C, and the clauses in each reading are numbered 1, 2, 3, the numbers that references such as `/rel1` use.
-- Every code on the front page is now shown in its position's colour, including codes inside notes. The build now fails if a code appears outside a coloured code.
+- Every code on the front page is now shown in its position's colour, including codes inside notes. The build now fails if a code appears without its position's colour class.
  
 ## 0.3.1.0 — 2026-12-06
  
diff --git a/dreamstop-openfp-net-web/src/Site/Content.hs b/dreamstop-openfp-net-web/src/Site/Content.hs
index 9cbbf59..da784af 100644
--- a/dreamstop-openfp-net-web/src/Site/Content.hs
+++ b/dreamstop-openfp-net-web/src/Site/Content.hs
@@ -177,7 +177,7 @@ layerExamples = \case
   Force ->
     [ example Clear "This edition retires QC.DescribeCheckCoverage."
         [MkReading "[DEC·PFV]" "saying it makes it so: the edition retires the rule"]
-        [Code "DEC", Words ": the sentence retires the rule by being said, rather than reporting that it was retired."]
+        [Code "DEC", Words ": the sentence retires the rule by being said, rather than reporting a retirement."]
         "From the ChangeLog of quality-control, release 0.7.0.0."
     , example Ambiguous "Split vortex-shell from the vortex repository into its own repository."
         [ MkReading "[ASR·PFV]" "reports that the release moved vortex-shell into its own repository"
@@ -189,7 +189,7 @@ layerExamples = \case
   Mood ->
     [ example Clear "This would have caught the dead buttons."
         [MkReading "[ASR·COU·PFV]" "it did not catch them, and it would have if it had been in place"]
-        [Code "COU", Words ": the event is known not to have happened."]
+        [Code "COU", Words ": the sentence describes an event that is known to be false."]
         "From the unsafePerformApocalypse estate plan."
     ]
   Aspect ->
@@ -204,7 +204,7 @@ layerExamples = \case
         [Code "EXP", Words ": false before the release, false after it, and expected to change."]
         "From the ChangeLog of nixlab-shell, release 0.98.0.0."
     , example Nonsense "Removed the legacy importer, which reads the old export format." []
-        [Words "Under the release action, the relative clause says the importer reads the format from this release on, but the same release removed it."]
+        [Words "Under the release action, the relative clause says the importer reads the format from this release on, but the same release removes it."]
         "From the Quality Control Handbook, CLG.DescribeAddedThingsInPresent."
     ]
   Modality ->
@@ -330,12 +330,12 @@ positionNote = \case
     , Code "PRF"
     , Words "), something in progress ("
     , Code "PRG"
-    , Words "), or something that happens regularly ("
+    , Words "), or something that happens regularly or simply holds ("
     , Code "HAB"
     , Words ")."
     ]
   Phase ->
-    [ Words "Phase compares a release with the one before it: something is now true ("
+    [ Words "Phase compares the version a text describes with the one before it: something is now true ("
     , Code "INC"
     , Words "), has stopped being true ("
     , Code "CSS"
@@ -352,11 +352,11 @@ positionNote = \case
     , Code "ABL"
     , Words ") or what a goal needs ("
     , Code "TEL"
-    , Words "), and how strongly: always ("
+    , Words "), and how strongly: in every case ("
     , Code "NEC"
-    , Words "), ideally ("
+    , Words "), in the best cases ("
     , Code "WNC"
-    , Words ") or possibly ("
+    , Words ") or in some case ("
     , Code "POS"
     , Words ")."
     ]
@@ -371,15 +371,15 @@ positionNote = \case
     , Words ") marks something that happens exactly once in the program’s life, such as an import on first start, rather than every time."
     ]
   Evidence ->
-    [ Words "Evidence says how the writer knows: they saw it ("
+    [ Words "Evidence says how the writer knows something: the writer observes it ("
     , Code "OBS"
     , Words "), a record anyone can check shows it ("
     , Code "PUP"
-    , Words "), someone told them ("
+    , Words "), someone else reports it ("
     , Code "RPR"
-    , Words "), they worked it out ("
+    , Words "), the writer infers it ("
     , Code "INF"
-    , Words "), or they remember it ("
+    , Words "), or the writer remembers it ("
     , Code "REC"
     , Words ")."
     ]
diff --git a/nix/site.nix b/nix/site.nix
index 08cb25e..046d555 100644
--- a/nix/site.nix
+++ b/nix/site.nix
@@ -231,12 +231,12 @@ local:
         ];
       };
  
-      # Every code on the page sits in a coloured code element: with those
-      # elements, scripts and styles taken out, no code from the table is left.
+      # Every code on the page sits in a span with its own colour class: with
+      # those spans, scripts and styles taken out, no code from the table is left.
       codesColoured = pkgs.runCommand "dreamstop.openfp.net-codes-coloured" { } ''
         codes="${lib.concatStringsSep "|" (lib.concatMap (p: p.codes) (lib.attrValues codepoints.layers))}"
         left=$(tr "\n" " " < ${site.package}/index.html \
-          | sed -E "s#<(script|style)[^>]*>[^<]*</(script|style)>##g; s#<code>([^<]|<span[^>]*>[^<]*</span>)*</code>##g; s#<[^>]*># #g" \
+          | sed -E "s#<(script|style)[^>]*>[^<]*</(script|style)>##g; s#<span class=\"cp-([A-Z]{3})\">\\1</span>##g; s#<[^>]*># #g" \
           | { grep -owE "$codes" || true; } | sort -u | tr "\n" " ")
         [ -z "$left" ] || { echo "codes-coloured: uncoloured codes on the page: $left" >&2; exit 1; }
         touch $out