Skip to content

Solution: Jon Garcia y Sebastian Burpbacher #14

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

Open
wants to merge 45 commits into
base: main
Choose a base branch
from

Conversation

jonCroatanUto
Copy link

No description provided.

@danilucaci danilucaci self-requested a review May 26, 2021 20:23
Copy link
Contributor

@danilucaci danilucaci left a comment

Choose a reason for hiding this comment

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

Muy buen proyecto! 👏🏻👏🏻👏🏻 Habéis implementado muy bien muchas funcionalidades con React. A por el siguiente!

import Home from "./components/pages/Home";
import Active from "./components/pages/Active";
import Completed from "./components/pages/Complete";
// import Todo from "./components/Todo";
Copy link
Contributor

Choose a reason for hiding this comment

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

es recomendable eliminar todo el código comentado que no se utiliza


handleDelete(itemId) {
const { todos } = this.state;
const notDelete = todos.filter((el) => el.id !== itemId);
Copy link
Contributor

Choose a reason for hiding this comment

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

Muy bien implementado!

Es recomendable nombrar las variables con un nombre descriptivo para que se entienda exactamente qué es la variable. En este caso como mejora se podría llamar el argument el como todo

Comment on lines +1 to +15
import React from "react";
import "./_Button.scss";
// import { Link } from "react-router-dom";

const Checkbox = ({ ...newers }) => {
return <input className="check" type="checkbox" {...newers} />;
};

function Button({ ...newers }) {
return <input className="but" type="button" {...newers} />;
}
function ClearBut({ ...newers }) {
return <input className="butClear" type="button" {...newers} />;
}
export { Button, Checkbox, ClearBut };
Copy link
Contributor

Choose a reason for hiding this comment

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

Este fichero se debería extraer a varios componentes ya que el fichero se llama Button pero incluye componentes que no son botón como el checkbox.

@@ -0,0 +1,24 @@
import React from "react";
import "./footer.scss";
Copy link
Contributor

Choose a reason for hiding this comment

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

Es recomendable ordenar los imports para tener los imports de librerías primero y luego los imports de dependencias propias.

En este caso sería:

import React from "react";
import { Link } from "react-router-dom";

import "./footer.scss";
import { ClearBut } from "../Button/Button";

<Link to="/completed" className="nav_links">
<h6>Completed</h6>
</Link>
<ClearBut onClick={clear} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Sería recomendable renombrar este componente a <ClearButton /> en vez de <ClearBut /> para ser más descriptivo.

console.log(this.state);
}

handleEditing = (event) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Es recomendable definir las funciones de forma más consistente, o todas como arrow function o todas como método de la clase aunque funcione bien.

Comment on lines +1 to +17
@mixin grid3($cell1,$cell2,$cell3,$gap) {
display: grid;
grid-template-columns: $cell1 $cell2 $cell3;
column-gap: $gap;
justify-content: left;
align-content: flex-start;
}
@mixin resetMarginPadding {
margin: 0;
padding: 0;
}
@mixin inputs($color,$top,$bot){
border-radius: 3px;
border: $borderColor;
height: 40px;
width: 80%;
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.

Es recomendable dejar Prettier con la configuración de format on save de vscode para que el código esté siempre formateado y lo más legible posible.

color: $color;
font-family: $fonts;
margin-bottom: $dist;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Como recomendación, siempre se debe dejar un salto de linea en los ficheros. Si usamos una herramienta como Prettier esto se hará de forma automática siempre.

https://stackoverflow.com/questions/2287967/why-is-it-recommended-to-have-empty-line-in-the-end-of-a-source-file#:~:text=The%20empty%20line%20in%20the,can%20handle%20the%20EOF%20marker.

newTodo,
}) {
return (
<>
Copy link
Contributor

Choose a reason for hiding this comment

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

Como main ya es un contenedor es mejor quitar el fragment ya que no hace falta.

margin-right: 20px;
}

.but {
Copy link
Contributor

Choose a reason for hiding this comment

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

Los nombres de clases deberían ser más descriptivos para evitar palabras que puedan significar otra cosas en inglés como but. Un nombre más adecuado podría ser directamente .button

@danilucaci
Copy link
Contributor

Os recomiendo repasar esta guia de cómo escribir buenos mensajes de commit ya que algunos del Pull Request no son muy óptimos o descriptivos.

https://chris.beams.io/posts/git-commit/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants