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

OCLOMRS-33: Implement fetching concepts and search for concepts. #29

Closed
wants to merge 3 commits into from

Conversation

hadijahkyampeire
Copy link
Collaborator

JIRA TICKET NAME:

OCLOMRS-33: Implement UI and logic for retrieving all concepts and search for specific concepts.

Summary:

This PR does the following:

  • Adds UI for viewing all concepts in OCL
  • Implements the logic for retrieving all concepts and searching through them
  • Adds tests for all the functionality

@coveralls
Copy link

coveralls commented Jun 11, 2018

Pull Request Test Coverage Report for Build 139

  • 46 of 56 (82.14%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+2.8%) to 65.916%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/dashboard/container/Concepts.jsx 14 15 93.33%
src/redux/actions/concepts/index.js 9 18 50.0%
Totals Coverage Status
Change from base Build 33: 2.8%
Covered Lines: 164
Relevant Lines: 225

💛 - Coveralls

@hadijahkyampeire hadijahkyampeire force-pushed the OCLOMRS-33 branch 2 times, most recently from 0004285 to c00e53d Compare June 11, 2018 21:44
Copy link
Contributor

@EleisonC EleisonC left a comment

Choose a reason for hiding this comment

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

In concepts.test.jsx file do you mind removing the last empty space
Line 59

Sources
</a>
<a href="/dashboard/concepts" className="nav-link active">
<i className="fa fa-tags" /> Concepts
</a>
</li>
</ul>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why you used the html anchor tag a instead of react-router Link?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

'Link' was bringing some errors that I should not use 'Link' inside Route, however in React Link is always changed to anchor, so no harm

Copy link
Contributor

Choose a reason for hiding this comment

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

the regular html a tag would trigger a full page re-render, Link wouldn't. You might want to put that into consideration.

@@ -0,0 +1,29 @@
import React from 'react';
// import Avatar from 'react-avatar';
// import moment from 'moment';
Copy link
Contributor

Choose a reason for hiding this comment

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

You should delete this commented code since they are no longer useful

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

on it thank you

@@ -0,0 +1,18 @@
import { IS_FETCHING, FETCH_CONCEPTS } from '../types';

// const FETCH_CONCEPTS = 'fetch_concepts';
Copy link
Contributor

Choose a reason for hiding this comment

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

delete this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Noted

// import moment from 'moment';


const ConceptCard = (concept) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

The name of the component is ConceptCard yet the content is a table. Could you consider changing the name of the component to indicate table instead of card because it is misleading.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, on it, thanks

import React from 'react';
import Tooltip from 'react-tooltip';

/* eslint-disable */
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a relevance for this comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let look into it

<tbody>

{concepts.map(concept => (
<Card concept={concept} key={concept.uuid} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you change the component name from card to table to avoid confusion

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right

.eslintrc.json Outdated
@@ -7,6 +7,7 @@
"jsx-a11y/label-has-for":0,
"react/jsx-closing-tag-location":0,
"import/no-named-as-default":0,
"import/prefer-default-export":0,
Copy link
Contributor

@mwaz mwaz Jun 12, 2018

Choose a reason for hiding this comment

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

i think this rule should be there rather than being ignored by the linter , and if at viable for change all then should be made in a different PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let me look into it thanks

@hadijahkyampeire
Copy link
Collaborator Author

Hello Team, thanks for all the reviews, I have fixed all of them

@@ -0,0 +1,20 @@
// import { FETCH_CONCEPTS } from '../actions/concepts/ConceptActionCreators';
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you delete this commented out code.

@hadijahkyampeire hadijahkyampeire force-pushed the OCLOMRS-33 branch 2 times, most recently from f2c1bc9 to 5679791 Compare June 12, 2018 11:43
Copy link
Contributor

@EleisonC EleisonC left a comment

Choose a reason for hiding this comment

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

Is there a reason you opted to use inline styling in ConceptTable.jsx and ConceptList.jsx


/* eslint-disable */
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we have this comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Some statement that helps disable some funny rule

Copy link
Contributor

@shakirandagire shakirandagire left a comment

Choose a reason for hiding this comment

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

LGTM

@hadijahkyampeire hadijahkyampeire force-pushed the OCLOMRS-33 branch 2 times, most recently from f0b804e to 52ed74e Compare June 12, 2018 18:44
dkayiwa and others added 2 commits June 12, 2018 22:12
…ode" (openmrs#22)

* Revert "Revert "OCLOMRS-29: Restructure app to improve code maintainability" (openmrs#21)"

This reverts commit f6d6d28.

* Revert "Revert "OCLOMRS-17: Protect routes that require authentication (openmrs#12)" (openmrs#20)"

This reverts commit f6be69c.

* Revert "OCLOMRS-17: Protect routes that require authentication (openmrs#12)"

This reverts commit a0444d4.

* Revert "OCLOMRS-29:Restructure app to improve code maintainability (openmrs#19)"

This reverts commit e77aa4d.

* Revert "OCLOMRS-21: Integrate Linting on CI and Prettier for better code (openmrs#17)"

This reverts commit 7e68e2f.

Revert "Revert "OCLOMRS-21: Integrate Linting on CI and Prettier for better code" (openmrs#22)" (openmrs#23)

This reverts commit 5fcea0d.

Revert "Revert "OCLOMRS-29: Restructure app to improve code maintainability"" (openmrs#24)

* Revert "Revert "Revert "OCLOMRS-21: Integrate Linting on CI and Prettier for better code" (openmrs#22)" (openmrs#23)"

This reverts commit f2f81b0.

* Revert "Revert "OCLOMRS-21: Integrate Linting on CI and Prettier for better code" (openmrs#22)"

This reverts commit 5fcea0d.

* Revert "Revert "OCLOMRS-29: Restructure app to improve code maintainability" (openmrs#21)"

This reverts commit f6d6d28.

Revert "Revert "OCLOMRS-17: Protect routes that require authentication"" (openmrs#25)

* Revert "Revert "Revert "OCLOMRS-29: Restructure app to improve code maintainability"" (openmrs#24)"

This reverts commit 20ecf9b.

* Revert "Revert "Revert "OCLOMRS-21: Integrate Linting on CI and Prettier for better code" (openmrs#22)" (openmrs#23)"

This reverts commit f2f81b0.

* Revert "Revert "OCLOMRS-21: Integrate Linting on CI and Prettier for better code" (openmrs#22)"

This reverts commit 5fcea0d.

* Revert "Revert "OCLOMRS-29: Restructure app to improve code maintainability" (openmrs#21)"

This reverts commit f6d6d28.

* Revert "Revert "OCLOMRS-17: Protect routes that require authentication (openmrs#12)" (openmrs#20)"

This reverts commit f6be69c.

OCLOMRS-35: display sources and enable searching (openmrs#26)

OCLOMRS-40: redesign sources page user interface (openmrs#27)
fix eslint errors

Add conceptActiontests

Work on comments

fix tests

Remove white space

Remove comment

Remove comment

Fix tests

remove comment
@hadijahkyampeire hadijahkyampeire force-pushed the OCLOMRS-33 branch 2 times, most recently from 795ab6f to 4dca24b Compare June 12, 2018 19:15
@hadijahkyampeire
Copy link
Collaborator Author

Hello Team, this PR has been closed because of many merge conflicts that can't be solved but I am going to raise a new one by end of today. cc @dkayiwa @EleisonC

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.

7 participants