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

Mejora de UI/UX #764

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open

Mejora de UI/UX #764

wants to merge 11 commits into from

Conversation

gmartincor
Copy link
Contributor

Mejora de UI/UX: Optimización de la presentación y ordenamiento de miembros

Este Pull Request introduce dos posibles en la UI/UX de la aplicación:

  1. Optimización del diseño con Flexbox (member-cards.scss)

    • Uso de Flexbox para las columnas: Se ha implementado flex-wrap para asegurar que las columnas se distribuyan en filas cuando sea necesario y que los elementos se ajusten uniformemente.

    • Distribución vertical: Cada tarjeta (card) utiliza flex-direction: column para organizar su contenido verticalmente, junto con justify-content: space-between para distribuir el espacio de manera uniforme dentro de la tarjeta.

    • Diseño responsive: En pantallas más pequeñas (móviles), los cards se expanden para ocupar todo el ancho disponible para mejorar la usabilidad en dispositivos móviles.

  2. Reordenamiento de miembros en la aplicación (users_controller.rb)

    • Modificaciones en el método index: Se ha eliminado el orden predeterminado del método index, delegando el manejo de la ordenación al método search_and_load_members. Esto busca asegurar que los parámetros proporcionados por el usuario se procesen de forma flexible, sin imponer un orden preestablecido.

    • Modificaciones en el método search_and_load_members:

      • Uso de joins(:user): Se ha añadido un JOIN entre las tablas members y users para acceder a los campos del modelo User, como last_sign_in_at a través de Ransack. Esta modificación se implementa con la intención de que el sistema puede ordenar y filtrar tanto por atributos de members como de users, buscando una mayor flexibilidad en el ordenamiento

      • Condicional para el orden predeterminado: Si el usuario no especifica ninguna orden de búsqueda (result.order_values.blank?), se aplica un orden predeterminado de los miembros: primero los administradores (manager DESC), seguidos de los miembros por última conexión (last_sign_in_at DESC NULLS LAST). Esta modificación busca mejorar la accesibilidad visual y hacer la interfaz más intuitiva, mostrando primero a los administradores y luego a los miembros de acuerdo a su última actividad. En el caso de que el usuario especifique un criterio de ordenación, este se respeta y se ajusta para asegurar su criterio de búsqueda.

Espero que la contribución pueda ser de utilidad.

Un saludo!!

@gmartincor
Copy link
Contributor Author

El primer commit es solo la configuración del archicvo docker-compose.yml. Hice commit y se me olvidó borrarlo.

Un saludo!

@franpb14
Copy link
Collaborator

franpb14 commented Oct 23, 2024

Hello Guille, first of all, welcome and thank you for wanting to contribute! It's great to see you here 😉!
I think you have made a good pull request description, however, there are certain things to improve:

  • We don't use Spanish, it is like that so everyone from everywhere can understand us and even collaborate in an easier way
  • It would be good a better title trying to be more descriptive, although it should be short (good practices say no more than 50 chars)
  • It's better to do an understandable code than writing comments, comments should be used in really complex code

About the code I'll do a fast review now, but I'd like to check it in more depth later.

.irb_history Outdated Show resolved Hide resolved
db/structure.sql Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
@markets
Copy link
Collaborator

markets commented Oct 23, 2024

Bienvenido @gmartincor! Encantados de tener más ayuda en este proyecto 💪

Algunas notas:

  • En general es buena idea mandar pull requests lo más pequeños y focus posible, así es más fácil revisar, testar, preparar release, ... Creo que el tema del orden deberíamos quitarlo, no tengo claro cual es el problema actual.
  • El actual docker file es más bien para producción, igual algun día (o no jeje) hacemos uno oficial para desarrollo, pero por ahora lo mejor es no commitear cambios en ese file, ya que podría romper la instancia de pro. En realidad esta app es tan senzilla que hasta sin docker es fácil/directo correrla en cualquier sistema basado en UNIX.
  • En estas discusiones no hay problema en usar cualquier idioma, pero en el code si usamos siempre english, tb los comentarios (en caso que aporten valor, sino casi mejor ✂️). Tengamos en cuenta que ocasionalmente hemos recibido contribuciones de diferentes países.

Saludos 👋👋

@gmartincor
Copy link
Contributor Author

Hello!! Thanks so much for your time and attention. I'll get right on those corrections. 😁

Always a pleasure!

Best regards!! 👋👋

@markets
Copy link
Collaborator

markets commented Oct 24, 2024

Hello @gmartincor I think we should also revert the second point:

  1. Reordenamiento de miembros en la aplicación (users_controller.rb)

Not sure what problem are you trying to solve here, IMO the current default ordering and sorting is fine (it took us some time to reach the current behavior, see this thread #495 for more information).

@gmartincor
Copy link
Contributor Author

Hello @markets , I thought it would be a good idea for administrators to appear first by default in the user list when opening the site for the first time, so that the rest of the members can have easier and more intuitive visual access to them, while maintaining the order based on the last connection for both administrators and the rest of the members.

@markets
Copy link
Collaborator

markets commented Oct 24, 2024

Sorry @gmartincor 🙏🏼 but I don't agree with that. IMO we should revert that change.

In general, it's a good idea to use each branch/PR for one single thing, that's the easiest way to move forward. I think we should use this branch to fix only this issue #729. And if we want to change the default ordering, it will be better to discuss it before and in another thread. Focused branches are the best 👌🏼 for everybody (developer, reviewer, tester, releaser, product).

@franpb14
Copy link
Collaborator

Hey @gmartincor let's do it as @markets said and focus only on that issue. Nevertheless, I'm going to take the opportunity to give you a few more tips.

@gmartincor
Copy link
Contributor Author

gmartincor commented Oct 27, 2024

Hello @markets , this is my first time participating in an open-source project, and I'm still in the learning phase . Thanks to you and @franpb14 for your patience and interest, and for giving me advice for future contributions 😁.

Best regards!

@markets
Copy link
Collaborator

markets commented Oct 28, 2024

Hello 👋 @gmartincor Welcome to the wonderful world of open source! It helped me a lot to grow as a developer and I still learn new things everyday after more than 10 years doing so 🙌

Hope we can help you too with those code reviews and discussions, they are always very useful.

PS sorry 🙏 we are still using a very old Bootstrap version, I just created a new issue (#766) to migrate to a newer version some day

@gmartincor
Copy link
Contributor Author

"Hello @markets , yesss!! My intention is to collaborate while I continue learning and growing as a developer. Thank you very much for your support. I still don't have much experience with Bootstrap, but I would like to carry out the migration to the updated version if it is possible 😁.

@franpb14
Copy link
Collaborator

franpb14 commented Oct 29, 2024

right now when someone has a long description this is happening
image
Not only the card has a bigger size than the other but it also creates a gap

@markets
Copy link
Collaborator

markets commented Oct 30, 2024

@gmartincor after all those changes, we're still not fixing the original issue (#729). Actually, the current diff in this branch:

  • added some border-radius
  • removed a class that breaks our test suite (Please don't forget to run the tests! bundle exec rspec)

I still think we should focus on fix/improve the issue described in #729. Small steps is the way to go.

justify-content: space-between;
align-items: stretch;
gap: 20px;

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this space

gap: 20px;


@media(max-width: $screen-sm-min) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should be lg instead of sm

.card-wrapper {
width: 48%;

@media (max-width: $screen-sm-min) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be lg as well

}
}

.card-wrapper {
Copy link
Collaborator

@franpb14 franpb14 Nov 2, 2024

Choose a reason for hiding this comment

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

Maybe to-member-card__wrapper is a better name

flex-direction: column;
justify-content: space-between;
height: 100%;

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this space

}

&__description {
margin-bottom: 10px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we should remove this margin

width: 100%;
}
}

.to-member-card {
& {
margin: 16px 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's better if we remove this margins as they are having a strange effect

@@ -20,7 +20,7 @@
</div>
</div>

<div class="row to-member-cards">
<div class="card-container to-member-cards">
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of creating card-container class you could have given some styles to to-member-cards

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.

3 participants