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

feat: Implement the utility section in Library. #320

Merged
merged 5 commits into from
Oct 22, 2018

Conversation

leyanessantiago
Copy link
Collaborator

fixes #266

<RenderIf isTrue={activeTabName === 'utils'}>
<Prismic repo="react-rainbow-utility">
<div className="react-rainbow-utils_container">
<QueryMulti component={Util} type="page-object">
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 3 locations. Consider refactoring.

<QueryAt path="document.type" value="page-object" />
<QueryAt path="document.tags" value={[name]} />
</QueryMulti>
<QueryMulti component={Util} type="tutorials">
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 3 locations. Consider refactoring.

</QueryMulti>
</div>
<div className="react-rainbow-utils_container">
<QueryMulti component={Util} type="experience-examples">
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 3 locations. Consider refactoring.

@coveralls
Copy link

coveralls commented Oct 21, 2018

Pull Request Test Coverage Report for Build 1509

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 74.031%

Totals Coverage Status
Change from base Build 1496: 0.0%
Covered Lines: 1045
Relevant Lines: 1343

💛 - Coveralls

import FlaskIcon from './flaskIcon';
import GraduationCapIcon from './graduationCapIcon';

export default function IntegrationCard({ results, type }) {
Copy link

Choose a reason for hiding this comment

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

Function IntegrationCard has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.


export default function ExperienceExampleCard({ results }) {
return results.map(({ data, id }) => (
<div>

Choose a reason for hiding this comment

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

add key

<h1 className="react-rainbow-utils-text_header">Real experience examples</h1>
<p className="react-rainbow-utils-text-description">
The Real experience examples will help you get
started building your app using the Button Component.

Choose a reason for hiding this comment

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

using the Button Component?
here you need to use:
using the ${componentName} Component ...
but here this is not correctly because you are rendering this many times as the results length

</div>
)}>
<div className="react-rainbow-utils-item_img-container">
<img src={data.image.url} alt="" />

Choose a reason for hiding this comment

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

use in the alt attribute the example name

import React from 'react';
import PropTypes from 'prop-types';
import ExperienceExampleCard from './experienceExampleCard';
import IntergrationCard from './intergrationCard';

Choose a reason for hiding this comment

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

PageObjectCard

<a href={data.url.url} className="react-rainbow-utils-link">
<Card
className="react-rainbow-utils-item"
key={id}

Choose a reason for hiding this comment

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

put key in anchor element

<QueryAt path="document.type" value="page-object" />
<QueryAt path="document.tags" value={[name]} />
</QueryMulti>
<QueryMulti component={Util} type="tutorials">
Copy link

Choose a reason for hiding this comment

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

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

<RenderIf isTrue={activeTabName === 'utils'}>
<Prismic repo="rainbow-doc">
<div className="react-rainbow-utils_container">
<QueryMulti component={Util} type="page-object">
Copy link

Choose a reason for hiding this comment

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

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

import FlaskIcon from './flaskIcon';
import GraduationCapIcon from './graduationCapIcon';

export default function PageObjectCard({ results, type }) {
Copy link

Choose a reason for hiding this comment

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

Function PageObjectCard has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.

@codeclimate
Copy link

codeclimate bot commented Oct 22, 2018

Code Climate has analyzed commit 1888219 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@TahimiLeonBravo TahimiLeonBravo merged commit 919e2e7 into master Oct 22, 2018
@TahimiLeonBravo TahimiLeonBravo deleted the utility-section branch September 23, 2019 08:29
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.

feat: Implement the utility section in Library
4 participants