fix Remove Home utility sections

Commit
531fb06012a81a63430ae306f587e79b40e6a05e
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
Changed files
lib/presenter/pages_routine.ml
index 8f989faa..6d777a2f 100644..100644
@@ -2,36 +2,6 @@
2 2 open Page_kit
3 3 open Page_shell
4 4
5 Removed: let home_utility_sections viewer =
6 Removed: [
7 Removed: tag "section"
8 Removed: [ class_ "home-utility-section" ]
9 Removed: [
10 Removed: tag "h2" [ class_ "home-utility-title" ] [ txt "Account" ];
11 Removed: tag "p" [] [ txt "%s" viewer.View_model.Viewer.username ];
12 Removed: tag "a"
13 Removed: [
14 Removed: href Routes.profile;
15 Removed: class_ "button secondary";
16 Removed: Dream_html.attr "data-hito-app-link";
17 Removed: ]
18 Removed: [ txt "Account" ];
19 Removed: ];
20 Removed: tag "section"
21 Removed: [ class_ "home-utility-section" ]
22 Removed: [
23 Removed: tag "h2" [ class_ "home-utility-title" ] [ txt "App Feedback" ];
24 Removed: tag "p" [] [ txt "Help improve hito by sharing your experience." ];
25 Removed: tag "a"
26 Removed: [
27 Removed: href Routes.app_feedback;
28 Removed: class_ "button secondary";
29 Removed: Dream_html.attr "data-hito-app-link";
30 Removed: ]
31 Removed: [ txt "Give feedback" ];
32 Removed: ];
33 Removed: ]
34 Removed:
35 5 let choose_routine request ~workout_started ~viewer
36 6 ~(routines : View_model.Routine_choice.t list) =
37 7 html_page ~viewer ~request ~active:"home" ?workout_started "Choose a routine"
@@ -54,8 +24,7 @@
54 24 void "input" [ type_ "submit"; value "Use this routine" ];
55 25 ];
56 26 ])
57 Removed: routines
58 Removed: @ home_utility_sections viewer)
27 Added: routines)
59 28
60 29 (* Both begin forms post the same fields. Only the override flag differs. *)
61 30 let begin_fields request ~routine_id ~override =
@@ -162,8 +131,7 @@
162 131 upcoming_workout_card vm.next_workout;
163 132 tag "p" [] [ txt "%s" status ];
164 133 ]
165 Removed: @ gate
166 Removed: @ home_utility_sections viewer)
134 Added: @ gate)
167 135
168 136 (* Home while a workout is in progress. Rather than the recovery gate or the
169 137 routine chooser, Home shows a single card: the workout is under way and one
test/web/overview.ml
index 784f21ea..cdd05e47 100644..100644
@@ -45,10 +45,10 @@
45 45 let _ = register c ~username:"lifter" ~password:"heavyduty1" in
46 46 let home = body (get c "/") in
47 47 Alcotest.(check bool)
48 Removed: "Home offers the Account affordance" true
48 Added: "Home does not offer the Account affordance" false
49 49 (Option.is_some (index_from ~needle:"Account" home 0));
50 50 Alcotest.(check bool)
51 Removed: "Home offers the App Feedback affordance" true
51 Added: "Home does not offer the App Feedback affordance" false
52 52 (Option.is_some (index_from ~needle:"App Feedback" home 0));
53 53 let trainee = the_trainee repo ~username:"lifter" in
54 54 let token = Option.get (csrf_token (body (get c "/"))) in
@@ -58,6 +58,13 @@
58 58 "Home shows the next workout title" true
59 59 (Option.is_some
60 60 (index_from ~needle:"Next Workout" selected_home 0));
61 Added: Alcotest.(check bool)
62 Added: "Selected Home does not offer the Account affordance" false
63 Added: (Option.is_some (index_from ~needle:"Account" selected_home 0));
64 Added: Alcotest.(check bool)
65 Added: "Selected Home does not offer the App Feedback affordance" false
66 Added: (Option.is_some
67 Added: (index_from ~needle:"App Feedback" selected_home 0));
61 68 let header =
62 69 "title,start_time,end_time,description,exercise_title,superset_id,exercise_notes,set_index,set_type,weight_kg,reps,distance_km,duration_seconds,rpe\r\n"
63 70 in