Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
I
iTasks-SDK
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 73
    • Issues 73
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 6
    • Merge Requests 6
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • clean-and-itasks
  • iTasks-SDK
  • Issues
  • #405

Closed
Open
Opened Aug 26, 2020 by Camil Staps@cstaps🚀Owner

Storing/restoring incomplete editor state

In some cases it can be useful to have functionality to be able to store an incomplete editor state, and then later do an enterInformation but prefill the editor with that incomplete state. @eveen is for example building a questionnaire in which there must be a Back button. When you click Back, the answers on the current page must be stored (and restored when you get back there) even if not the entire editor has been filled in yet.

I can see how we might do this on the frontend: add functions to every Component to serialize/deserialize the state; container components would recurse. But how do we get that information in the backend? Perhaps we can add an editor modifier withIncompleteState :: (Editor a) -> Editor (Either JSONNode a) or -> Editor (JSONNode, ?a), which always has a value (the JSON being the representation of the incomplete value)? But this messes with functions like hasValue: a button with hasValue should not be enabled when you use an Either JSONNode a editor and there is an incomplete value.

@baslijns do you have ideas about this? (Perhaps the new editors already make this easier?)

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: clean-and-itasks/iTasks-SDK#405