project - Social Network "estuDÍA"#18
Conversation
|
Here is all the code https://github.com/danleonca/CDMX009-Social-Network/tree/shari |
| @@ -0,0 +1,7 @@ | |||
| { | |||
| /* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */ | |||
There was a problem hiding this comment.
Hay que eliminar los comentarios innecesarios
| // | ||
| // exports.helloWorld = functions.https.onRequest((request, response) => { | ||
| // response.send("Hello from Firebase!"); | ||
| // }); |
There was a problem hiding this comment.
Lo mismo aquí, a menos que sea un comentario que nos explique un bloque de código difícil, entonces se dejan, de otro modo no nos aportan nada.
| <title>Welcome to Firebase Hosting</title> | ||
|
|
||
| <!-- update the version number as needed --> | ||
| <script defer src="/__/firebase/7.13.2/firebase-app.js"></script> |
There was a problem hiding this comment.
Lo mismo aquí, es algo que ya se ha comentado desde el primer proyecto.
| <script defer src="/__/firebase/7.13.2/firebase-messaging.js"></script> | ||
| <script defer src="/__/firebase/7.13.2/firebase-storage.js"></script> | ||
| <!-- initialize the SDK after all desired features are loaded --> | ||
| <script defer src="/__/firebase/init.js"></script> |
There was a problem hiding this comment.
Lo mismo aquí! al ver la ruta sabemos que se trata de firebase init, el comentario sale sobrando.
| body, #message { margin-top: 0; background: white; box-shadow: none; } | ||
| body { border-top: 16px solid #ffa100; } | ||
| } | ||
| </style> |
There was a problem hiding this comment.
Los estilos deberían ir en un archivo CSS, si se van a dejar aquí hay que cuidar la indentación del código.
| <a target="_blank" href="https://firebase.google.com/docs/hosting/">Open Hosting Documentation</a> | ||
| </div> | ||
| <p id="load">Firebase SDK Loading…</p> | ||
|
|
| // firebase.storage().ref('/path/to/ref').getDownloadURL().then(() => { }); | ||
| // | ||
| // // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 | ||
|
|
| <g> | ||
| </g> | ||
| <g> | ||
| </g> |
There was a problem hiding this comment.
Las imágenes deben optimizarse para que no sean tan pesadas, pueden utilizar un optimizador en línea para svg
|
|
||
| <div id= "firstElement"> | ||
| <p><img class="imgIPN" src="img/logo-ipn-blanco.png" style="width:200px; height:auto;"></p> | ||
| <h1>e s t u D Í A</h1> |
There was a problem hiding this comment.
Todos los valores en los atributos deberían guardar consistencias, el nombre de las imágenes también debería ser en inglés.
| @@ -15,20 +16,27 @@ | |||
|
|
|||
| <div id="createUser"> | ||
| <p><input class="boxInput" id="namelNw" type="text" placeholder="Ingrese nombre de usuario"> </p> <br> | ||
| <p><input class="boxInput" id="emailNw" type="email" placeholder="Ingrese correo electrónico"> </p> <br> | ||
| <p><input class="boxInput" id="passwordNw" type="password" placeholder="Nueva contraseña"></p><br> |
There was a problem hiding this comment.
Los id deberían ser más descriptivos y están mal escritos, en inglés deberá ir primero el adjetivo: newPassword, newEmail, newName
| //example(); | ||
| //import {firebase} from '@firebase/app'; | ||
| //require('firebase/auth'); | ||
| let allApp; |
| </div> | ||
| </div> | ||
| <main> | ||
| <!-- Text Box--> |
| <div class="width-data"> | ||
| <form> | ||
| <input type="text" id="text-box"> | ||
| <input type="submit" value="Compartir"> |
There was a problem hiding this comment.
Los valores deben tener consistencia:
value: share
| </div> | ||
| </section> | ||
| </main> | ||
| ` |
There was a problem hiding this comment.
Por qué tienen un template tan largo?
| box-sizing: border-box; | ||
| } | ||
| /*general*/ | ||
| body { |
|
|
||
|
|
||
|
|
||
| /*Media querys*/ |
There was a problem hiding this comment.
También es un comentario innecesario porque abajo podemos ver que son media queries
| }); | ||
| }; | ||
| //* ***********************Print cards posts******************************** | ||
| function addNewCard(printing1, doc) { |
| @@ -164,7 +164,7 @@ function addNewCardNoComents(printing2, doc) { | |||
| } | |||
| //* ***********************Print coments in real time*********************** | |||
| db.collection('publications') | ||
| .orderBy('Date', 'desc') | ||
| .orderBy('date', 'desc') | ||
| .onSnapshot((querySnapshot) => { |
There was a problem hiding this comment.
Muy bien aquí, que todo sea lowercase
| <div class="user"> | ||
| <img src="img/info.svg" id="info" class="btnStyles" style="width:40px; height:auto;"> <br> | ||
| <img src="img/Group.svg" id="logOut" class="btnStyles" style="width:40px; height:auto;"> | ||
| <img src="img/info.svg" id="info" style="width:40px; height:auto;"> <br> |
There was a problem hiding this comment.
Por qué quitaron la clase y movieron el estilo para acá?
| //* ****************************register users */ | ||
| export const createNewUser = document.getElementById('createUserNw'); | ||
| createNewUser.addEventListener('click', newUser); | ||
| export const userNew = document.getElementById('newUser'); |
There was a problem hiding this comment.
En general muy buena indentación y orden del código, por otro lado tienen muchos comentarios que son innecesarios.
| // import { openModalEdit } from './utils/modalEdit.js'; | ||
| // import { signOut } from './utils/exit.js'; | ||
| // import { getNameProfile, theWatcher } from './index.js'; | ||
| import * as newUser from '../src/utils/createUsers.js'; |
| break; | ||
| default: | ||
| alert('ingreso lisiado'); | ||
| } |
There was a problem hiding this comment.
Las alertas no son le mejor recurso, deben hacerle saber de otra manera a su usuario los errores o mensajes importantes
| break; | ||
| case 'auth/wrong-password': | ||
| alert(`Verifica tu contraseña ${errorMessage}`); | ||
| console.log(errorCode); |
| }); | ||
| }); | ||
| }; | ||
|
|
There was a problem hiding this comment.
muy bien aquí! me parece que está muy ordenado y cumple con lo que debe hacer.
AdrianaHY
left a comment
There was a problem hiding this comment.
Muy bien trabajo, me parece que han tenido un gran avance. Seguimos teniendo problemas de buenas prácticas, de comentarios innecesarios, de naming, de espacios innecesarios, hay que cuidar mucho eso porque le puede restar bastante al código y al trabajo que estamos entregando.
Sigan así! Muy buen avance
| display: none; | ||
| } | ||
| }*/ | ||
|
|
There was a problem hiding this comment.
Hay que eliminar código que ya no necesitamos.
| export let getName; | ||
| let getImg; | ||
| let url; | ||
| export let userSigned; |
There was a problem hiding this comment.
Sólo por consistencia dejemos todos los exporto al final.
| expect(result.title).toBe('Hola, encontre esto que puede ayudarnos'); | ||
| done(); | ||
| }, | ||
| ))); |
No description provided.