Skip to content

Commit fbf7d4d

Browse files
committed
Comment out jumping
1 parent 9fca178 commit fbf7d4d

File tree

23 files changed

+316
-312
lines changed

23 files changed

+316
-312
lines changed

src/haz3lcore/ProbePerform.re

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,11 @@ let go =
592592
| Some(id) => toggle_statics(~syntax, id, info_map, z)
593593
| None => z
594594
}
595-
| StepInto(sample, ap_id) =>
596-
switch (step_into_sample(~syntax, ~sample, ~ap_id, info_map, z)) {
597-
| Some(z) => z
598-
| None => z
599-
}
595+
// | StepInto(sample, ap_id) =>
596+
// switch (step_into_sample(~syntax, ~sample, ~ap_id, info_map, z)) {
597+
// | Some(z) => z
598+
// | None => z
599+
// }
600600
};
601601

602602
/* Check if id has either manual or ephermeral probe on it */

src/haz3lcore/projectors/implementations/ProbeProj.re

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,9 @@ let dropdown_id = (sample_id: int): string =>
526526
"sample-dropdown-" ++ string_of_int(sample_id);
527527

528528
/* Step into handler for sample context menu */
529-
let step_into_sample =
530-
(~parent, ~sample: Sample.t, ~ap_id: Id.t): Ui_effect.t(unit) =>
531-
parent(Probe(StepInto(sample, ap_id)));
529+
// let step_into_sample =
530+
// (~parent, ~sample: Sample.t, ~ap_id: Id.t): Ui_effect.t(unit) =>
531+
// parent(Probe(StepInto(sample, ap_id)));
532532

533533
/* Context actions for a sample (Pin/Unpin, Step Into, etc.) */
534534
let sample_context_actions =
@@ -557,26 +557,26 @@ let sample_context_actions =
557557
span(~attrs=[Attr.classes(["shortcut"])], [text("P")]),
558558
],
559559
),
560-
/* Step Into action */
561-
div(
562-
~attrs=[
563-
Attr.classes(["action-item", "step-into-action"]),
564-
Attr.on_pointerdown(_
565-
/* Stop propagation to prevent parent wrapper's Focus action
566-
from moving cursor back to the probe after we jump */
567-
=>
568-
Effect.Many([
569-
Effect.Stop_propagation,
570-
step_into_sample(~parent, ~sample, ~ap_id),
571-
])
572-
),
573-
],
574-
[
575-
div(~attrs=[Attr.classes(["step-into-icon"])], []),
576-
text("Step into"),
577-
span(~attrs=[Attr.classes(["shortcut"])], [text("Enter")]),
578-
],
579-
),
560+
// /* Step Into action */
561+
// div(
562+
// ~attrs=[
563+
// Attr.classes(["action-item", "step-into-action"]),
564+
// Attr.on_pointerdown(_
565+
// /* Stop propagation to prevent parent wrapper's Focus action
566+
// from moving cursor back to the probe after we jump */
567+
// =>
568+
// Effect.Many([
569+
// Effect.Stop_propagation,
570+
// step_into_sample(~parent, ~sample, ~ap_id),
571+
// ])
572+
// ),
573+
// ],
574+
// [
575+
// div(~attrs=[Attr.classes(["step-into-icon"])], []),
576+
// text("Step into"),
577+
// span(~attrs=[Attr.classes(["shortcut"])], [text("Enter")]),
578+
// ],
579+
// ),
580580
],
581581
),
582582
];
@@ -1014,19 +1014,19 @@ let key_handler =
10141014
print_endline("pin: no sample or ap_id");
10151015
Many([Stop_propagation, Prevent_default]);
10161016
}
1017-
| D("Enter") =>
1018-
/* Step into the indicated sample */
1019-
switch (indicated_sample(~ap_id, di), ap_id) {
1020-
| (Some(sample), Some(ap_id)) =>
1021-
Many([
1022-
Stop_propagation,
1023-
Prevent_default,
1024-
step_into_sample(~parent, ~sample, ~ap_id),
1025-
])
1026-
| _ =>
1027-
print_endline("step into: no sample or ap_id");
1028-
Many([Stop_propagation, Prevent_default]);
1029-
}
1017+
// | D("Enter") =>
1018+
// /* Step into the indicated sample */
1019+
// switch (indicated_sample(~ap_id, di), ap_id) {
1020+
// | (Some(sample), Some(ap_id)) =>
1021+
// Many([
1022+
// Stop_propagation,
1023+
// Prevent_default,
1024+
// step_into_sample(~parent, ~sample, ~ap_id),
1025+
// ])
1026+
// | _ =>
1027+
// print_endline("step into: no sample or ap_id");
1028+
// Many([Stop_propagation, Prevent_default]);
1029+
// }
10301030
| _ => Many([Stop_propagation])
10311031
};
10321032
};

src/haz3lcore/zipper/action/Action.re

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type chunkiness =
88
[@deriving (show({with_path: false}), sexp, yojson, eq)]
99
type goal =
1010
| Hole(Direction.t)
11-
| TileId([@equal (_, _) => true] Id.t)
11+
// | TileId([@equal (_, _) => true] Id.t)
1212
| BindingSiteOfIndicatedVar;
1313

1414
[@deriving (show({with_path: false}), sexp, yojson, eq)]
@@ -87,8 +87,8 @@ type paste =
8787
type probe =
8888
| ToggleManual
8989
| ToggleAuto
90-
| ToggleStatics
91-
| StepInto(Language.Sample.t, Id.t);
90+
| ToggleStatics;
91+
// | StepInto(Language.Sample.t, Id.t);
9292

9393
[@deriving (show({with_path: false}), sexp, yojson, eq)]
9494
type t =

src/haz3lcore/zipper/action/Move.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ let move_dispatch =
143143
| Vertical(d) => vertical(~measured, ~col_target, d, z)
144144
| Point(goal) => to_point(~measured, ~goal, z)
145145
| Goal(Hole(d)) => to_next_grout(d, z)
146-
| Goal(TileId(id)) => jump_to_id_indicated(z, id)
146+
// | Goal(TileId(id)) => jump_to_id_indicated(z, id)
147147
| Goal(BindingSiteOfIndicatedVar) =>
148148
let* ci = Indicated.ci_of(z, statics);
149149
let* binding_id = Language.Info.get_binding_site(ci);

src/web/app/Page.re

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ module Update = {
113113
(
114114
~import_log,
115115
~schedule_action,
116-
~globals: Globals.Model.t,
116+
~globals as _: Globals.Model.t,
117117
action: Globals.Update.t,
118118
model: Model.t,
119119
) => {
@@ -137,31 +137,31 @@ module Update = {
137137
settings,
138138
},
139139
};
140-
| JumpToTile(id) =>
141-
let jump =
142-
Editors.Selection.jump_to_tile(
143-
~settings=model.globals.settings,
144-
id,
145-
model.editors,
146-
);
147-
switch (jump) {
148-
| None => model |> Updated.raise_invalid_action
149-
| Some((action, selection)) =>
150-
let* editors =
151-
Editors.Update.update(
152-
~globals,
153-
~schedule_action=a => schedule_action(Editors(a)),
154-
~send_assistant_insertion_info=
155-
assistant_callback(~schedule_action, model),
156-
action,
157-
model.editors,
158-
);
159-
{
160-
...model,
161-
editors,
162-
selection,
163-
};
164-
};
140+
// | JumpToTile(id) =>
141+
// let jump =
142+
// Editors.Selection.jump_to_tile(
143+
// ~settings=model.globals.settings,
144+
// id,
145+
// model.editors,
146+
// );
147+
// switch (jump) {
148+
// | None => model |> Updated.raise_invalid_action
149+
// | Some((action, selection)) =>
150+
// let* editors =
151+
// Editors.Update.update(
152+
// ~globals,
153+
// ~schedule_action=a => schedule_action(Editors(a)),
154+
// ~send_assistant_insertion_info=
155+
// assistant_callback(~schedule_action, model),
156+
// action,
157+
// model.editors,
158+
// );
159+
// {
160+
// ...model,
161+
// editors,
162+
// selection,
163+
// };
164+
// };
165165
| InitImportAll(file) =>
166166
JsUtil.read_file(file, data =>
167167
schedule_action(Globals(FinishImportAll(data)))

src/web/app/editors/Editors.re

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -324,22 +324,22 @@ module Selection = {
324324
};
325325
};
326326

327-
let jump_to_tile =
328-
(~settings, tile, model: Model.t): option((Update.t, t)) =>
329-
switch (model) {
330-
| Scratch(m) =>
331-
ScratchMode.Selection.jump_to_tile(tile, m)
332-
|> Option.map(((x, y)) => (Update.Scratch(x), Scratch(y)))
333-
| Documentation(m) =>
334-
ScratchMode.Selection.jump_to_tile(tile, m)
335-
|> Option.map(((x, y)) => (Update.Scratch(x), Scratch(y)))
336-
| Tutorial(m) =>
337-
TutorialsMode.Selection.jump_to_tile(~settings, tile, m)
338-
|> Option.map(((x, y)) => (Update.Tutorial(x), Tutorial(y)))
339-
| Exercises(m) =>
340-
ExercisesMode.Selection.jump_to_tile(~settings, tile, m)
341-
|> Option.map(((x, y)) => (Update.Exercises(x), Exercises(y)))
342-
};
327+
// let jump_to_tile =
328+
// (~settings, tile, model: Model.t): option((Update.t, t)) =>
329+
// switch (model) {
330+
// | Scratch(m) =>
331+
// ScratchMode.Selection.jump_to_tile(tile, m)
332+
// |> Option.map(((x, y)) => (Update.Scratch(x), Scratch(y)))
333+
// | Documentation(m) =>
334+
// ScratchMode.Selection.jump_to_tile(tile, m)
335+
// |> Option.map(((x, y)) => (Update.Scratch(x), Scratch(y)))
336+
// | Tutorial(m) =>
337+
// TutorialsMode.Selection.jump_to_tile(~settings, tile, m)
338+
// |> Option.map(((x, y)) => (Update.Tutorial(x), Tutorial(y)))
339+
// | Exercises(m) =>
340+
// ExercisesMode.Selection.jump_to_tile(~settings, tile, m)
341+
// |> Option.map(((x, y)) => (Update.Exercises(x), Exercises(y)))
342+
// };
343343

344344
let default_selection =
345345
fun

src/web/app/editors/cell/CellEditor.re

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,10 @@ module Selection = {
179179
|> Option.map(x => Update.ResultAction(x))
180180
};
181181
};
182-
183-
let jump_to_tile = (tile, model: Model.t): option((Update.t, t)) => {
184-
CodeEditable.Selection.jump_to_tile(tile, model.editor)
185-
|> Option.map(x => (Update.MainEditor(x), MainEditor));
186-
};
182+
// let jump_to_tile = (tile, model: Model.t): option((Update.t, t)) => {
183+
// CodeEditable.Selection.jump_to_tile(tile, model.editor)
184+
// |> Option.map(x => (Update.MainEditor(x), MainEditor));
185+
// };
187186
};
188187

189188
module View = {
@@ -215,12 +214,12 @@ module View = {
215214
},
216215
~signal=
217216
fun
218-
| MakeActive(a) => signal(MakeActive(Result(a)))
219-
| JumpTo(id) =>
220-
Effect.Many([
221-
signal(MakeActive(MainEditor)),
222-
inject(MainEditor(Perform(Move(Goal(TileId(id)))))),
223-
]),
217+
| MakeActive(a) => signal(MakeActive(Result(a))),
218+
// | JumpTo(id) =>
219+
// Effect.Many([
220+
// signal(MakeActive(MainEditor)),
221+
// inject(MainEditor(Perform(Move(Goal(TileId(id)))))),
222+
// ]),
224223
~inject=a => inject(ResultAction(a)),
225224
~selected={
226225
switch (selected) {

src/web/app/editors/code/CodeEditable.re

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ module Update = {
7979
| Cut
8080
| Reparse
8181
| Introduce
82-
| Probe(StepInto(_))
82+
// | Probe(StepInto(_))
8383
| Dump => true
8484
| Project(_)
8585
| Unselect(_)
@@ -189,13 +189,12 @@ module Selection = {
189189
}
190190
};
191191
};
192-
193-
let jump_to_tile = (id: Id.t, model: Model.t): option(Update.t) => {
194-
switch (TermData.root_tile(id, model.editor.syntax.term_data)) {
195-
| Some(_) => Some(Perform(Move(Goal(TileId(id)))))
196-
| None => None
197-
};
198-
};
192+
// let jump_to_tile = (id: Id.t, model: Model.t): option(Update.t) => {
193+
// switch (TermData.root_tile(id, model.editor.syntax.term_data)) {
194+
// | Some(_) => Some(Perform(Move(Goal(TileId(id)))))
195+
// | None => None
196+
// };
197+
// };
199198
};
200199

201200
module View = {

src/web/app/editors/mode/ExercisesMode.re

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -466,21 +466,20 @@ module Selection = {
466466
| (Theorem(_), _) => None
467467
};
468468
};
469-
470-
let jump_to_tile =
471-
(~settings, tile, model: Model.t): option((Update.t, t)) => {
472-
let current = List.nth(model.exercises, model.current);
473-
switch (current) {
474-
| Implementation(e) =>
475-
ExerciseMode.Selection.jump_to_tile(~settings, tile, e)
476-
|> Option.map(((x, y)) => (Update.Exercise(x), Implementation(y)))
477-
| Theorem(e) =>
478-
TheoremExerciseMode.Selection.jump_to_tile(tile, e)
479-
|> Option.map(((x, y)) =>
480-
(Update.TheoremExercise(x), TheoremExercise(y))
481-
)
482-
};
483-
};
469+
// let jump_to_tile =
470+
// (~settings, tile, model: Model.t): option((Update.t, t)) => {
471+
// let current = List.nth(model.exercises, model.current);
472+
// switch (current) {
473+
// | Implementation(e) =>
474+
// ExerciseMode.Selection.jump_to_tile(~settings, tile, e)
475+
// |> Option.map(((x, y)) => (Update.Exercise(x), Implementation(y)))
476+
// | Theorem(e) =>
477+
// TheoremExerciseMode.Selection.jump_to_tile(tile, e)
478+
// |> Option.map(((x, y)) =>
479+
// (Update.TheoremExercise(x), TheoremExercise(y))
480+
// )
481+
// };
482+
// };
484483
};
485484

486485
module View = {

src/web/app/editors/mode/TutorialsMode.re

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -315,14 +315,14 @@ module Selection = {
315315
List.nth(model.exercises, model.current),
316316
)
317317
|> Option.map(a => Update.Tutorial(a));
318-
let jump_to_tile =
319-
(~settings, tile, model: Model.t): option((Update.t, t)) =>
320-
TutorialMode.Selection.jump_to_tile(
321-
~settings,
322-
tile,
323-
List.nth(model.exercises, model.current),
324-
)
325-
|> Option.map(((x, y)) => (Update.Tutorial(x), y));
318+
// let jump_to_tile =
319+
// (~settings, tile, model: Model.t): option((Update.t, t)) =>
320+
// TutorialMode.Selection.jump_to_tile(
321+
// ~settings,
322+
// tile,
323+
// List.nth(model.exercises, model.current),
324+
// )
325+
// |> Option.map(((x, y)) => (Update.Tutorial(x), y));
326326
};
327327

328328
module View = {

0 commit comments

Comments
 (0)