Code Monkey home page Code Monkey logo

tension-ui's People

Contributors

wrobbinz avatar

Stargazers

 avatar

Watchers

 avatar  avatar

tension-ui's Issues

Autosave & Version Control

Below are specifications for how notes are saved and how multiple versions of a note can be created and accessed.

User Stories

1. User notes are saved automatically

As a user
I want my notes to always be saved
So that I know they will always be saved and current

Scenario A: User is online

Given a user is editing a note
And the user has an internet connection
When they stop editing for ~1000ms
Then the note is saved to the DB

Scenario B: User is offline

Given a user is editing a note
And there is no internet connection
When they view the application
Then the user made aware of the lack of connection
And notes are saved locally
And notes are saved automatically when internet access is regained

2. User can create versions of a note

As a user
I want to save a version of my note
So that I can revert back to it at a later time

Scenario A: User saves new note version

Given a user has edited a note
When they click into NoteOptions dropdown
Then a "Save New Version" option is available

Given a user has opened the NoteOptions dropdown
When they click the "Save New Version" option
Then a modal opens containing an "Version Name" input field and a "Save" button
And the input field is blank
And the "Save" button is disabled

Given a user has opened the "Save New Version" modal
When they type a version name into the input field
Then the "Save" button is enabled

Given a user has entered a name in the "Save New Version" modal
When "Save" button is clicked
Then the modal disappears
And the user is notified that the new version has been saved

3. User can access previous note versions

As a user
I want to be able to see and revert back to any of a note's versions
So that I can get my note back to its previous state

Scenario A: User hasn't saved any note versions

Given a user has a note selected
And no versions have been saved for that note
When noteOptions dropdown is clicked
Then the option "Previous Versions" is disabled

Scenario B: User has saved a version of note

Given a user has a note selected
And a version was previously created
When noteOptions dropdown is clicked
Then the option "Previous Versions" is enabled
And clicking the option opens the "Previous Versions" modal

Given a user has a note with previous versions
When they open the "Previous Versions" modal
Then a table of all saved versions is shown
And each row shows the version name, date created
And each row has a "Revert" button

Given a user has opened the "Previous Versions" modal
When they click the "Revert" button for note version
Then the modal closes
And the editor loads the selected note version's contents

Tech Design

The contents of a note (and so any version of a note) is stored as JSON. The note resource should have two fields:

  • contents: An object representing the current content state of the note. This value is displayed in the editor.
  • versions: An array of note IDs referencing previously saved note versions.
{
  "contents": {},
  "versions": [34, 98, 213]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.