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

#162949233 Article highlighting with comments #32

Merged
merged 1 commit into from
Feb 6, 2019

Conversation

sylviawanjiku
Copy link
Contributor

@sylviawanjiku sylviawanjiku commented Jan 31, 2019

What does this PR do?

Implements highlighting of articles and allows commenting on the highlighted section

Description of Task to be completed?

-Highlight article
-Comment on the highlighted article
-crud for the comment on the highlighted part of the article

How should this be manually tested?

  1. Clone the repo: git clone https://github.com/andela/ah-the-unsullied.git

  2. Cd into the cloned repo

  3. Git checkout to branch ft-highlight-comment-article-162949233

  4. Set up a virtual environment and install requirements:

          python3 -m venv venv
          source venv/bin/activate
          pip3 install -r requirements.txt
    
    
  5. Set up a .env file on the same level as the venv file and add the following:

          source venv/bin/activate
          export SECRET_KEY='yoursecretkey'
          export DATABASE_URL='postgres://yourdatabasename'
          export HOST_PASSWORD=" "
          export HOST_USER=" "
          export SMTP_HOST=' '
          export EMAIL_PORT=''
    
    
  6. Then run:

           source .env 
           ./manage.py migrate
           ./manage.py runserver
    
  7. Fire up postman and test the following endpoints:

EndPoint Functionality
POST api/articles/ <slug>/highlight Highlight and comment on articlel
GET api/articles/ <slug>/highlight View all highlight comments specific to an articlel
GET api/articles/<slug>/highlight/<int:id> Get a highlight comment
PUT api/articles/<slug>/highlight/<int:id> Update a highlight comment
DELETE api/articles/<slug>/highlight/<int:id> Delete a highlight comment

use the following payload format for sharing an article via email:

{
    "comment": " {
                "body": " ",
                "begin_index": " ",
                "end_index": " "
            }"
  }

Any background context you want to provide?

None

What are the relevant pivotal tracker stories?

[162949233]https://www.pivotaltracker.com/story/show/162949233

Screenshots (if appropriate)

image

Questions:

@sylviawanjiku sylviawanjiku force-pushed the ft-highlight-comment-article-162949233 branch from c8bb794 to ca48bd4 Compare January 31, 2019 20:34
@sylviawanjiku sylviawanjiku force-pushed the ft-highlight-comment-article-162949233 branch 4 times, most recently from ad7043b to 0ff1d84 Compare February 4, 2019 07:33
@Allan690 Allan690 force-pushed the ft-highlight-comment-article-162949233 branch from 0ff1d84 to 51aacdd Compare February 4, 2019 07:34
@sylviawanjiku sylviawanjiku force-pushed the ft-highlight-comment-article-162949233 branch 3 times, most recently from be65ec9 to 21d9481 Compare February 4, 2019 11:15
@sylviawanjiku sylviawanjiku force-pushed the ft-highlight-comment-article-162949233 branch from 21d9481 to a1d75a3 Compare February 4, 2019 15:29
@kwanj-k kwanj-k temporarily deployed to ah-the-unsullied-staging-pr-32 February 4, 2019 15:29 Inactive
authors/apps/articles/serializers.py Outdated Show resolved Hide resolved
authors/apps/articles/views/articles.py Outdated Show resolved Hide resolved
@sylviawanjiku sylviawanjiku removed the request for review from kelvinwm February 4, 2019 16:06
@sylviawanjiku sylviawanjiku force-pushed the ft-highlight-comment-article-162949233 branch from a1d75a3 to e9163eb Compare February 4, 2019 16:21
@sylviawanjiku sylviawanjiku temporarily deployed to ah-the-unsullied-staging-pr-32 February 4, 2019 16:21 Inactive
MbugwaSami
MbugwaSami previously approved these changes Feb 4, 2019
Copy link
Contributor

@Allan690 Allan690 left a comment

Choose a reason for hiding this comment

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

Kindly make the changes requested

@sylviawanjiku sylviawanjiku force-pushed the ft-highlight-comment-article-162949233 branch from 689ba1d to 2796944 Compare February 5, 2019 11:15
nesh-dev
nesh-dev previously approved these changes Feb 5, 2019
Copy link
Contributor

@nesh-dev nesh-dev left a comment

Choose a reason for hiding this comment

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

Good work handles the slug issue as well.

@kwanj-k kwanj-k temporarily deployed to ah-the-unsullied-staging-pr-32 February 5, 2019 14:07 Inactive
kwanj-k
kwanj-k previously approved these changes Feb 5, 2019
@sylviawanjiku sylviawanjiku dismissed stale reviews from kwanj-k and nesh-dev via 20d978e February 5, 2019 17:37
@sylviawanjiku sylviawanjiku force-pushed the ft-highlight-comment-article-162949233 branch from 2796944 to 20d978e Compare February 5, 2019 17:37
@sylviawanjiku sylviawanjiku temporarily deployed to ah-the-unsullied-staging-pr-32 February 5, 2019 17:37 Inactive
@indungu indungu changed the title #162949233 Highlight and comment on the highlighted section #162949233 Article highlighting with comments Feb 6, 2019
@sylviawanjiku sylviawanjiku force-pushed the ft-highlight-comment-article-162949233 branch from 20d978e to 864cdd5 Compare February 6, 2019 14:07
@sylviawanjiku sylviawanjiku temporarily deployed to ah-the-unsullied-staging-pr-32 February 6, 2019 14:07 Inactive
	-highlight article
	-comment on highlighted article
	-crud for the comment on highlited part of article
[Starts #162949233]
@indungu indungu merged commit 24c5555 into develop Feb 6, 2019
@indungu indungu deleted the ft-highlight-comment-article-162949233 branch February 6, 2019 18:25
nesh-dev pushed a commit that referenced this pull request Feb 8, 2019
…9233

#162949233 Article highlighting with comments

[Delivers #162949233]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants