Skip to content

Hotfix/189 wrong label on login page#190

Merged
jllanosg merged 2 commits intomainfrom
hotfix/189-wrong-label-on-login-page
Feb 3, 2025
Merged

Hotfix/189 wrong label on login page#190
jllanosg merged 2 commits intomainfrom
hotfix/189-wrong-label-on-login-page

Conversation

@jllanosg
Copy link
Copy Markdown
Collaborator

@jllanosg jllanosg commented Feb 3, 2025

Descripción

Estaba malo el label del login, decía email y debe decir username. También cambié el color de la letra en /register para que haya mejor contraste.

Motivación y Contexto

UI/UX

¿Cómo ha sido probado?

Logear, verificando que el label corresponda.

Capturas de pantalla (si es apropiado):

Tipos de cambios

  • Bugfix (cambio que no interrumpe el funcionamiento y que soluciona un problema)
  • New feature (cambio que no interrumpe el funcionamiento y que añade funcionalidad)
  • Breaking change (corrección o funcionalidad que podría causar que la funcionalidad existente cambie)

Lista de verificación:

  • Mi código sigue el estilo de código de este proyecto.
  • Mi cambio requiere una modificación en la documentación.
  • He actualizado la documentación en consecuencia.
  • Requiere nuevos tests.

Summary by CodeRabbit

  • Nuevas Funcionalidades
    • El proceso de inicio de sesión se ha actualizado para utilizar nombre de usuario en lugar de correo electrónico, ajustándose los campos de entrada y la gestión de estado.
  • Estilo
    • El encabezado de la página de registro ahora muestra el texto en blanco para mejorar su visibilidad.

@jllanosg jllanosg linked an issue Feb 3, 2025 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 3, 2025

📝 Walkthrough

Walkthrough

Se han realizado modificaciones en el proceso de inicio de sesión y en el componente de registro. En los archivos relacionados con el login se ha sustituido el uso de la variable "email" por "username" en la obtención de datos y en el manejo del estado, ajustando tanto el formulario como la lógica de autenticación. Además, se ha actualizado el estilo del encabezado en el componente de registro para mostrar el texto en color blanco, sin alterar la funcionalidad base ni el flujo de error en ambas funcionalidades.

Changes

Archivo Cambios
frontend/src/components/login/LoginForm.tsx, frontend/src/routes/login.tsx Reemplazo de la variable y parámetro "email" por "username" en el inicio de sesión, actualizando el DOM, funciones y el estado del componente SimpleInput.
frontend/src/routes/register.tsx Actualización del estilo del encabezado <h1> añadiendo la clase text-white para modificar la presentación visual.

Sequence Diagram(s)

sequenceDiagram
    participant U as Usuario
    participant LF as LoginForm
    participant API as Backend
    U->>LF: Envía username y password
    LF->>LF: Recupera "username" del DOM
    LF->>API: Llama a login(username, password)
    API-->>LF: Responde autenticación
    LF-->>U: Muestra resultado o error
Loading

Possibly related PRs

Suggested reviewers

  • Icksir
  • massi-ponce
  • Sealra

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jllanosg jllanosg self-assigned this Feb 3, 2025
@jllanosg jllanosg added the bug Something isn't working label Feb 3, 2025
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 3, 2025

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
frontend/src/routes/login.tsx (1)

55-64: ¡Mejora necesaria en la configuración del Toaster!

La configuración actual del Toaster utiliza clases de color fijas. Sería más mantenible utilizar variables de tema o constantes para estos colores.

Considera aplicar este cambio:

  toastOptions={{
    classNames: {
-     error: 'bg-red-400 text-white',
-     success: 'bg-green-400 text-white',
-     warning: 'bg-yellow-400 text-white',
-     info: 'bg-blue-400 text-white',
+     error: 'bg-error-400 text-white',
+     success: 'bg-success-400 text-white',
+     warning: 'bg-warning-400 text-white',
+     info: 'bg-info-400 text-white',
    },
  }}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cc24c85 and 7d7ae73.

📒 Files selected for processing (3)
  • frontend/src/components/login/LoginForm.tsx (1 hunks)
  • frontend/src/routes/login.tsx (2 hunks)
  • frontend/src/routes/register.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • frontend/src/routes/register.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
frontend/src/components/login/LoginForm.tsx (1)

17-17: ¡Los cambios son correctos pero necesitan verificación adicional!

La modificación del campo de email a username está implementada correctamente en el formulario de login. Sin embargo, es crucial verificar que estos cambios estén sincronizados con el backend para evitar fallos de autenticación.

Also applies to: 20-20

✅ Verification successful

Verificación exitosa del cambio del campo de email a username

  • Se encontró en frontend/src/components/login/LoginForm.tsx que la llamada a login utiliza username en lugar de email.
  • En frontend/src/hooks/useAuth.tsx se confirma que el backend espera recibir username, junto con password y totp.
  • Los cambios están correctamente implementados y sincronizados entre el frontend y el backend.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verificar que el backend espera 'username' en lugar de 'email'
rg -A 5 "login.*username.*password" --type ts --type js --type py

Length of output: 952

frontend/src/routes/login.tsx (1)

16-16: ¡La implementación está incompleta!

Has realizado correctamente el cambio de email a username, pero hay aspectos importantes que debes abordar:

  1. No has actualizado las pruebas unitarias para reflejar este cambio.
  2. Falta documentar este cambio en la interfaz de usuario para los usuarios finales.
  3. Es necesario verificar que las traducciones para 'username' existan en todos los idiomas soportados.

Also applies to: 30-38

@jllanosg jllanosg merged commit 5ef1e77 into main Feb 3, 2025
@jllanosg jllanosg deleted the hotfix/189-wrong-label-on-login-page branch February 3, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Wrong label on login page

2 participants