Skip to content
This repository was archived by the owner on Jul 11, 2026. It is now read-only.

DigiTareas escolar#24

Open
IrisFyD wants to merge 58 commits into
Laboratoria:masterfrom
IrisFyD:master
Open

DigiTareas escolar#24
IrisFyD wants to merge 58 commits into
Laboratoria:masterfrom
IrisFyD:master

Conversation

@IrisFyD

@IrisFyD IrisFyD commented May 1, 2020

Copy link
Copy Markdown

Added interface, login functions with fb, gmail and with mail, save users, publish and delete

@ZayraJero

Copy link
Copy Markdown

added changes in css, profile, edit, and readme

Comment thread package.json
"stylelint": "stylelint --aei src/**/*.css",
"pretest": "npm run htmlhint && npm run eslint && npm run stylelint",
"test": "jest --coverage",
"test": "jest",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Podrían dejar coverage ó watch

@reloadercf reloadercf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

En general se ve bien su código, pero considero que 2 personas fueron las que colaboraron más esto en base a sus commits, considero que hay código comentado que podría borrarse, recomiendo revisen en que casos se utiliza let y const esto para tener congruencia con las variables.

Comment thread public/firebase.js
firebase.auth()
.signInWithPopup(providerFB)
.then(function(result) {
console.log(result.user);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Recuerden que se deben quitar los console.log al final

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

y así con todos los console.log que tienen

Comment thread public/firebase.js
photo:user.photoURL
}
db.collection("users").doc(userNew.uid).set(userNew)
.then(function() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

La promesa pudo retornar algo más que un console.log

Comment thread public/firebase.js
//console.log(`${doc.id} => ${doc.data().post}`);
let postElement = document.createElement('div');
let postNew = `
<div class="containerPostPrint">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

si la clase es para implementar estilos no se debe utilizar camelCase en vez de containerPostPrint, para estilos es mejor container-post-print

Suggested change
<div class="containerPostPrint">
<div class="container-post-print">

Comment thread public/firebase.js
Comment on lines +130 to +142
<img class="imgUser" src="img/user.svg"></img> <p class="nameUser">${doc.data().user}</p>
</div>
<div class="btnIcon">
<button type="submit" class="editBtn" ${doc.id}, ${doc.data().post} ><img src="img/edit.svg" /></button>
<button type="submit" class="deleteBtn" data-id="${doc.id}"><img data-id="${doc.id}" src="img/delete.svg" /></button>
</div>
<p class="PostPrint">${doc.data().post}</p>
<textarea class="answer" id="answer"> </textarea>
<br>
<div class="sectionLikes">
<p class="nroLikes">0<img class="imgLikes" src="img/like.svg" /></p>
</div>
<button class="btnAnswer" data-id="${doc.id}">Responder</button>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Podrían darle formato a su código, esto facilita la lectura a cualquiera que lo lea ;)

Suggested change
<img class="imgUser" src="img/user.svg"></img> <p class="nameUser">${doc.data().user}</p>
</div>
<div class="btnIcon">
<button type="submit" class="editBtn" ${doc.id}, ${doc.data().post} ><img src="img/edit.svg" /></button>
<button type="submit" class="deleteBtn" data-id="${doc.id}"><img data-id="${doc.id}" src="img/delete.svg" /></button>
</div>
<p class="PostPrint">${doc.data().post}</p>
<textarea class="answer" id="answer"> </textarea>
<br>
<div class="sectionLikes">
<p class="nroLikes">0<img class="imgLikes" src="img/like.svg" /></p>
</div>
<button class="btnAnswer" data-id="${doc.id}">Responder</button>
<img class="imgUser" src="img/user.svg"></img> <p class="nameUser">${doc.data().user}</p>
</div>
<div class="btnIcon">
<button type="submit" class="editBtn" ${doc.id}, ${doc.data().post} ><img src="img/edit.svg" /></button>
<button type="submit" class="deleteBtn" data-id="${doc.id}"><img data-id="${doc.id}" src="img/delete.svg" /></button>
</div>
<p class="PostPrint">${doc.data().post}</p>
<textarea class="answer" id="answer"> </textarea>
<br>
<div class="sectionLikes">
<p class="nroLikes">0<img class="imgLikes" src="img/like.svg" /></p>
</div>
<button class="btnAnswer" data-id="${doc.id}">Responder</button>

Comment thread public/firebase.js

// reply post

function answer(e){

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Su función podria tener un nombre más descriptivo

Comment thread public/view/login.js
const root = document.getElementById('root')
const viewLogin = `
<div class="mainConteinerLogin">
<img src="img/portadaDesktop.jpg" alt="" class="imageLoginDesktop">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

traten de no dejar vacío los alt porque los buscadores usan esa etiqueta para ubicar las búsquedas, ademas favorece el SEO de una web

Suggested change
<img src="img/portadaDesktop.jpg" alt="" class="imageLoginDesktop">
<img src="img/portadaDesktop.jpg" alt="algo" class="imageLoginDesktop">

Comment on lines +23 to +28
/*
const buttonDeletePost = document.querySelector('#btnDeletePost')
buttonDeletePost.addEventListener('click', deletePost)

const buttonEditPost = document.querySelector('#btnEditPost')
buttonEditPost.addEventListener('click', editPost)*/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Si no se utiliza este fragmento de código seria bueno quitarlo, estoy seguro que en 1 año si intentan ver porque comentaron este código posiblemente no se acuerden

Suggested change
/*
const buttonDeletePost = document.querySelector('#btnDeletePost')
buttonDeletePost.addEventListener('click', deletePost)
const buttonEditPost = document.querySelector('#btnEditPost')
buttonEditPost.addEventListener('click', editPost)*/

Comment thread public/view/profile.js
Comment on lines +4 to +13
const userName = "Laura Flores";
const student = "Carolina Flores";
const school = "Colegio La Paz";
const grade = "1";
const group = "A";
const teacher = "Melisa Gutierrez";
const comment = "Buen día, mi hija se trajo la chamarra de Adriana Juarez, la chamarra tiene su nombre Carolina Flores";
const likeCount ="15";
const answers ="";
const viewProfile = `

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

estas variables que onda?? teóricamente los valores tendrían que asignarse por cada usuario al iniciar sesión

case "#/": {
header.appendChild(components.Header());
return root.appendChild(components.Home());
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Al final de cada caso lleva break; les recomiendo revisar la sentencia de control switch.

Suggested change
}
break;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

y así en todas

Comment thread test/example.spec.js
Comment on lines -0 to +11
import { example } from '../src/example.js';
import { loginGoogle, loginFB, registerUser, addUserPost, showPostUser,sum } from '../src/firebase.js';

describe('example', () => {
describe('login'),() =>{

}

/*describe('Tiene que sumar', () => {
it('debería ser una función', () => {
expect(typeof example).toBe('function');
expect(sum ()).toBe('function');
});
}); No newline at end of file
}); */ No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Estoy casi seguro que no funcionaron sus test, sugiero utilizar alguna emulación de sus funciones.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants