Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#163519162 comment on highlighted text #48

Merged
merged 24 commits into from
Mar 26, 2019

Conversation

Nziranziza
Copy link
Contributor

@Nziranziza Nziranziza commented Mar 21, 2019

What does this PR do?

Add comment on highlighted text feature

Description of Task to be completed?

  • Write unit test
  • Add route for commenting on highlighted text
    POST /articles/:articleSlug/comment-on-text
  • Add route for updating comment on highlighted text
    PUT /articles/:articleSlug/comment-on-text/:commentId

How should this be manually tested?

  • git clone
  • npm install
  • npm run migrate
  • npm start
  • try with Postman the above route

Any background context you want to provide?

N/A

What are the relevant pivotal tracker stories?

#163519162

Screenshots (if appropriate)

N/A

Questions:

Nziranziza and others added 5 commits March 20, 2019 18:50
- add unit tests
- [Starts #163519162]
- add unit tests
- [Starts #163519162]
- add route and controller for adding a comment
- [continues #163519162]
- add request body validator
- update test
* feat(comment): add track comment history

- add tests
- create comment history model and migration
- add comment history functionality
- add comment history route

[Delivers #163519163]
@NkFab NkFab requested review from oesukam and mcaleb808 March 21, 2019 11:12
@@ -148,4 +149,11 @@ router.post(
asyncHandler(ArticleController.reportArticle)
);

router.post(
'/:articleSlug/comment-on-text',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NkFab comment-on-text is too long as a request param. Try to look for a single word such as highlight

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oesukam highlight have a different meaning to what we have to achieve

.min(3)
.max(255),
highlightedText: Joi.string().trim().required(),
startPoint: Joi.number(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NkFab Is it allowed to have a negative number as startPoint?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oesukam not it is going to be positive numbers only

- add route and controller to update comment
- [Finishes #163519162]
- add route and controller to update comment
- [Finishes #163519162]
- add route and controller to update comment
- [Finishes #163519162]
- add route and controller to update comment
- [Finishes #163519162]

const article = await Article.findOne({
where: {
slug: articleSlug
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nziranziza To avoid commenting on an unpublished article, please check the status of an article in your query! status: 'published'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcaleb808 thank you! that is true

Nziranziza and others added 13 commits March 26, 2019 13:03
* chore(documentation) update swagger documentation

* #163519160 Add reading statistics for users and articles (#44)

* feat(reading stats): add reading statistics

-add reading stats of individuals
-add views of an article

[Delivers #163519160]

* chore(documentation) update swagger documentation

* #163519156 Users should be able to bookmark articles for reading later (#43)

* feat(bookmark): add unit tests [Starts #163519156]

* feat(bookmark): implement bookmark/remove bookmark functionality [Finishes #163519156
]

* feat(bookmark): implement bookmark/remove bookmark [Finishes #163519156]

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* feat(bookmark): add unit tests [Starts #163519156]

* feat(bookmark): implement bookmark/remove bookmark functionality [Finishes #163519156
]

* feat(bookmark): implement bookmark/remove bookmark [Finishes #163519156]

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(conflicts): fix conflicts form rebase develop

* feat(bookmark): add unit tests [Starts #163519156]

* feat(bookmark): implement bookmark/remove bookmark functionality [Finishes #163519156
]

* feat(bookmark): implement bookmark/remove bookmark [Finishes #163519156]

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* feat(bookmark): add unit tests [Starts #163519156]

* feat(bookmark): implement bookmark/remove bookmark functionality [Finishes #163519156
]

* feat(bookmark): implement bookmark/remove bookmark [Finishes #163519156]

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(conflicts): fix conflicts form rebase develop

* fix(conflicts): fix conflicts from rebase

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix build failed

* fix(tests): fix build failed

* chore(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation
- [finishes #164722267]

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* #163519163 Add track comment history functionality (#46)

* feat(comment): add track comment history

- add tests
- create comment history model and migration
- add comment history functionality
- add comment history route

[Delivers #163519163]

* chore(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation
- [finishes #164722267]

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(comment) comment on highlighted text
- git rebase

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation
* feat(article recommendations): implement article recommendations

- add capability of recommending articles to users
- add capability of giving random feed to users

[Finishes #164689337]

* feat(article recommendation): fix conflicts

* feat(article recommendations): change response body

* feat(article recommendations): reduce limit to 10 in query

* feat(article recommendations): implement feedback

* feat(article recommendations): add restrictions to article recommendations
- add unit tests
- [Starts #163519162]
- add unit tests
- [Starts #163519162]
- add route and controller for adding a comment
- [continues #163519162]
- add request body validator
- update test
- add route and controller to update comment
- [Finishes #163519162]
- add route and controller to update comment
- [Finishes #163519162]
- add route and controller to update comment
- [Finishes #163519162]
- add route and controller to update comment
- [Finishes #163519162]
@kimotho-njoki kimotho-njoki merged commit c1f0c23 into develop Mar 26, 2019
@kimotho-njoki kimotho-njoki deleted the ft-highlight-comment-text-163519162 branch March 26, 2019 11:05
kimotho-njoki pushed a commit that referenced this pull request Mar 27, 2019
* feat(notification) manage notification page
- add a dropdown
[starts #164807527]

* feat(notification) notication page
- add notification icon
- add counter badge
- add a dropdown list
[continues #164807527]

* feat(notification) notification html page
- add responsiveness
- [finishes 164807527]

* feat(notification) manage notification page
- remove ui/css/style.css

* feat(notification) manage notification page
- re-arrange code

*  #164722267 update swagger documentation (#45)

* chore(documentation) update swagger documentation

* #163519160 Add reading statistics for users and articles (#44)

* feat(reading stats): add reading statistics

-add reading stats of individuals
-add views of an article

[Delivers #163519160]

* chore(documentation) update swagger documentation

* #163519156 Users should be able to bookmark articles for reading later (#43)

* feat(bookmark): add unit tests [Starts #163519156]

* feat(bookmark): implement bookmark/remove bookmark functionality [Finishes #163519156
]

* feat(bookmark): implement bookmark/remove bookmark [Finishes #163519156]

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* feat(bookmark): add unit tests [Starts #163519156]

* feat(bookmark): implement bookmark/remove bookmark functionality [Finishes #163519156
]

* feat(bookmark): implement bookmark/remove bookmark [Finishes #163519156]

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(conflicts): fix conflicts form rebase develop

* feat(bookmark): add unit tests [Starts #163519156]

* feat(bookmark): implement bookmark/remove bookmark functionality [Finishes #163519156
]

* feat(bookmark): implement bookmark/remove bookmark [Finishes #163519156]

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* feat(bookmark): add unit tests [Starts #163519156]

* feat(bookmark): implement bookmark/remove bookmark functionality [Finishes #163519156
]

* feat(bookmark): implement bookmark/remove bookmark [Finishes #163519156]

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(conflicts): fix conflicts form rebase develop

* fix(conflicts): fix conflicts from rebase

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix build failed

* fix(tests): fix build failed

* chore(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation
- [finishes #164722267]

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* #163519163 Add track comment history functionality (#46)

* feat(comment): add track comment history

- add tests
- create comment history model and migration
- add comment history functionality
- add comment history route

[Delivers #163519163]

* chore(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation
- [finishes #164722267]

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(comment) comment on highlighted text
- git rebase

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* #164689337 Add article recommendations for users (#47)

* feat(article recommendations): implement article recommendations

- add capability of recommending articles to users
- add capability of giving random feed to users

[Finishes #164689337]

* feat(article recommendation): fix conflicts

* feat(article recommendations): change response body

* feat(article recommendations): reduce limit to 10 in query

* feat(article recommendations): implement feedback

* feat(article recommendations): add restrictions to article recommendations

* feat(notification) manage notification page
- add some feedback

* feat(notification) manage notification page
- add some feedback

* #163519162 comment on highlighted text (#48)

* feat(comment) comment on highlighted text of article
- add unit tests
- [Starts #163519162]

* feat(comment) comment on highlighted text of article
- add unit tests
- [Starts #163519162]

* feat(commet) add comment on highlighted text from an article
- add route and controller for adding a comment
- [continues #163519162]

* feat(comment) comment on highlighted text
- add request body validator
- update test

* #163519163 Add track comment history functionality (#46)

* feat(comment): add track comment history

- add tests
- create comment history model and migration
- add comment history functionality
- add comment history route

[Delivers #163519163]

* feat(comment) add comment hightlighted text from article
- modify controller

* feat(comment) comment on highlighted text from article
- add route and controller to update comment
- [Finishes #163519162]

* feat(comment) comment on highlighted text from article
- add route and controller to update comment
- [Finishes #163519162]

* feat(comment) comment on highlighted text from article
- add route and controller to update comment
- [Finishes #163519162]

* feat(comment) comment on highlighted text from article
- add route and controller to update comment
- [Finishes #163519162]

* feat(comment) comment on highlighted text
- update controller

*  #164722267 update swagger documentation (#45)

* chore(documentation) update swagger documentation

* #163519160 Add reading statistics for users and articles (#44)

* feat(reading stats): add reading statistics

-add reading stats of individuals
-add views of an article

[Delivers #163519160]

* chore(documentation) update swagger documentation

* #163519156 Users should be able to bookmark articles for reading later (#43)

* feat(bookmark): add unit tests [Starts #163519156]

* feat(bookmark): implement bookmark/remove bookmark functionality [Finishes #163519156
]

* feat(bookmark): implement bookmark/remove bookmark [Finishes #163519156]

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* feat(bookmark): add unit tests [Starts #163519156]

* feat(bookmark): implement bookmark/remove bookmark functionality [Finishes #163519156
]

* feat(bookmark): implement bookmark/remove bookmark [Finishes #163519156]

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(conflicts): fix conflicts form rebase develop

* feat(bookmark): add unit tests [Starts #163519156]

* feat(bookmark): implement bookmark/remove bookmark functionality [Finishes #163519156
]

* feat(bookmark): implement bookmark/remove bookmark [Finishes #163519156]

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* feat(bookmark): add unit tests [Starts #163519156]

* feat(bookmark): implement bookmark/remove bookmark functionality [Finishes #163519156
]

* feat(bookmark): implement bookmark/remove bookmark [Finishes #163519156]

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(tests): fix test issues

* fix(conflicts): fix conflicts form rebase develop

* fix(conflicts): fix conflicts from rebase

* fix(conflicts): fix conflicts from rebase

* fix(tests): fix build failed

* fix(tests): fix build failed

* chore(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation
- [finishes #164722267]

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* #163519163 Add track comment history functionality (#46)

* feat(comment): add track comment history

- add tests
- create comment history model and migration
- add comment history functionality
- add comment history route

[Delivers #163519163]

* chore(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation
- [finishes #164722267]

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(documentation) update swagger documentation
- update readme

* feat(comment) comment on highlighted text
- git rebase

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* feat(documentation) update swagger documentation

* #164689337 Add article recommendations for users (#47)

* feat(article recommendations): implement article recommendations

- add capability of recommending articles to users
- add capability of giving random feed to users

[Finishes #164689337]

* feat(article recommendation): fix conflicts

* feat(article recommendations): change response body

* feat(article recommendations): reduce limit to 10 in query

* feat(article recommendations): implement feedback

* feat(article recommendations): add restrictions to article recommendations

* feat(comment) comment on highlighted text of article
- add unit tests
- [Starts #163519162]

* feat(comment) comment on highlighted text of article
- add unit tests
- [Starts #163519162]

* feat(commet) add comment on highlighted text from an article
- add route and controller for adding a comment
- [continues #163519162]

* feat(comment) comment on highlighted text
- add request body validator
- update test

* feat(comment) add comment hightlighted text from article
- modify controller

* feat(comment) comment on highlighted text from article
- add route and controller to update comment
- [Finishes #163519162]

* feat(comment) comment on highlighted text from article
- add route and controller to update comment
- [Finishes #163519162]

* feat(comment) comment on highlighted text from article
- add route and controller to update comment
- [Finishes #163519162]

* feat(comment) comment on highlighted text from article
- add route and controller to update comment
- [Finishes #163519162]

* feat(comment) comment on highlighted text
- update controller

* #164800406 show reading stats (#49)

* feat(stats): show reading stats

- Add a profile-view-stats.html page
- Add Read stats

[Finishes #164800406]

* feat(stats): show reading stats

- Add a profile-view-stats.html page
- Add Read stats

[Finishes #164800406]

* #164797351 Adding more features on view article page (#50)

* feat(article) add more features on view article page

- add bookmark
- add social share
- add rating
- rating view

[finish #164797351]

* feat(articles): implement PO feedback

* feat(articles): add nested sass

* feat(articles): add nested sass

* feat(articles): rebase develop

* #164799793 Design dashboard mockup to view list of users (#51)

* feat(mockup): add admin dashboard mockup to view list of users

- design admin's dashboard
- design admin user type modal
- design admin user status modal

[Finishes #164799793]

* feat(mockup): add page responsiveness for tablet

* feat(mockup): enhance dashboard table layout

* feat(mockup): apply daniel's feedback to use real data instead of first name and last name

* feat: apply po's feedback

* feat(mockup): correct user registered on data

* #164822311 Design admin report's page (#52)

* feat(mockup): add admin dashboard mockup to view list of users

- design admin's dashboard
- design admin user type modal
- design admin user status modal

[Finishes #164799793]

* feat(mockup): add page responsiveness for tablet

* feat(mockup): add admin's report mockup

* feat(mockup): add dashboard link to the main menu

* feat(mockup): remove dashboard user's avatar left margin

* feat(mockup): apply daniel's feedback to use real data instead of first name and last name

* feat: apply po's feedback

* feat: remove ui/css/style.css from file track

* feat: import rating-star style

* feat: delete ui/css/style.css as it has been compiled locally

* #164800557 Create tags for an article (#53)

* feat(tags): create tags for an article [Finishes #164800557]

* feat(tags): create tags for an article [Finishes #164800557]

* #164826081 Add article report's button (#54)

* feat(mockup): add admin dashboard mockup to view list of users

- design admin's dashboard
- design admin user type modal
- design admin user status modal

[Finishes #164799793]

* feat(mockup): add page responsiveness for tablet

* feat(mockup): add admin's report mockup

* feat(mockup): add dashboard link to the main menu

* feat(mockup): remove dashboard user's avatar left margin

* feat: apply po's feedback

* feat(mockup): add report's button to view single article

* #164796708 Built page for viewing user profiles (#55)

* feat(profiles-list): add a page for user to view user profiles

- add a page to view user's profile

[Finishes #164796708]

* feat(profile list): implement feedback

* feat(profile list): refactor css to match scss principles

* feat(profiles list): fix conflicts

* feat(notification) manage notification page
- add a dropdown
[starts #164807527]

* feat(notification) notication page
- add notification icon
- add counter badge
- add a dropdown list
[continues #164807527]

* feat(notification) notification html page
- add responsiveness
- [finishes 164807527]

* feat(notification) manage notification page
- re-arrange code

* feat(notification) manage notification page
- add some feedback

* feat(notification) manage notification page
- add some feedback

* feat(notification) notification html mockup
- git rebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants