Skip to content

Conversation

@russell-rozenbaum
Copy link
Contributor

@russell-rozenbaum russell-rozenbaum commented Dec 18, 2024

TL;DR
Exercise Mode is fully (mostly) editable

Added Features
Adds ability to edit all* Exercise Mode features:

  • Title
  • Module name
  • Prompt
  • Mutation Tests
  • Implementation Tests
    *Still need to add editing for Syntax Tests

Also adds BlankExercise.ml for a completely blank exercise spec. Might be useful when creating new exercise button... just make sure to change UUID.

Not Bugs, but Relatively Important Things for Editing an Exercise

  • Cannot edit mutation test hints
  • Cannot add/remove Syntax Validation tests
  • Cannot edit Syntax Validation test hints
  • Cannot edit Implementation Grading test hints

russell-rozenbaum and others added 30 commits June 13, 2024 13:14
…ser is editing title, also automated swapping between focus on title-box/editors
…es, this also solves issue of text-box with incorrect value persisting across exercise slides when switching while editing
…hen switching between exercise slides; added confirm and cancel edit buttons for finalizing title updates (or cancelling them), this also fixes a bug with pressing enter to confirm where it would also press enter in the respective code editor where the cursor was located
…to-do: allow editing of implementation hints as they default to "no hint available"
…to-do: allow editing of implementation hints as they default to "no hint available
… : string, version : int) pairs; edited title now saves on refresh
Copy link
Member

@cyrus- cyrus- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Instructor Mode should be off by default when you load an exercise, since it now includes a bunch of things we don't want new users to have to think about.
  • Prompt should not be bolded by default.
  • Cut/copy/paste does not work in exercise mode editors.
  • Not sure how hard this is, but unicode symbols are mangled when included in the prompt, e.g. I wanted to use unicode triple equals ≡ but it does not work.
  • Is it possible for the hints to be a field under each mutant, rather than separately in the Mutation Testing box?
  • Syntax Validation box should include a way to edit the % discount on points.
  • Instead of "New point max" just say "Points"
  • Too much space between exercise title, module name and prompt.

@facundoy
Copy link
Contributor

facundoy commented Feb 23, 2025

  • Instructor Mode should be off by default when you load an exercise, since it now includes a bunch of things we don't want new users to have to think about.
  • Prompt should not be bolded by default.
  • Cut/copy/paste does not work in exercise mode editors.
  • Unicode for prompt
  • Is it possible for the hints to be a field under each mutant, rather than separately in the Mutation Testing box?
  • (Removing this task. The current architecture for exercise mode can't support this (or would be a much more involved project to implement).) Syntax Validation box should include a way to edit the % discount on points.
  • Instead of "New point max" just say "Points"
  • Too much space between exercise title, module name and prompt.

@facundoy
Copy link
Contributor

facundoy commented Feb 23, 2025

Unicode seems to be working on prompt locally in this format ≡

edit: meant that unicode works when inputing the following "&#x2261"

@cyrus-
Copy link
Member

cyrus- commented Feb 23, 2025

@facundoy regarding Unicode, this is what happens when I enter
image

It turns into an a in this case:
image

When I edit it again I get an unknown character:
image

@russell-rozenbaum
Copy link
Contributor Author

russell-rozenbaum commented Mar 4, 2025

A few bugs:

  • Unable to refresh Hazel after opening exercise mode. This at least happens locally for me. My assumption is a problem with how the exercises are stored.

Still need to implement:

  • Hints to be a field under each mutant, rather than separately in the Mutation Testing box? This should just involve restructuring the HTML layout / CSS

@cyrus-
Copy link
Member

cyrus- commented Apr 14, 2025

@russell-rozenbaum @facundoy there are a few conflicts to resolve here. could we get this PR fixed up and ready to merge this week?

@codecov
Copy link

codecov bot commented Apr 21, 2025

Codecov Report

Attention: Patch coverage is 82.55814% with 45 lines in your changes missing coverage. Please review.

Project coverage is 50.11%. Comparing base (2d68c7a) to head (cdaba5e).
Report is 238 commits behind head on dev.

Files with missing lines Patch % Lines
src/haz3lcore/dynamics/transition/Casts.re 83.59% 21 Missing ⚠️
src/haz3lcore/statics/Elaborator.re 87.95% 10 Missing ⚠️
src/haz3lcore/dynamics/transition/Unboxing.re 75.00% 4 Missing ⚠️
src/util/Aba.re 0.00% 4 Missing ⚠️
src/haz3lcore/lang/term/TermBase.re 0.00% 2 Missing ⚠️
src/util/StringUtil.re 0.00% 2 Missing ⚠️
src/haz3lcore/prog/CoreSettings.re 0.00% 1 Missing ⚠️
src/haz3lmenhir/AST.re 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1444      +/-   ##
==========================================
+ Coverage   50.02%   50.11%   +0.09%     
==========================================
  Files         130      134       +4     
  Lines       14456    14855     +399     
==========================================
+ Hits         7231     7444     +213     
- Misses       7225     7411     +186     
Files with missing lines Coverage Δ
src/haz3lcore/dynamics/Evaluator.re 92.98% <ø> (-3.32%) ⬇️
src/haz3lcore/dynamics/stepper/EvaluatorStep.re 56.52% <ø> (ø)
...rc/haz3lcore/dynamics/transition/EvaluatorError.re 0.00% <ø> (ø)
src/haz3lcore/dynamics/transition/PatternMatch.re 81.66% <100.00%> (+2.35%) ⬆️
src/haz3lcore/dynamics/transition/Transition.re 67.61% <100.00%> (+9.97%) ⬆️
src/haz3lcore/lang/term/Grammar.re 78.35% <100.00%> (-0.23%) ⬇️
src/haz3lcore/lang/term/Term.re 62.10% <ø> (ø)
src/haz3lcore/pretty/ExpToSegment.re 78.07% <ø> (+1.73%) ⬆️
src/haz3lcore/zipper/Editor.re 17.64% <ø> (+2.83%) ⬆️
src/haz3lcore/zipper/action/Introduce.re 90.62% <ø> (ø)
... and 8 more

... and 22 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@russell-rozenbaum
Copy link
Contributor Author

russell-rozenbaum commented Apr 23, 2025

@facundoy There is a bug where the page freezes whenever I try to confirm edits in the prompt. Does this happen for you as well? Any idea what this could be?

…(since editing an input-box) leads to infinite page load
@facundoy
Copy link
Contributor

@russell-rozenbaum is your last commit solving this bug? I tested it locally with that change and the prompt editing seems to be working without issue, and it was working fine when I solved the merge conflicts this weekend if I remember correctly.

@facundoy There is a bug where the page freezes whenever I try to confirm edits in the prompt. Does this happen for you as well? Any idea what this could be?

@russell-rozenbaum
Copy link
Contributor Author

@russell-rozenbaum is your last commit solving this bug? I tested it locally with that change and the prompt editing seems to be working without issue, and it was working fine when I solved the merge conflicts this weekend if I remember correctly.

@facundoy There is a bug where the page freezes whenever I try to confirm edits in the prompt. Does this happen for you as well? Any idea what this could be?

@facundoy No, my most recent commit only fixed a bug with reloading a page while editing. This seems to be a different issue. Whenever I make an edit in the prompt edit box specifically, the page becomes unresponsive. I don't think this is only on my machine, as it happens on both my local server and the branch's server.

@cyrus-
Copy link
Member

cyrus- commented Jun 5, 2025

@russell-rozenbaum or @facundoy Russell let me know that this never actually got merged. there is a conflict in 1 file right now, can one of you resolve that and we can get this merged?

@russell-rozenbaum
Copy link
Contributor Author

Well, I'm not sure what cdaba5e did exactly, but e34bbcd was where I finalized things... cdaba5e should be fine and ready to be merged

@cyrus- cyrus- merged commit c080dc1 into dev Jun 9, 2025
4 checks passed
@cyrus- cyrus- deleted the title-editor-2 branch June 9, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants