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

component for recognition listing #163

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

avinash-mane
Copy link
Contributor

No description provided.

@avinash-mane avinash-mane added the react-frontend For PRs of peerly react app label May 25, 2020
@avinash-mane avinash-mane self-assigned this May 25, 2020
@avinash-mane avinash-mane added the enhancement New feature or request label May 25, 2020
@avinash-mane avinash-mane force-pushed the feature/react/159/core-component-and-shared-component-for-recognition-listing branch from c7bb69d to eaad3ee Compare June 2, 2020 04:47
@avinash-mane avinash-mane changed the title core component and shared component for recognition listing component for recognition listing Jun 2, 2020
@avinash-mane avinash-mane marked this pull request as ready for review June 2, 2020 04:49
}) => {
return (
<Row>
<Row className="d-flex justify-content-end">
Copy link
Contributor

Choose a reason for hiding this comment

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

why row inside row?

@@ -0,0 +1,11 @@
import React from "react";
import { render } from "@testing-library/react";
import CoreValueIconComponent from "./CoreValueIconComponent";
Copy link
Contributor

Choose a reason for hiding this comment

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

absolute import

`;

const RecognitionTextComponent = ({ text, given_by }) => (
<Row className="d-flex flex-column">
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need d-flex class also and Row also?

core_value,
}) => {
return (
<Row>
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not specifying the width this row occupies in container, neither I am using the col under it, do we need these?

</Img>
<Row className="d-flex flex-column text-start ml-4">
<Form.Label className="font-weight-bold ">{given_for}</Form.Label>
<Row className=" d-sm-block d-xs-block d-md-none">
Copy link
Contributor

Choose a reason for hiding this comment

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

row under row why?

};

RecognitionListComponent.propTypes = {
recognitionList: PropTypes.array.isRequired,
Copy link
Contributor

Choose a reason for hiding this comment

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

why the inconsistent naming convention? some places you have maintained kebab case for props/variables and some places camelCase? use camelCase always for props/variables

cc: @sahilbhatia

overflow: hidden;
`;

const ImgM = styled.div`
Copy link
Contributor

Choose a reason for hiding this comment

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

what is imgM?

<ImgM className="bg-dark d-sm-block d-md-none mt-2">
<ImageComponent
src="https://i.picsum.photos/id/654/300/200.jpg"
alt="CoreValueImage"
Copy link
Contributor

@mayuriardad mayuriardad Jun 2, 2020

Choose a reason for hiding this comment

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

what is the purpose of alt text? I believe it should be user-readable, then why TitleCase here?

<RecognitionTextComponent text={text} given_by={given_by} />
</Col>
<Col className="d-none d-md-block">
<Col className=" d-flex justify-content-center">
Copy link
Contributor

Choose a reason for hiding this comment

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

read about how to have nested Grid

import RecognitionTextComponent from "recognition-list-components/RecognitionTextComponent";
import HighFiveComponent from "shared-components/high-five-components/HighFiveComponent";

const giveHighFive = () => {
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 need an empty function?

//to to for give high five
};

const ImgD = styled.div`
Copy link
Contributor

Choose a reason for hiding this comment

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

What does imgD stand for?

const ImgM = styled.div`
border-radius: 20px;
height: auto;
width: auto;
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Given that both height and width are auto, do we need to specify them?

  2. Why overflow has been set to auto?

}) => (
<Card
className="my-4 mx-2 shadow p-3 mb-4 border border-secondary bg-light grey"
style={{ borderRadius: "36px" }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not use inline styles. We are already using styled components

/>
<ImgM className="bg-dark d-sm-block d-md-none mt-2">
<ImageComponent
src="https://i.picsum.photos/id/654/300/200.jpg"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this value hard coded inside component definition?

</ImgM>
<RecognitionTextComponent text={text} given_by={given_by} />
</Col>
<Col className="d-none d-md-block">
Copy link
Contributor

Choose a reason for hiding this comment

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

@avinash-mane avinash-mane force-pushed the feature/react/159/core-component-and-shared-component-for-recognition-listing branch from 48ba991 to ff4b0e7 Compare June 10, 2020 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request react-frontend For PRs of peerly react app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a core components and shared components needed for Recognition listing
4 participants