Skip to content
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

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open

Rediseño Navbar #211

wants to merge 47 commits into from

Conversation

ortega-pablo
Copy link

Desarrollo de nuevo NavBar y NavBar usuarios

Copy link
Collaborator

@thehighestprimenumber thehighestprimenumber left a 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.

@@ -1,13 +1,18 @@
{
"history": "Historia del ETI",
"manifest": "Manifiesto ETIano",
"signup": "Inscripción",
"manifest": "Manifiesto Etiano",
Copy link
Collaborator

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

Copy link
Author

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",
Copy link
Collaborator

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

Copy link
Author

Choose a reason for hiding this comment

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

Se dejó "Mis datos" porque era parte del diseño preaprobado y adicionar personales incorporaría una línea al botón del menú
Untitled

>
{userData.nameFirst?.split(' ')[0]} {userData.nameLast?.split(' ')[0]}
</Typography>
{userData?.roles?.[UserRoles.SUPER_ADMIN] && (
Copy link
Collaborator

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

Copy link
Author

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

<Stack direction="column" sx={{ height: 20, mt: '5px', mr: '5px' }}>
<Typography
variant="workSansFont"
sx={!userData?.roles || userData?.roles?.admin ? { mt: 1.5 } : {}}
Copy link
Collaborator

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Author

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: {
Copy link
Collaborator

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

Copy link
Author

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),
Copy link
Collaborator

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?

Copy link
Author

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]}
Copy link
Collaborator

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

Copy link
Author

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] && (
Copy link
Collaborator

Choose a reason for hiding this comment

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

usar isAdmin

Copy link
Author

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');
Copy link
Collaborator

Choose a reason for hiding this comment

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

usar ROUTES.SIGN_IN

Copy link
Author

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={{
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants