refactor remove the flash toast render

Drop the toast component and the page-shell flash render. Notifications move to modals; no live status should interrupt focus with a toast. The flash session channel is left intact for a future modal renderer. Related toast client code and CSS are removed alongside the workout-client and stylesheet changes.

Commit
dce10de897d3b9dde89a506241e6beeee7934539
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
Changed files
lib/presenter/page_kit.ml
index 532ba630..ba15e51a 100644..100644
@@ -28,27 +28,3 @@
28 28
29 29 let errors_to_text errors =
30 30 errors |> List.map (fun (_, key) -> error_text key) |> String.concat " "
31 Removed:
32 Removed: (* A transient notice served from the top of the screen. It is a polite live
33 Removed: region so assistive technology reads it. The client slides it away after five
34 Removed: seconds or when Dismiss is pressed; without script it stays, so a no-JS
35 Removed: visitor is still told and the button is inert. *)
36 Removed: let toast message =
37 Removed: tag "div"
38 Removed: [
39 Removed: class_ "toast";
40 Removed: Dream_html.attr "data-hito-toast";
41 Removed: Dream_html.string_attr "role" "status";
42 Removed: Dream_html.string_attr "aria-live" "polite";
43 Removed: ]
44 Removed: [
45 Removed: tag "span" [ class_ "toast-message" ] [ Dream_html.txt "%s" message ];
46 Removed: tag "button"
47 Removed: [
48 Removed: type_ "button";
49 Removed: class_ "toast-dismiss";
50 Removed: Dream_html.string_attr "aria-label" "Dismiss notice";
51 Removed: Dream_html.attr "data-hito-toast-dismiss";
52 Removed: ]
53 Removed: [ Dream_html.txt "×" ];
54 Removed: ]
lib/presenter/page_shell.ml
index c166c9f0..3c54b450 100644..100644
@@ -160,14 +160,6 @@
160 160 ]
161 161 | _ -> []
162 162 in
163 Removed: let flash_notice =
164 Removed: match request with
165 Removed: | Some request -> (
166 Removed: match Dream.session_field request flash_key with
167 Removed: | Some message -> [ toast message ]
168 Removed: | None -> [])
169 Removed: | None -> []
170 Removed: in
171 163 tag "html"
172 164 [
173 165 Dream_html.string_attr "lang" "en";
@@ -188,50 +180,48 @@
188 180 ];
189 181 tag "body"
190 182 [ Dream_html.string_attr "class" "hito-app" ]
191 Removed: (flash_notice
192 Removed: @ [
193 Removed: tag "a"
194 Removed: [
195 Removed: class_ "skip-link";
196 Removed: Dream_html.string_attr "href" "#main-content";
183 Added: ([
184 Added: tag "a"
185 Added: [
186 Added: class_ "skip-link"; Dream_html.string_attr "href" "#main-content";
187 Added: ]
188 Added: [ txt "Skip to main content" ];
189 Added: tag "div"
190 Added: ([
191 Added: Dream_html.string_attr "class" "app-shell page-%s" active;
192 Added: Dream_html.string_attr "data-hito-page-title" "Hito — %s" title;
197 193 ]
198 Removed: [ txt "Skip to main content" ];
199 Removed: tag "div"
200 Removed: ([
201 Removed: Dream_html.string_attr "class" "app-shell page-%s" active;
202 Removed: Dream_html.string_attr "data-hito-page-title" "Hito — %s" title;
203 Removed: ]
204 Removed: @
205 Removed: if spa_client then [ Dream_html.attr "data-hito-app-shell" ]
206 Removed: else [])
207 Removed: ([
208 Removed: tag "header"
209 Removed: [ class_ "masthead" ]
210 Removed: ([
211 Removed: tag "a"
212 Removed: ([ class_ "brand"; href Routes.home ]
213 Removed: @
214 Removed: if spa_client then
215 Removed: [ Dream_html.attr "data-hito-app-link" ]
216 Removed: else [])
217 Removed: [ txt "hito" ];
218 Removed: ]
219 Removed: @ primary_nav @ profile_area @ account_area);
220 Removed: tag "main"
221 Removed: [ id "main-content"; tabindex "-1" ]
222 Removed: [
223 Removed: tag "div"
224 Removed: ([ class_ "page-surface" ]
194 Added: @
195 Added: if spa_client then [ Dream_html.attr "data-hito-app-shell" ]
196 Added: else [])
197 Added: ([
198 Added: tag "header"
199 Added: [ class_ "masthead" ]
200 Added: ([
201 Added: tag "a"
202 Added: ([ class_ "brand"; href Routes.home ]
225 203 @
226 204 if spa_client then
227 Removed: [ Dream_html.attr "data-hito-app-content" ]
205 Added: [ Dream_html.attr "data-hito-app-link" ]
228 206 else [])
229 Removed: content;
230 Removed: footer ();
231 Removed: ];
232 Removed: ]
233 Removed: @ bottom_nav);
234 Removed: ]
207 Added: [ txt "hito" ];
208 Added: ]
209 Added: @ primary_nav @ profile_area @ account_area);
210 Added: tag "main"
211 Added: [ id "main-content"; tabindex "-1" ]
212 Added: [
213 Added: tag "div"
214 Added: ([ class_ "page-surface" ]
215 Added: @
216 Added: if spa_client then
217 Added: [ Dream_html.attr "data-hito-app-content" ]
218 Added: else [])
219 Added: content;
220 Added: footer ();
221 Added: ];
222 Added: ]
223 Added: @ bottom_nav);
224 Added: ]
235 225 @
236 226 if spa_client then
237 227 [