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

#166840979 Implement articles search by tag (tag) #46

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

codeBlock-1984
Copy link
Contributor

What does this PR do?

  • Implements the functionality that enables a user to view related articles by clicking on the tag on an article

Description of Task to be completed?

  • Create actions for searching by tag
  • Create components for filtered articles page
  • Write unit tests

How should this be manually tested?

Any background context you want to provide?

What are the relevant pivotal tracker stories?

Screenshots (if appropriate)

Questions:

@Cavdy Cavdy temporarily deployed to ah-nyati-frontend-pr-46 September 2, 2019 09:56 Inactive
<h3 className="mb-3 articles-title">{singleArticle.title}</h3>
<p className="card-text mb-3">{`${singleArticle.body.substring(0, 150)}...`}</p>
<div className="d-flex flex-row articles-feature">
<p className="articles-like mr-3">
Copy link

Choose a reason for hiding this comment

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

Identical blocks of code found in 2 locations. Consider refactoring.

@codeBlock-1984 codeBlock-1984 force-pushed the ft-search-articles-by-tag-166840979 branch from be8714e to cb4d01b Compare September 2, 2019 10:04
@Cavdy Cavdy temporarily deployed to ah-nyati-frontend-pr-46 September 2, 2019 10:04 Inactive
@codeBlock-1984 codeBlock-1984 force-pushed the ft-search-articles-by-tag-166840979 branch from cb4d01b to 87a1aeb Compare September 3, 2019 07:04
@Cavdy Cavdy temporarily deployed to ah-nyati-frontend-pr-46 September 3, 2019 07:04 Inactive
it('fetches articles', () => {
moxios.wait(() => {
const request = moxios.requests.mostRecent();
// console.log(request);
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove this comment

.then(() => {
const actionsCalled = store.getActions();
expect(actionsCalled).toEqual(expectedActions);
// expect(actionsCalled[1].type).toEqual(GET_ARTICLES_BY_TAG);
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove this comment

@@ -59,8 +60,9 @@ const App = () => (
<Route path="/newpassword" component={PasswordReset} />
<Route path="/socialAuth" component={SocialAuth} />
<Route path="/article" component={CreateArticlePage} />
<Route path="/articles" component={Articles} />
<Route path="/articles/:slug" component={SingleArticle} />
<Route exact path="/articles" component={Articles} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove exacts from the routes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @fob413. The exact was put there so that routes for viewing a specific article using its slug will be able to direct to the specific article page. If it is removed single articles would not be able to be viewed. Is there a workaround for this issue if exact is to be removed?

@codeBlock-1984 codeBlock-1984 force-pushed the ft-search-articles-by-tag-166840979 branch from 87a1aeb to ab63406 Compare September 3, 2019 09:29
@Cavdy Cavdy temporarily deployed to ah-nyati-frontend-pr-46 September 3, 2019 09:30 Inactive
@codeBlock-1984 codeBlock-1984 force-pushed the ft-search-articles-by-tag-166840979 branch from ab63406 to f9bcd25 Compare September 3, 2019 09:31
@Cavdy Cavdy temporarily deployed to ah-nyati-frontend-pr-46 September 3, 2019 09:31 Inactive
- Create actions for searching by tag
- Create components for filtered articles page
- Write unit tests

[Delivers #166840979]
@codeclimate
Copy link

codeclimate bot commented Sep 3, 2019

Code Climate has analyzed commit eab0405 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (70% is the threshold).

This pull request will bring the total coverage in the repository to 95.1% (0.2% change).

View more on Code Climate.

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.

6 participants