View Code? Open in Web Editor
NEW
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
aardappel's Issues
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
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
Given
When
A user types in an address to a particular page in the app
Then
They are rerouted to the login page
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
Given
When
A user joins an editing team
Then
They are assigned a highlight color for their comments, which will be used for all subsequent comments in that user's team
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
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
Given
A user is logged in, into a team
When
A user clicks on the 'Add new doc' button
Then
They are directed to the new-doc
view
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
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
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
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
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
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
Given
A user is logged in & viewing the teams-login
page
When
A user clicks on create new team
button in the navbar
Then
The user is taken to a view with a registration form
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
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
Then
Important
Enter/Return
enters a newline
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
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
Then
The document is sent to the text segmenter
Previous segments are deleted
New segments are posted
Timer resets
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
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
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
Given
A user is logged in, into a team
They click on the 'Add new doc' button
They copy paste from another source
When
Then
It appears on the screen in a readable format
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
Then
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
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
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
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
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)
Given
(1) User is logged in, (2) is viewing the teams-login
view, and (3) has joined teams previously
When
The user clicks on a team in their my teams
section
Then
The user goes to that team's all-docs
view
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
Given
When
A user types in an address to a page in a particular team
Then
They are rerouted to the teams-login
page
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
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
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
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
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
Given
A user has registered
When
They correctly enter in their email & password
Then
They are logged in & sent to teams-login
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
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
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
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
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
Then
Given
When
They click on a logout
button
Then
They are logged out & returned to login
view
Applicable views
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)
Given
A user is logged in
A user has joined an editing team
They are at the teams-login
view
When
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
Then
That team is removed from their 'joined teams'
Or
The user clicks/taps cancel
, the confirm
and cancel
buttons disappear
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
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
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
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
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
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