Skip to content

Suggestion: ACE UI remembers edit/undo history after page reload #204

Open
@jimbonothing64

Description

@jimbonothing64

When a question answerer presses check, the page reloads, from the form submit, and the user loses their undo history. Question answerers should not lose their edit history when clicking check on, at minimum, the current question they are working on.

This is bad for beginner programmers who may forget which line they just changed. Being able to use ctrl+z after submitting code could help them to remember what they changed, and see what effect that had.

Proposed changes:

  • Update ace editor library for new API features.
  • Store the ace editor's session history in the browser's session storage, when clicking check (on sync event).
  • Load this session history iff the code is the same, when the ace editor loads.
    • Would need to use textareaid or similar as the key.
    • Possible memory issue if large code/lots of edits/questions, might be nice to only store the last question or last X questions editor history

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions