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

Pullrequest equipo Bichigram#30

Open
marielcarrillo wants to merge 28 commits into
Laboratoria:masterfrom
marielcarrillo:master
Open

Pullrequest equipo Bichigram#30
marielcarrillo wants to merge 28 commits into
Laboratoria:masterfrom
marielcarrillo:master

Conversation

@marielcarrillo

Copy link
Copy Markdown

Me parece que ya está todo, me gustaría seguir haciendo mas pruebas de testing por namas quedaron 3.

@HectorBlisS HectorBlisS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excelente, se nota que revisaron a fondo la documentación de Firebase. Siento que es poco visible el trabajo de todas, es necesario arreglar el github, pues los commits aparecer como anonimos o mixtos y es importante diferenciar el trabajo de cada una. Felicidades por usar Sass y el trabajo con JavaScript se nota mucho mejor a los proyectos anteriores. Muy bien.

Comment thread public/index.html
Comment on lines +44 to +52
// // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
// // The Firebase SDK is initialized and available here!
//
// firebase.auth().onAuthStateChanged(user => { });
// firebase.database().ref('/path/to/ref').on('value', snapshot => { });
// firebase.messaging().requestPermission().then(() => { });
// firebase.storage().ref('/path/to/ref').getDownloadURL().then(() => { });
//
// // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hay que evitar que Firebase sobreescriba tus archivos html

Comment thread src/main.js Outdated


const init = () => {
changeView(window.location.hash)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Si se usa un hash router es importante crear un archivo para colocar las rutas

Comment thread src/main.js Outdated

const initFirebase = () => {
// Your web app's Firebase configuration
var firebaseConfig = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No usamos var

Comment thread src/view/login.js Outdated
divElement.innerHTML = viewLogin

//nodes (to get the DOM elements inside the form and initialize the login function)
const emailText = divElement.querySelector('#emailText')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Muy bien la semántica de los nodos

Comment thread src/view/login.js Outdated

//sign in with firebase functions

const promise = auth.signInWithEmailAndPassword(email, pass)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excelente el manejo de la promesa

Comment thread src/view/login.js Outdated
@@ -1,36 +1,80 @@
import { changeView } from '../view-controler/router.js'

// eslint-disable-next-line import/no-cycle

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Muy bien la separación de funciones en archivos respectivos

Comment thread src/view/newpost.js Outdated
location: loc,
date: firebase.firestore.Timestamp.fromDate(new Date()),
counter: 0,
}).then(console.log('ok C:'));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Quitamos los console.log que no utilizamos al final

Comment thread src/view/newpost.js
postimg: url,
description: descr,
location: loc,
date: firebase.firestore.Timestamp.fromDate(new Date()),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Muy bien el uso del formato de Firebase

Comment thread src/view/newpost.js

// upload the image to storage
storageRef.put(image)
.then(snap => snap.ref.getDownloadURL())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maravilloso

Comment thread src/view/home.js Outdated
Comment on lines +49 to +53
const p = document.querySelector('#posts');
p.innerHTML = '';
snap.forEach((doc) => {
const div = `<div>
<p>${doc.data().date}</p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Evitemos mezclar el DOM con la DB, esto debería estar en una función que devuelve un array con los docs y en otra se dibujan

Comment thread public/index.html Outdated
<script src="main.js" type="module"> </script>

<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.14.0/firebase-app.js"></script>

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 si se borra el "-app" quedando solo https://www.gstatic.com/firebasejs/7.14.0/firebase.js
se ahorrarían algunas lineas de código

@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.

Las recomendaciones que realizo @HectorBlisS me parecen adecuados.

Comment thread public/index.html Outdated

<!-- TODO: Add SDKs for Firebase products that you want to use
https://firebase.google.com/docs/web/setup#available-libraries -->
<script src="https://www.gstatic.com/firebasejs/7.14.0/firebase-analytics.js"></script>

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.

Firebase analytics no se utiliza en este proyecto ;)

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