From c6300b0f9b425e25c17839ad8647fe7046dcbc91 Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Mon, 13 Mar 2023 00:01:27 +0100 Subject: [PATCH 1/2] ci(macos): Fix `brew upgrade` failure, bis --- .ci-macosx.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ci-macosx.sh b/.ci-macosx.sh index f28fbc31b..657da4578 100644 --- a/.ci-macosx.sh +++ b/.ci-macosx.sh @@ -20,6 +20,8 @@ rm -f /usr/local/bin/idle3.11 rm -f /usr/local/bin/pydoc3.11 rm -f /usr/local/bin/python3.11 rm -f /usr/local/bin/python3.11-config +rm -f /usr/local/lib/libtcl8.6.dylib +rm -f /usr/local/lib/libtk8.6.dylib brew upgrade brew install pkg-config From 3820c5ba2e13cc9a7efab8a4b27bb8eb193b3f6f Mon Sep 17 00:00:00 2001 From: Yann Regis-Gianas Date: Fri, 10 Mar 2023 09:08:10 +0100 Subject: [PATCH 2/2] =?UTF-8?q?fix(partition-view):=20Use=20Ctrl-click=20o?= =?UTF-8?q?r=20=E2=8C=98-click=20(instead=20of=20middle-click)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This new key-binding is macOS-compliant (tested with both Firefox and Safari). Co-Authored-By: Yann Regis-Gianas Co-Authored-By: Érik Martin-Dorel --- docs/howto-classify-students-answers.md | 2 +- src/app/learnocaml_teacher_tab.ml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/howto-classify-students-answers.md b/docs/howto-classify-students-answers.md index 68fe941c8..d3da56c37 100644 --- a/docs/howto-classify-students-answers.md +++ b/docs/howto-classify-students-answers.md @@ -21,7 +21,7 @@ Follow these steps: 1. Go to the teaching tab in the LearnOCaml Web UI (needs a teacher token). -2. Middle-click on the exercise `x` in the list of exercises. +2. Hold Ctrl (on macOS: Hold ⌘) and left click on the exercise `x` in the list of exercises. 3. Enter `foo` in the dialog box. diff --git a/src/app/learnocaml_teacher_tab.ml b/src/app/learnocaml_teacher_tab.ml index d8eb3e344..f0bf5fbd2 100644 --- a/src/app/learnocaml_teacher_tab.ml +++ b/src/app/learnocaml_teacher_tab.ml @@ -236,7 +236,13 @@ let rec teacher_tab token _select _params () = H.a_ondblclick (fun _ -> open_exercise_ ()); H.a_onmouseup (fun ev -> Js.Optdef.case ev##.which (fun () -> true) @@ fun btn -> - if btn = Dom_html.Middle_button then open_partition_ () else true); + if (Js.to_bool ev##.ctrlKey || + Js.to_bool ev##.metaKey (* ⌘ on macOS *)) + && btn = Dom_html.Left_button + then + open_partition_ () + else + true); ] [ auto_checkbox_td (); H.td ~a:[indent_style group_level]