Giter Site home page Giter Site logo

davidlarsketch / aardappel Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 119 KB

Aardappel is a tool for writing teams to suggest edits to each other's work in a stream-lined, mobile-friendly manner.

Home Page: https://aardappel-nss.firebaseapp.com

License: MIT License

JavaScript 74.78% HTML 16.73% CSS 8.49%

aardappel's People

Contributors

davidlarsketch avatar

Watchers

 avatar  avatar  avatar

aardappel's Issues

User can redo suggested edits

Given

  • A user is logged in, into a particular team
  • The user is viewing a 'pending review' document
  • The user has undone a previous edit

When

  • The user clicks redo menu button

Then

  • The most recently undone suggestion is redone

Important

  • When user clicks all docs button, stored previous states are removed from app

New document periodically saves

Given

  • A user is logged in, into a team
  • They click the 'Add new doc' button
  • They tap/paste text into the text area
  • Stay on that view

When

  • Timeout elapses

Then

  • The document is sent to the text segmenter
  • Previous segments are deleted
  • New segments are posted
  • Timer resets

User can join editing teams

Given

A user is logged in & is at the teams-login view

When

They click on an editing team's space on the page

Then

An input appears

When

The password is entered, and a join button pressed

Then

(1) The editing team is added to that user's joined teams section of teams-login, (2) that team's all-docs loads

If

The password is incorrect, the user is prompted to re-enter/check with their admin

Admin can click on admin button

Given

  • A user is logged in
  • A user is at the all-docs view
  • They have admin privileges (granted by creating an editing team or another admin granting them

When

  • An admin clicks on the admin button

Then

  • They are taken to an admin view where they can update team display name, grant admin privileges, and kick team members

User can suggest additions

Given

  • A user is logged in, into a particular team
  • A user taps/clicks on a 'pending review' doc (their own or others')
  • A user taps/clicks on the text area in the document

When

  • The user types in new text
  • The user taps/clicks away from their keyboard

Then

  • The new text is broken out into own <span> with a class of add
  • Whole doc is sent to sentence splitter, splitting up text into segments
  • If addition can be combined with immediately adjacent added text, then it is appended to that <span>
  • Previous segments are stored in app (for undoing)
  • Previous segments are deleted from database
  • New segments are posted to database
  • Document is reprinted
  • User sees selected text where new addition was made as green

A user can see their team's docs 'review completed'

Given

  • A user is logged in
  • A user is logged into an editing team
  • A user is at the all-docs view
  • Their team has added documents & they have been reviewed

When

  • They scroll to the bottom of the screen

Then

  • They will see their team's documents 'review completed' in a grid going to the right, off the screen if there are enough documents

User can register

Given

A user wants to register

When

They click on the "Register" button

Then

They are sent to registration page

When

They enter in their (1) display name, (2) email, & (3) password in the input boxes

Then

(1) Email/pass sent to database; (2) database returns uid; (3) uid & display name are posted to users in database; and (4) users are logged in & sent to team-login

If no users joined to a team, printing teams in team-login breaks

Expected Behavior

  • 'Joined Teams' and 'Join a New Team' should print according to a user's access

Actual Behavior

  • When all users have left a team, then when app gets to that obj in database GET, console.log throws undefined for users (because the last user leaving the team deletes the obj from the database)
  • Printing teams breaks at this point and any other teams unprinted have trouble printing (sometimes they do, sometimes they don't)

Steps to Reproduce Behavior

  • Have all users leave a team, then reload the page

Module Suspected / Relevant Files

  • TeamLoginCtrl

Solution Ideas

  • Create a check in revokeAccess() that verifies whether the user property patched exists. If not, patch with user: [] so there is an empty object checkUserAccess() can run its indexOf(uid) on
  • Not allow the team owner to leave the team, but instead delete the team (from another button in all-docs view)
  • If the team owner leaves the team, then that team (and its data?) is deleted

User can suggest deletions

Given

  • A user is logged in, into a particular team
  • A user taps/clicks on a 'pending review' doc (their own or others')
  • A user taps/clicks on the text area in the document or highlights text

When

  • The backspace/delete button is pressed on the keyboard

Then

  • Highlighted text/character is broken out into own <span> with a class of strike
  • Whole doc is sent to sentence splitter, splitting up text into segments
  • If deletion can be combined with immediately adjacent deleted text, then it is appended to that <span>
  • Previous segments are stored in app (for undoing)
  • Previous segments are deleted from database
  • New segments are posted to database
  • Document is reprinted
  • User sees selected text where new deleted was made as strike-through

Clicking on a doc 'pending review' takes user to review interface

Given

  • A user is logged in, and logged in to a team

When

  • A user clicks on a document in their own 'pending review' or team's 'pending review'

Then

  • A user is taken to a view with (1) navbar, (2) review interface (comment, delete, & metrics button), and (3) the doc's text

User can leave editing teams in the user/settings view

Given

  • A user is logged in
  • A user has clicked on the user button in the all-docs or teams-login view

When

  • A user clicks a leave button near a team name

And

  • The user clicks the confirm button that appears

Then

  • They that team no longer appears in their 'joined teams' section in teams-login

If

  • They came to the user view from the all-docs view for the team they just left

Then

  • They are taken to teams-login when they leave the user view

Deleting whole sentence does not delete the sentence

Expected Behavior

  • Selecting a whole sentence, and deleting it, should remove the sentence from the DOM & reprint it with 'deleted' class

Actual Behavior

  • Deleting a whole sentence only removes the text

Steps to Reproduce Behavior

  • Select a sentence - punctuation included - and delete it

Module Suspected / Relevant Files

  • ReviewCtrl

User can leave editing teams

Given

  • A user is logged in
  • A user has joined an editing team
  • They are at the teams-login view

When

  • They click/tap on a team

Then

  • A leave/delete button appears

When

  • The user clicks/taps on that button, a confirm and cancel button appears
  • The user clicks/taps on another part of the screen, those buttons disappear

And

  • The clicks/taps confirm,

Then

  • That team is removed from their 'joined teams'

Or

  • The user clicks/taps cancel, the confirm and cancel buttons disappear

User can paste text into a new doc

Given

  • A user is logged in, into a team
  • They click on the 'Add new doc' button
  • They copy paste from another source

When

  • They paste the text

Then

  • It appears on the screen in a readable format

User can search for editing teams

Given

A user is logged in & is at the teams-login view

When

They click on the search bar, and begin typing

Then

Only editing team names matching the query are shown

User can move 'pending review' doc to 'review completed'

Given

  • A user is logged in, into a particular team
  • A user is viewing a document 'pending review' (user's or team's)

When

  • The user taps/clicks the completed button

Then

  • The user is taken to the all-docs view
  • Document is updated in database as completed
  • Document will now be seen in 'review completed' section (user's or team's)

Saving edit suggestion requires two clicks

Expected Behavior

  • Clicking away from a sentence where user made an edit suggestion causes the original sentence to be updated & new sentence printed

Actual Behavior

  • It requires two clicks for the update to occur

Steps to Reproduce Behavior

  • Click on a sentence, make an edit, click away, click again

Module Suspected / Relevant Files

  • ReviewCtrl
  • review.html

User can save in-line comments

Given

  • A user is logged in, into an editing team
  • A user clicks on a document 'pending review'
  • A user highlights text
  • Clicks on the comment button
  • Types in text

When

  • The user clicks/taps away from the text area

Then

  • Highlighted area is broken out into own <span> with a class of commented
  • Whole doc is sent to sentence splitter, splitting up text into segments
  • Previous segments are stored in app (for undoing)
  • Previous segments are deleted from database
  • New segments are posted to database
  • Comment is posted with reference to its segment(s)
  • Document is reprinted
  • User sees selected text where new comment was made as highlighted

If

  • No text was input

Then

  • No comment is left

Important

  • Enter/Return enters a newline

Admin can change team display name

Given

  • A user is logged in
  • A user is at the all-docs view
  • They have admin privileges (granted by creating an editing team or another admin granting them
  • They click on the admin button

When

  • They click/tap on team display name and enter in new data

Then

  • The team's display name changes in the database & their interface

Adding a new sentence causes sentences preceding/succeeding to be 'deleted'

Expected Behavior

  • Typing in a new sentence, anywhere on the doc, should cause that new sentence to appear as 'added' and nothing else

Actual Behavior

  • That sentence appears as 'added', but preceding or succeeding (depending on where user clicked) sentence appears as 'deleted'

Steps to Reproduce Behavior

  • Click cursor right after a sentence-ending punctuation or click cursor right before capital letter of a sentence
  • Type in new sentence
  • Click away

Module Suspected / Relevant Files

  • ReviewCtrl

Adding comment to sentence with a comment preceding error

Expected Behavior

  • Adding a comment to a sentence with a comment preceding it should print normally

Actual Behavior

  • Segmentation appears to overshoot
  • The first segment includes the first character of the selected text and the commented segment includes the character after the selection

Steps to Reproduce Behavior

  • Leave a comment in a sentence
  • Comment on another portion of that sentence farther into the sentence

Module Suspected / Relevant Files

  • ReviewCtrl, SegmentFactory

User can view doc metrics

Given

  • A user is logged in, into a particular team
  • A user is viewing a 'pending review' doc or 'review completed' doc

When

  • A user clicks on the metrics menu button

Then

  • The doc text & comments disappear
  • Metric info appears in its place

MVP Metrics

  • Ease of reading score
  • Sentences-per-paragraph
  • Words-per-sentence

Adding new sentence to end of doc doesn't reprint initiallly

Expected Behavior

  • Clicking after the last sentence in the doc, typing/pasting in new text, and then clicking away should print new text segment(s) to the doc

Actual Behavior

  • Only on refreshing the page does the text appear

Steps to Reproduce Behavior

  • Type in a new sentence at the end of the doc, click away

Module Suspected / Relevant Files

  • ReviewCtrl, possibly reprint(), updater.adds() promises are broken

User can type text into a new doc

Given

  • A user is logged in, into a team
  • They click on the 'new doc button'
  • Regardless of whether text is pasted in
  • They click/tap in the text area

When

  • They type

Then

  • Text appears accordingly

User can logout

Given

  • A user is logged in

When

  • They click on a logout button

Then

  • They are logged out & returned to login view

Applicable views

  • admin
  • teams-login
  • user

Admin can kick users

Given

  • A user is logged in
  • Logged in to a team with admin privileges
  • Clicks on the admin button from the all-docs view

When

  • They click on a kick button near a user's info
  • Click the confirm button that appears

Then

  • That user's access to the editing team is revoked
  • Their documents are not deleted

If

  • They click the cancel button
  • They click somewhere else on the screen

Then

  • The confirm & cancel buttons disappear

User can create new editing team

Given

  • A user is logged in
  • A user clicked on the create new team button in the teams-login view

When

  • The user inputs a team name
  • The user inputs a password
  • The user clicks register button
  • The data input is valid

Then

  • The data is posted to the database /teams, the returned Firebase ID is patched to that object
  • The user is taken to the teams-login page
  • Their newly created team appears in the 'joined teams' section (meaning they do not need to log in to that team again)

User can undo suggested edits

Given

  • A user is logged in, into a particular team
  • They click on a document 'pending review'
  • They add a comment, suggest an addition or deletion

When

  • They click undo menu button

Then

  • The most recent change is undone

Important

  • When user clicks all docs button, stored previous states are removed from app

User can save new doc

Given

  • A user is logged, into a team
  • They click the 'Add new doc' button
  • There is a title for the document
  • There is text pasted/typed into the text area

When

  • They click/tap 'Submit'

Then

  • The document is sent to text segmenter
  • Previous segments are deleted from the database
  • Each segment is posted to database
  • Redirects user to all-docs view

A user can see their teams documents 'pending review' for their specific team

Given

  • A user is logged in
  • A user is logged into an editing team
  • A user is at the all-docs view
  • Other team members have added documents & they have not been reviewed

When

  • A user scrolls to the top of the screen, below their own documents 'pending review' & navbar

Then

  • They will see their team's documents 'pending review' in a grid going to the right, off the screen if there are enough documents

User can change password

Given

  • A user is logged in
  • A user is at the user view

When

  • User clicks the change password button, three inputs appear
  • Enters in their old password into an input
  • Enters in their new password into another input
  • Reenters their new password into a last input
  • Clicks confirm

Then

  • Their password is changed

User can see their docs 'review completed'

Given

  • A user is logged in
  • A user is logged into an editing team
  • A user is at the all-docs view
  • A user has added documents & at least one has been reviewed

When

  • They scroll to the top of the screen, below their own docs 'pending review', their team's docs 'pending review'

Then

  • They will see their documents 'review completed' in a grid going to the right, off the screen if there are enough documents

Admin can grant admin privileges

Given

  • A user is logged in
  • A user is at the all-docs view
  • They have admin privileges (granted by creating an editing team or another admin granting them)
  • A user/admin clicks on the admin button

When

  • They click on an admin checkbox near a user's details

Then

  • That user is granted/revoked admin privileges accordingly

User can initiate in-line comments on a document

Given

  • A user is logged in, into an editing team
  • A user clicks on a document 'pending review'

When

  • A user highlights text
  • Then clicks on the comment

Then

  • Text input area appears
  • Keyboard appears (for mobile)
  • Typed in text appears on text input area

If

  • No text was highlighted

Then

  • No comment is left

Admin can change editing team's password

Given

  • A user is logged in, into a particular team
  • User has admin privileges
  • User is looking at the admin view

When

  • Admin clicks change team password, three inputs & two buttons appear
  • Admin enters in old password
  • Admin enters in new password
  • Admin reenters new password
  • Admin clicks submit button

Then

  • The password for the team is changed

When

  • Admin clicks cancel button

Then

  • Changes are ignored; all inputs & two buttons disappear

Important

  • All users do not need to reenter the password

User can update their email

Given

  • A user is logged in
  • A user has clicked on the user button in the all-docs or teams-login view

When

  • A user changes the email field

Then

  • That information is updated in the database

User can switch to a different team

Given

  • A user is logged in
  • A user logs in to an editing team
  • A user is at the all-docs view

When

  • A user clicks on the switch teams button

Then

  • They are taken to the teams-login view

User can click on "user" button to edit user information

Given

  • A user is logged in
  • A user is at the teams-login view or all-docs view

When

  • The user scrolls to the navbar & clicks on user button

Then

  • The user is taken to the user view where user information/settings can be updated

User can update their display name

Given

  • A user is logged in
  • A user has clicked on the user button in the all-docs or teams-login view

When

  • A user changes the display name field

Then

  • That information is updated in the database

User can view comments

Given

  • A user is logged in, into a particular team
  • User is in all-docs view
  • A document has been edited (can be 'pending review' or 'review completed')
  • A user taps/clicks on a document

When

  • User taps/clicks on highlighted text

Then

  • Doc text squishes to the left
  • In new white space, comment appears on a background the same color as the highlighted text, with a small line connecting the two

If

  • User taps/clicks away, the comment disappears, document takes empty back
  • User taps/clicks on next comment or prev comment buttons while in 'review completed' view, then the appropriate comment appears in place of the other comment

User can login

Given

A user has registered

When

They correctly enter in their email & password

Then

They are logged in & sent to teams-login

Cancel erases document from database/does not save document

Given

  • A user is logged in, into an account
  • They click on the 'Add new doc' button
  • They type/paste text into the text area

When

  • They click the 'Cancel' button

Then

  • Previously saved segments are deleted from the database
  • Document data is deleted from the database
  • Redirects user to all-docs view

Admin can search for users

Given

  • A user is logged in
  • Logged in to a team with admin privileges
  • Clicks on the admin button from the all-docs view

When

  • Admin types into the search bar at the top of the screen

Then

  • Users displayed are filtered that match the query

User can see their documents 'pending review' for their specific team

Given

  • A user is logged in
  • A user is logged into an editing team
  • A user is at the all-docs view
  • A user has added documents & they have not been reviewed

When

  • They scroll to the top of the screen

Then

  • They will see their documents 'pending review' in a grid going to the right, off the screen if there are enough documents

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.