Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exercise Mode Editing Capabilities #1316

Closed
wants to merge 88 commits into from
Closed

Conversation

russell-rozenbaum
Copy link

@russell-rozenbaum russell-rozenbaum commented Jun 24, 2024

Added Features

Adds ability to edit several exercise mode features:

  • Title
  • Module name
  • Prompt
  • Number of Mutation Tests
  • Required Tests
  • Point Distributions

Also implements the following:

  1. Exercise's storage keying system now uses UUIDs rather than (string, int) pairs. *Note: this change removes the previous version field, represented by the int in the pair of the old keying system
  2. persistent_state type in exercise mode has been made into a record. Along with the zipper position and editors it stores the title and list of mutants. This allows for mutants to be persisted and unpersisted upon saving and loading to and from local storage.

Caveats

  • Exercise modules must have a hardcoded UUID in their spec file to save and load properly. A potential solution can be to initialize a UUID and update the spec when first loading. This would require mutating the spec file however. This shouldn't prove to be much of an issue when creating new exercises.
  • Future implementations requiring saving and loading mutable features to and from storage will need to be added in the record and persisted/unpersisted properly in their respective functions. This isn't as much of a pitfall, as it is a note to help future implementations.

…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"
@cyrus-
Copy link
Member

cyrus- commented Jun 28, 2024

@russell-rozenbaum did you intend to close this issue?

@russell-rozenbaum
Copy link
Author

I've added more changes beyond just the title editor to this branch, to be exact I added some implementations to adding and deleting buggy implementations, so I wasn't sure whether to move those commits to a different branch or finish them out fully before opening this pull request

@russell-rozenbaum
Copy link
Author

Commit [968fe1c] is the one I'd like to merge. The last 2 commits add the ability to add/delete buggy implementations, which I'll start on another branch. The problem with the current version is a bug that occurs when adding a wrong implementation (which is itself an editor) and then I believe the program does not know where to put the cursor on page reload since the editors are reset (the one previously added, now deleted on page reload), and results in an infinite loading screen. Besides this, I still want to add the ability to edit the hints associated with buggy implementations, which right now defaults to "no hint available".

@cyrus- cyrus- marked this pull request as draft July 9, 2024 14:44
@cyrus- cyrus- linked an issue Jul 9, 2024 that may be closed by this pull request
…to-do: allow editing of implementation hints as they default to "no hint available
@russell-rozenbaum russell-rozenbaum changed the title Title Editor Title and Mutation Suite Editing Aug 3, 2024
@facundoy facundoy marked this pull request as draft December 2, 2024 22:44
@facundoy facundoy marked this pull request as ready for review December 2, 2024 23:36
@facundoy facundoy requested a review from cyrus- December 2, 2024 23:36
@Negabinary Negabinary self-requested a review December 6, 2024 22:10
@cyrus-
Copy link
Member

cyrus- commented Dec 11, 2024

@facundoy The markdown editor isn't inserting line breaks correctly (ignores them).

@cyrus-
Copy link
Member

cyrus- commented Dec 16, 2024

@facundoy looks like the big task remaining here is to fix the merge conflicts. should mostly be moved files and basic re-org but feel free to reach out to @Negabinary if you have any questions.

@russell-rozenbaum
Copy link
Author

Closing this PR in favor of #1444 (resolved merge conflicts and other bug fixes)

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.

Add ability to edit exercise title
3 participants