-
Notifications
You must be signed in to change notification settings - Fork 4
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
Rediseño Navbar #211
base: main
Are you sure you want to change the base?
Rediseño Navbar #211
Conversation
Navbar - ETI-89 - ETI-87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- resolver conflictos
- resolver las decenas de warnings que tira la consola al ejecutarlo
- tenemos demasiados botones y componentes, todos con estilado especial, escrito inline.Lo que hay que hacer es crear componentes propios que sean "CallToActionButton", "SecondaryButton", "CenteredBox", etc. que tengan un significado semantico dentro del Design System. Les recomiendo que investiguen un poco sobre qué es y cómo implementar un Design System
Además les enviaremos un documento con bugs visuales.
public/locales/es/bar.json
Outdated
@@ -1,13 +1,18 @@ | |||
{ | |||
"history": "Historia del ETI", | |||
"manifest": "Manifiesto ETIano", | |||
"signup": "Inscripción", | |||
"manifest": "Manifiesto Etiano", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hola, por favor no cambien los nombres de las cosas que ya teníamos. es ETIano, el botón es "Crear Usuario / Ingresar", etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resuelto
@@ -1,8 +1,9 @@ | |||
{ | |||
"myProfile": "Mis datos personales", | |||
"myProfile": "Mis datos", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lo mismo, porfa no cambien los textos que ya definimos nosotrxs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/components/EtiAppBar.js
Outdated
> | ||
{userData.nameFirst?.split(' ')[0]} {userData.nameLast?.split(' ')[0]} | ||
</Typography> | ||
{userData?.roles?.[UserRoles.SUPER_ADMIN] && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usar la función isSuperAdmin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No se puede utilizar la función isSuperadmin ya que el contexto de usuario no llega a EtiAppBar.js y el tipo de dato es distinto al requerir el usuario directamente de firebase
src/components/EtiAppBar.js
Outdated
<Stack direction="column" sx={{ height: 20, mt: '5px', mr: '5px' }}> | ||
<Typography | ||
variant="workSansFont" | ||
sx={!userData?.roles || userData?.roles?.admin ? { mt: 1.5 } : {}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usar la función isAdmin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
es el item 8 en las buenas practica,s usé exactamente este ejemplo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No se puede utilizar la función isSuperadmin ya que el contexto de usuario no llega a EtiAppBar.js y el tipo de dato es distinto al requerir el usuario directamente de firebase
|
||
<Box | ||
sx={{ | ||
display: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
por favoro no quitar las aria-.... El ETI es un evento inclusivo y aspiramos a que el sitio sea accesible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorporadas nuevamente
{userIsSuperAdmin && | ||
<ListItemButton onClick={() => { handleListItemClick(2), toggleOpen() }} sx={{ | ||
...itemButtonStyle, | ||
...(selectedIndex === 2 && itemButtonActiveStyle), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
evitar usar númemeros hardcodeados... qué significa ese 2 en este contexto?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Se colocaron nombre a los elementos para no utilizar los números harcodeados
<Box sx={{ height: '50px' }}> | ||
<Stack direction="column" sx={{ height: 20, mt: '5px' }}> | ||
<Typography variant="h6" color= 'listItems.light' sx={{ fontWeight: 600 }}> | ||
{userData.nameFirst?.split(' ')[0]} {userData.nameLast?.split(' ')[0]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esta lógica la vi en otro lado, deberríamos tener una función compartida que reciba el userData y nos devuelva el nombre formateado
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Se incorporó una función en el userData para manejar esta funcionalidad
<Typography variant="h6" color= 'listItems.light' sx={{ fontWeight: 600 }}> | ||
{userData.nameFirst?.split(' ')[0]} {userData.nameLast?.split(' ')[0]} | ||
</Typography> | ||
{userData?.roles?.[UserRoles.SUPER_ADMIN] && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usar isAdmin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No se puede utilizar la función isSuperadmin ya que el contexto de usuario no llega a UserNavBar.js y el tipo de dato es distinto al requerir el usuario directamente de firebase
<Box> | ||
<Button | ||
onClick={() => { | ||
navigate('/sign-in'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usar ROUTES.SIGN_IN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementado
)} | ||
|
||
|
||
<ListItemButton onClick={() => { handleClickInscriptions(), handleListItemClick(dropDownInscriptions) }} sx={{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parece que tenemos este mismo elemento o uno muy parecido varias veces por el código, sería bueno pulirlo un poco y que sea más facil de usar.
develop merge and fix React importation
b1cfa4d
to
9783b5e
Compare
Desarrollo de nuevo NavBar y NavBar usuarios