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

Creación de Componente de Carta (Cards) #13 #36

Open
wants to merge 9 commits into
base: development
Choose a base branch
from

Conversation

ppv95
Copy link
Collaborator

@ppv95 ppv95 commented Sep 24, 2020

Subiendo componente carta para el issue #13.
Cualquier duda u oportunidad de mejora favor de hacermela saber.

@ppv95 ppv95 linked an issue Sep 24, 2020 that may be closed by this pull request
src/components/developerCard.tsx Outdated Show resolved Hide resolved
@mecm1993
Copy link

Adicionalmente, puedes proveer un gif de como se ve este feature? @ppv95 si no hay problemas

@ppv95
Copy link
Collaborator Author

ppv95 commented Sep 27, 2020

ezgif com-video-to-gif

Copy link
Member

@dioniciodiaz dioniciodiaz left a comment

Choose a reason for hiding this comment

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

Podrias revisar este PR te ayudaria mucho ya que tiene las librerias instaladas. Podrias añadir algunos snapshot test para este componente. Aqui te dejo un ejemplo

@@ -0,0 +1,263 @@
import React from "react"
import styled from "styled-components"
import "@fortawesome/fontawesome-free/js/all.js"
Copy link
Member

Choose a reason for hiding this comment

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

@ppv95 esta libraria esta instalada en el repositorio?

Suggested change
import "@fortawesome/fontawesome-free/js/all.js"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dionicio-gp La instale en el momento que estaban creado el componente. Lo elimine porque vi que ese mismo PR #34 lo tenia instalada y asumi que le haria merge antes que el mio. En dado caso, las pruebas si te las debo, las realizare antes de merge a development

<SocialNetworks>
{webPage != null && (
<Media href={webPage} target="_blank">
<i className="fas fa-globe-americas"></i>
Copy link
Member

Choose a reason for hiding this comment

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

@ppv95 podrias usar la libreria de fontawasome para react

)

it("renders card with initial data", () => {
expect(card).toMatchSnapshot()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
expect(card).toMatchSnapshot()
expect(card.toJSON()).toMatchSnapshot()

Uno solo toma el contenido del component, no todo el objeto de testing.

Comment on lines 20 to 26
developerName={initialData.DeveloperName}
initials={initialData.Initials}
image={initialData.Image}
skillsList={initialData.SkillsList}
summaryDeveloper={initialData.SummaryDeveloper}
linkedin={initialData.linkedin}
twitter={initialData.Twitter}
Copy link
Member

Choose a reason for hiding this comment

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

Puedes Reducir la cantidad de propiedades? creo que se puede resumir a solo un objeto llamado profile y si queres, hasta podes implementar el spread operator:
<DeveloperCard {...profile} />

Esta es una sintaxis que si no estuviéramos usando TS, fuera indevido.

Comment on lines 240 to 262
{webPage != null && (
<Media href={webPage} target="_blank">
<FontAwesomeIcon icon={faGlobeAmericas} />
</Media>
)}

{linkedin != null && (
<Media href={linkedin} target="_blank">
<FontAwesomeIcon icon={faLinkedin} />
</Media>
)}

{twitter != null && (
<Media href={twitter} target="_blank">
<FontAwesomeIcon icon={faTwitter} />
</Media>
)}

{github != null && (
<Media href={github} target="_blank">
<FontAwesomeIcon icon={faGithub} />
</Media>
)}
Copy link
Member

Choose a reason for hiding this comment

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

Puedes colocarla, estas props puedes ponerle un valor null de Default value, para evitar hacer la comparación. Si vas a comparar algo, es recomendable utilizar el triple igual === o la diferencia del triple !==, porque compara tanto el valor del objeto como el prototipo

@sperezm97 sperezm97 added the hacktoberfest for hacktoberfest label Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest for hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creación de Componente de Carta (Cards)
4 participants