fix(mobile): optimize mobile UI/UX for UdeCi chatbot and dashboard (v3.8.30)
This commit is contained in:
@@ -11,6 +11,22 @@ El formato está basado en [Keep a Changelog](https://keepachangelog.com/es-ES/1
|
||||
- **Sincronización Continua Moodle (Fase 6):** Automatización de workers persistentes en background para el procesamiento continuo de la cola de Web Services Moodle 4.1.
|
||||
- **Pruebas de Carga y Hardening (Fase 6):** Pruebas de estrés de concurrencia y validación final de producción.
|
||||
|
||||
## [3.8.30] - 2026-10-27
|
||||
### Fixed & Enhanced (Optimización de UI/UX Mobile para Chatbot UdeCi y Dashboard)
|
||||
- **Experiencia de Usuario de UdeCi en Dispositivos Móviles**:
|
||||
- El panel conversacional se transforma en un modal/hoja de pantalla completa (`100dvh`, `position: fixed; inset: 0`) en pantallas `<= 768px`, eliminando desbordes y superposiciones.
|
||||
- Ocultamiento automático del botón lanzador (`#aiChatLauncher.chat-open`) mientras el chat está abierto para liberar espacio útil.
|
||||
- Bloqueo de scroll del fondo (`body.ai-chat-mobile-open`) mientras el chat está activo, restaurándose automáticamente al cerrar o presionar `Escape`.
|
||||
- Configurado `font-size: 16px` en el área de texto de entrada para anular el molesto auto-zoom de iOS Safari.
|
||||
- Espaciado seguro para la barra de navegación de móviles con `env(safe-area-inset-bottom)`.
|
||||
- Auto-minimizado del chat al disparar un paso de asistencia guiada (*Walkthrough*), permitiendo ver el elemento iluminado en pantalla de inmediato.
|
||||
- **Armonización y Corrección del Dashboard en Móviles**:
|
||||
- Eliminada la regla global perjudicial que forzaba a `.btn-group` a apilarse verticalmente en columnas con márgenes desmedidos.
|
||||
- Convertidos los selectores de período y vistas (`#bedeliaPctPeriodSwitcher`, `#adminPctPeriodSwitcher`, `#bedeliaScheduleSwitcher`, `#commFilterPeriodSwitcher`, `#classFilterPeriodSwitcher`) en controles segmentados con desplazamiento horizontal táctil suave (`-webkit-overflow-scrolling: touch;`).
|
||||
- Rediseñadas las pestañas de estado de comisiones y aulas (`#commStatusPills`, `#classStatusPills`) como tarjetas táctiles de ancho completo con recuentos alineados.
|
||||
- Proporciones compactas y tipografía responsiva para las tarjetas de KPIs en el Dashboard, reduciendo la altura vertical y facilitando la visualización inmediata.
|
||||
- Adaptación de leyendas de gráficos circulares para evitar truncamientos y desbordes en pantallas estrechas.
|
||||
|
||||
## [3.8.29] - 2026-10-27
|
||||
### Fixed & Enhanced (Personalización por Usuario, Nombres Reales de UI, Roles Exclusivos y Spotlight Dinámico)
|
||||
- **Personalización y Saludo con Nombre Real del Usuario**:
|
||||
|
||||
@@ -9,13 +9,12 @@ Memoria del proyecto entre sesiones para la rama `dev`.
|
||||
- Libro de Calificaciones (*Gradebook*) con actas de regularidad inmutables.
|
||||
- Autenticación híbrida (Google OAuth 2.0, Moodle SSO, Local) y Modo Impersonación.
|
||||
- Reinicialización segura del sistema con contraseña de Administrador.
|
||||
- **Sprint Activo: Personalización por Usuario, Nombres Fidedignos de UI, Roles Exclusivos y Spotlight Dinámico — SDD-011 (v3.8.29)**:
|
||||
- **Identidad y Saludo Personalizado**: Inyección de `data-user-name` desde la sesión de Nunjucks al widget frontend; UdeCi saluda y se dirige al usuario por su nombre real (`user_name`).
|
||||
- **Diferenciación Estricta de Perfiles (`admin`, `bedelia`, `docente`, `alumno`)**: El rol `admin` ya no colapsa en `bedelia`; cuenta con su propio árbol de navegación ("Gobierno & Sistema", "Usuarios", "Roles RBAC", "Config. Global", "Integración IA").
|
||||
- **Sincronización Terminológica con la UI**: Nombres de botones y menús alineados a las vistas reales (`Menú lateral ➔ Espacios & Sedes ➔ Sedes / Edificios`, botón `Nuevo Edificio`, botón `Agregar Aula Física`).
|
||||
- **Motor de Spotlight & Walkthrough Mejorado (`walkthrough-engine.js`)**: Auto-despliegue de menús colapsados (`revealElementIfHidden`) para enfocar elementos aún cuando se encuentren dentro de submenús plegados de Bootstrap o en modo móvil.
|
||||
- **Calidad y Seguridad Verificadas**: Suite de backend 100% aprobada (104/104 tests), suite de seguridad `security_audit.bat` superada con estatus PASS.
|
||||
- **Versión Consolidada**: `v3.8.29`.
|
||||
- **Sprint Activo: Optimización Integral de UI/UX Mobile para UdeCi y Dashboard — SDD-011 (v3.8.30)**:
|
||||
- **UdeCi Mobile Modal Full-Screen**: En pantallas `<= 768px`, el chat se despliega como pantalla completa app-like (`100dvh`), ocultando el lanzador flotante para maximizar espacio útil y bloqueando el scroll de fondo (`body.ai-chat-mobile-open`).
|
||||
- **iOS Safari Touch Ready**: Input fijado a `font-size: 16px` para impedir auto-zoom involuntario; safe area inset padding para el home bar de iPhone; touch targets de 32px+ en opciones interactivas.
|
||||
- **Soporte Walkthrough Mobile**: Auto-minimizado de UdeCi en móvil al activar un paso guiado para que el usuario visualice el botón o elemento iluminado de forma inmediata.
|
||||
- **Corrección Estructural del Dashboard Mobile**: Eliminada la regla que forzaba a `.btn-group` a apilarse verticalmente en columnas. Segmented controls con scroll horizontal suave (`-webkit-overflow-scrolling: touch;`), pestañas de comisiones y aulas en tarjetas táctiles verticales de ancho completo y KPIs visualmente balanceados.
|
||||
- **Versión Consolidada**: `v3.8.30`.
|
||||
|
||||
## Decisiones (y por qué)
|
||||
- **Flujo Secuencial de Bedelía (9 Pasos)**: Estandarizar la carga operativa en: 1) Sede -> 2) Aula -> 3) Ciclo Lectivo -> 4) Carrera -> 5) Materia (vinculada a Carrera) -> 6) Comisión (asociada a Materia, Carrera y Ciclo) -> 7) Profesores -> 8) Alumnos -> 9) Reserva de Espacio. Esto asegura consistencia e integridad relacional.
|
||||
|
||||
@@ -7,7 +7,7 @@ from typing import Any
|
||||
from database import db, get_db, engine, SessionLocal, session
|
||||
from config.config import Config
|
||||
|
||||
__version__ = "3.8.29"
|
||||
__version__ = "3.8.30"
|
||||
|
||||
class DummyContext:
|
||||
def __enter__(self):
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name="edu-space-admin",
|
||||
version="3.8.29",
|
||||
version="3.8.30",
|
||||
description="Administrative interface for Edu-Space Classroom Management System (FastAPI ASGI Core)",
|
||||
author="Edu-Space Development Team",
|
||||
author_email="admin@edu-space.com",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"version": "3.8.29",
|
||||
"version": "3.8.30",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -143,18 +143,132 @@
|
||||
border-color: rgba(30, 77, 140, 0.3) !important;
|
||||
}
|
||||
|
||||
/* Mobile Responsiveness */
|
||||
/* Mobile Responsiveness & Dashboard Optimization */
|
||||
@media (max-width: 768px) {
|
||||
.card {
|
||||
margin-bottom: 1rem;
|
||||
margin-bottom: 0.85rem;
|
||||
}
|
||||
|
||||
/* NO forzar flex-direction: column en .btn-group general para preservar segmented controls */
|
||||
.btn-group {
|
||||
flex-direction: column;
|
||||
flex-direction: row;
|
||||
}
|
||||
.btn-group .btn {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.btn-group .btn {
|
||||
margin-bottom: 0.5rem;
|
||||
/* Switchers y grupos de botones en cabeceras de tarjeta en móviles:
|
||||
Permite deslizamiento táctil horizontal fluido sin desbordar ni amontonar */
|
||||
.card-header .btn-group,
|
||||
.btn-group-mobile-scroll {
|
||||
display: inline-flex !important;
|
||||
flex-direction: row !important;
|
||||
flex-wrap: nowrap !important;
|
||||
overflow-x: auto !important;
|
||||
-webkit-overflow-scrolling: touch !important;
|
||||
max-width: 100% !important;
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
border-radius: 8px !important;
|
||||
}
|
||||
.card-header .btn-group::-webkit-scrollbar,
|
||||
.btn-group-mobile-scroll::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
.card-header .btn-group .btn,
|
||||
.btn-group-mobile-scroll .btn {
|
||||
white-space: nowrap !important;
|
||||
flex-shrink: 0 !important;
|
||||
padding: 0.35rem 0.65rem !important;
|
||||
font-size: 0.76rem !important;
|
||||
}
|
||||
|
||||
/* Dashboard Role Hero Banner en móvil */
|
||||
.dashboard-role-banner {
|
||||
padding: 0.85rem 1rem !important;
|
||||
border-radius: 0.85rem !important;
|
||||
margin-bottom: 0.85rem !important;
|
||||
}
|
||||
.dashboard-role-banner h1 {
|
||||
font-size: 1.25rem !important;
|
||||
}
|
||||
.dashboard-role-banner p {
|
||||
font-size: 0.8rem !important;
|
||||
}
|
||||
|
||||
/* KPI Cards en Dashboard: compactas, legibles y proporcionadas */
|
||||
.dashboard-stat-card .card-body {
|
||||
padding: 0.85rem 1rem !important;
|
||||
}
|
||||
.dashboard-stat-card h2 {
|
||||
font-size: 1.6rem !important;
|
||||
}
|
||||
.dashboard-stat-card h3 {
|
||||
font-size: 1.3rem !important;
|
||||
}
|
||||
.dashboard-stat-card .fs-3,
|
||||
.dashboard-stat-card .fs-4 {
|
||||
font-size: 1.35rem !important;
|
||||
}
|
||||
|
||||
/* Pestañas de estado (Comisiones y Aulas) en móviles */
|
||||
#commStatusPills,
|
||||
#classStatusPills {
|
||||
width: 100% !important;
|
||||
display: flex !important;
|
||||
flex-direction: column !important;
|
||||
gap: 6px !important;
|
||||
}
|
||||
#commStatusPills .nav-link,
|
||||
#classStatusPills .nav-link {
|
||||
width: 100% !important;
|
||||
text-align: left !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: space-between !important;
|
||||
font-size: 0.8rem !important;
|
||||
padding: 0.45rem 0.75rem !important;
|
||||
}
|
||||
|
||||
/* Filtros de selección (ej. Carrera) en móvil */
|
||||
#commCareerFilter,
|
||||
#classFloorFilter {
|
||||
min-width: 0 !important;
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
/* Leyendas de Gráficos Pie en móvil */
|
||||
.chart-legend-mobile,
|
||||
.card-body .d-flex.justify-content-around.text-center.small.pt-2.border-top {
|
||||
flex-direction: column !important;
|
||||
align-items: center !important;
|
||||
gap: 4px !important;
|
||||
padding-top: 0.5rem !important;
|
||||
}
|
||||
|
||||
/* Tablas de la cartelera y comisiones */
|
||||
.table-responsive {
|
||||
border-radius: 0 0 0.5rem 0.5rem;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.table td, .table th {
|
||||
padding: 0.55rem 0.75rem !important;
|
||||
font-size: 0.8rem !important;
|
||||
}
|
||||
.table thead th {
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
/* Separadores verticales que se colapsan a horizontales */
|
||||
.col-md-5.border-start {
|
||||
border-left: none !important;
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
|
||||
padding-top: 1rem !important;
|
||||
margin-top: 0.5rem !important;
|
||||
}
|
||||
[data-bs-theme="dark"] .col-md-5.border-start {
|
||||
border-top-color: rgba(255, 255, 255, 0.08) !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -204,6 +204,8 @@
|
||||
if (panel && launcher) {
|
||||
panel.classList.add('d-none');
|
||||
launcher.style.transform = '';
|
||||
launcher.classList.remove('chat-open');
|
||||
document.body.classList.remove('ai-chat-mobile-open');
|
||||
}
|
||||
setTimeout(() => {
|
||||
window.WalkthroughEngine.startStep(data.guide_step);
|
||||
@@ -236,28 +238,45 @@
|
||||
const role = getUserRole();
|
||||
const name = getUserName();
|
||||
|
||||
function openChat() {
|
||||
panel.classList.remove('d-none');
|
||||
launcher.style.transform = 'scale(0.9)';
|
||||
launcher.classList.add('chat-open');
|
||||
if (window.innerWidth <= 768) {
|
||||
document.body.classList.add('ai-chat-mobile-open');
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (textarea) textarea.focus();
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function closeChat() {
|
||||
panel.classList.add('d-none');
|
||||
launcher.style.transform = '';
|
||||
launcher.classList.remove('chat-open');
|
||||
document.body.classList.remove('ai-chat-mobile-open');
|
||||
}
|
||||
|
||||
// Toggle panel
|
||||
launcher.addEventListener('click', () => {
|
||||
const isHidden = panel.classList.contains('d-none');
|
||||
if (isHidden) {
|
||||
panel.classList.remove('d-none');
|
||||
launcher.style.transform = 'scale(0.9)';
|
||||
setTimeout(() => {
|
||||
if (textarea) textarea.focus();
|
||||
}, 100);
|
||||
openChat();
|
||||
} else {
|
||||
panel.classList.add('d-none');
|
||||
launcher.style.transform = '';
|
||||
closeChat();
|
||||
}
|
||||
});
|
||||
|
||||
if (closeBtn) {
|
||||
closeBtn.addEventListener('click', () => {
|
||||
panel.classList.add('d-none');
|
||||
launcher.style.transform = '';
|
||||
});
|
||||
closeBtn.addEventListener('click', closeChat);
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && panel && !panel.classList.contains('d-none')) {
|
||||
closeChat();
|
||||
}
|
||||
});
|
||||
|
||||
// Reiniciar conversación del usuario actual
|
||||
if (clearBtn) {
|
||||
clearBtn.addEventListener('click', () => {
|
||||
|
||||
+3
-3
@@ -86,9 +86,9 @@ const env = nunjucks.configure(path.join(__dirname, '../views'), {
|
||||
});
|
||||
|
||||
// Versiones institucionales del sistema
|
||||
const APP_VERSION = '3.8.29';
|
||||
const FRONTEND_VERSION = '3.8.29';
|
||||
const BACKEND_VERSION = '3.8.29';
|
||||
const APP_VERSION = '3.8.30';
|
||||
const FRONTEND_VERSION = '3.8.30';
|
||||
const BACKEND_VERSION = '3.8.30';
|
||||
|
||||
env.addGlobal('app_version', APP_VERSION);
|
||||
env.addGlobal('frontend_version', FRONTEND_VERSION);
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
<button type="button" class="btn btn-sm btn-outline-light border-0 py-1 px-2" id="aiChatClearBtn" title="Reiniciar chat">
|
||||
<i class="bi bi-arrow-clockwise"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-light border-0 py-1 px-2" id="aiChatCloseBtn" title="Minimizar">
|
||||
<i class="bi bi-dash-lg"></i>
|
||||
<button type="button" class="btn btn-sm btn-outline-light border-0 py-1 px-2" id="aiChatCloseBtn" title="Cerrar">
|
||||
<i class="bi bi-x-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -333,15 +333,64 @@
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
@media (max-width: 768px) {
|
||||
.ai-chat-container {
|
||||
bottom: 16px;
|
||||
right: 16px;
|
||||
z-index: 1070;
|
||||
}
|
||||
.ai-chat-launcher {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
}
|
||||
.ai-chat-launcher.chat-open {
|
||||
display: none !important;
|
||||
}
|
||||
.ai-chat-panel {
|
||||
width: calc(100vw - 32px);
|
||||
height: calc(100vh - 110px);
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
right: 0 !important;
|
||||
bottom: 0 !important;
|
||||
width: 100vw !important;
|
||||
max-width: 100vw !important;
|
||||
height: 100dvh !important;
|
||||
max-height: 100dvh !important;
|
||||
border-radius: 0 !important;
|
||||
z-index: 1080 !important;
|
||||
box-shadow: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.ai-chat-header {
|
||||
border-radius: 0 !important;
|
||||
padding: 0.75rem 1rem !important;
|
||||
}
|
||||
.ai-chat-messages {
|
||||
padding: 0.85rem !important;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.ai-msg {
|
||||
max-width: 90% !important;
|
||||
font-size: 0.88rem !important;
|
||||
}
|
||||
.ai-option-btn {
|
||||
font-size: 0.78rem !important;
|
||||
padding: 6px 12px !important;
|
||||
min-height: 32px;
|
||||
}
|
||||
.ai-chat-footer {
|
||||
padding: 0.65rem 0.85rem !important;
|
||||
padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0px)) !important;
|
||||
}
|
||||
.ai-chat-textarea {
|
||||
font-size: 16px !important; /* Previene el auto-zoom involuntario en Safari iOS */
|
||||
padding: 8px 12px !important;
|
||||
}
|
||||
}
|
||||
|
||||
body.ai-chat-mobile-open {
|
||||
overflow: hidden !important;
|
||||
touch-action: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user