11_Andrea Toledo, Laura Bailón, Yaki Romero#21
Conversation
| @@ -256,9 +283,9 @@ html { | |||
| #search { | |||
There was a problem hiding this comment.
Es más recomendable utilizar clases para dar estilos.
| "especialidad": snapshot.val().profile.especialidad | ||
|
|
||
| } | ||
| const updates2 = {}; |
There was a problem hiding this comment.
Utilicen nombres de variables más descriptivos, updates2 no me dice nada.
| } | ||
| function setLikePost() { | ||
| let uid = firebase.auth().currentUser.uid; | ||
| let name = firebase.auth().currentUser.displayName ? firebase.auth().currentUser.displayName: firebase.auth().currentUser.email; |
| // Email sent- email enviado | ||
| console.log("Enviando correo.."); | ||
| }).catch(function(error) { | ||
| // An error happened. |
There was a problem hiding this comment.
Eliminar los comentarios innecesarios
|
|
||
|
|
||
| /*// BOTON LOGIN CON GOOGLE | ||
| //BOTON LOGIN CON GOOGLE |
| "especialidad": snapshot.val().profile.especialidad | ||
|
|
||
| } | ||
| const updates2 = {}; |
There was a problem hiding this comment.
el nombres de variables es importante
| @@ -1,7 +1,12 @@ | |||
| // LOGIN CON EMAIL Y PWD | |||
| return firebase.auth() | ||
| .signInWithEmailAndPassword(email, password) | ||
| .catch(function(error) { | ||
| // Handle Errors here. |
| .catch(function(error) { | ||
| // Handle Errors here. | ||
| const errorCode = error.code; | ||
| const errorMessage = error.message; |
There was a problem hiding this comment.
hay que eliminar todos los comentarios innecesarios
|
|
||
| auth.emailLogin(email, password).then(valor => { | ||
| expect(valor).toBe(true) | ||
| }); |
There was a problem hiding this comment.
Que pro se ven estas pruebas! muy bien!
| alert("Contraseña incorrecta") | ||
| } | ||
| console.log(`${errorCode} ${errorMessage}`) | ||
| // ... |
There was a problem hiding this comment.
Hay que poner atención en lo que subimos cuando hacemos push, los console se deben eliminar.
| <<<<<<< HEAD | ||
|
|
||
| ======= | ||
| >>>>>>> 4b557f0fee0b6b5db36d549f21a7071b628e9a4a |
There was a problem hiding this comment.
esto es de un conflicto, lograron resolverlo?
| }); | ||
| }); | ||
|
|
||
| */ No newline at end of file |
There was a problem hiding this comment.
De nuevo aquí, hay que poner mucha atención en el código que no estamos utilizando.
| <script src="ya.js"></script> | ||
| <script src="p.js"></script> | ||
| <script src="post.js"></script> | ||
| <script src="public.js"></script> |
There was a problem hiding this comment.
Por qué hay tantos archivos linkeados de js? no se hizo por módulos?
| <span id="google-login" class="login"><img src="./images/g.png" class="icon" alt="googleLogo"><p>Iniciar Sesión con Google</p></span> | ||
| <span id="facebook-login" class="login facebook"><img src="./images/f.png" class="icon" alt="facebookLogo"><p>Iniciar Sesión con Facebook</p></span> | ||
| </div> | ||
| ` |
There was a problem hiding this comment.
Hay que cuidar la indentación y el formato de sus archivos
| </div> | ||
| <div id="logins"> | ||
|
|
||
| <p class="WelcomeFont">Bienvenidx</p> |
There was a problem hiding this comment.
Hay que ser consistentes con el naming en nuestras clases y todos lo atributos y variables que utilicemos, si está utilizando guiones y lowercase entonces debió ser la clase: welcome-font
| <a id="edit-comment-${snapshot.val()[comment].postId}/comments/${comment}" class="edit-comment" >Editar</a> | ||
| <a id="delete-comment-${snapshot.val()[comment].postId}/comments/${comment}" class="remove-comment">Eliminar</a> | ||
| </div> | ||
| </div> |
There was a problem hiding this comment.
Hay que cuidar la indentación y formato de sus archivos.
| commentsRef2.remove(); | ||
| } else { | ||
| return | ||
|
|
| } | ||
|
|
||
| //Function delete comments | ||
|
|
| function cancel_editPost(){ | ||
| let cancelId=this.id.slice(12) | ||
| document.getElementById("post-user"+cancelId).disabled = true; | ||
| document.getElementById("button-option"+cancelId).style.display= "none"; |
There was a problem hiding this comment.
Aquí también podríamos utilizar template strings:
button-option ${cancelId}
| let editCommentUser=this.id.slice(13) | ||
| document.getElementById("comentUser"+editCommentUser).disabled=false; | ||
| document.getElementById("comentUser"+editCommentUser).focus(); | ||
| document.getElementById("buttonConfirmComment"+editCommentUser).style.display= "block"; |
| function cancel_change_comment(){ | ||
| let cancelIdComment = this.id.slice(13) | ||
| document.getElementById("comentUser"+cancelIdComment).disabled = true; | ||
| document.getElementById("buttonConfirmComment"+cancelIdComment).style.display= "none" |
| height: 80px; | ||
| background-color: whitesmoke; | ||
| background-color: rgb(56, 10, 83); | ||
| /* background-color: rgb(33, 126, 156); */ |
| // An error happened. | ||
| return false | ||
| //return false | ||
| console.log(error) |
There was a problem hiding this comment.
Todos estos comentarios deben eliminarse
| */ No newline at end of file | ||
| expect(falsesignInWithEmailAndPassword(email, password)).toBe('Email inválido'); | ||
| expect(auth.emailLogin(password)).toBe('No cumple con los 6 caracteres'); | ||
| });*/ |
There was a problem hiding this comment.
Todo este archivo está comentado, si no se utiliza debe eliminarse.
| } | ||
|
|
||
| // FUNCION QUE CREA PAGINA INICIAL | ||
| function loginPage() { |
There was a problem hiding this comment.
Eliminar los comentarios innecesarios.
AdrianaHY
left a comment
There was a problem hiding this comment.
Chicas, me parece que lo que han logrado hasta ahora es impresionante!
Por otro lado, continuan con bastante problemas en cuanto a buenas prácticas que se deben mejorar, también hay unas partes que se pueden refactorizar o hacer de otra manera, por ahora lo que pude ver fue la concatenación que se puede sustituir con un template string.
Por lo demás muchas felicidades! continuen con su buen trabajo.
code review