fix(usabilidad): required questions, prompt min-height, autocomplete max-width
Activa required=true en todas las preguntas excepto barrio (2.3) y secciones. El motor ya valida solo preguntas visibles — las condicionales ocultas no se validan. Elimina min-height fijo del prompt block para mejor UX mobile. Agrega max-width de seguridad al dropdown autocomplete en viewports angostos. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -295,6 +295,7 @@ body {
|
|||||||
/* position: fixed + top/left/width set by JS via getBoundingClientRect()
|
/* position: fixed + top/left/width set by JS via getBoundingClientRect()
|
||||||
so the list escapes any overflow:auto ancestor (wizard-answer-area) */
|
so the list escapes any overflow:auto ancestor (wizard-answer-area) */
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
max-width: calc(100vw - 32px);
|
||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
border: 1.5px solid var(--color-border-focus);
|
border: 1.5px solid var(--color-border-focus);
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
@@ -583,9 +584,8 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enunciado: bloque con altura reservada constante, mismo lugar pantalla tras pantalla. */
|
/* Enunciado: crece orgánicamente con el contenido, sin altura mínima fija. */
|
||||||
.wizard-prompt-block {
|
.wizard-prompt-block {
|
||||||
min-height: 116px;
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
-- Activar required en todas las preguntas del formulario de cuidadores
|
||||||
|
-- excepto barrio (2.3) y secciones (type = 'section')
|
||||||
|
UPDATE public.questions
|
||||||
|
SET required = true
|
||||||
|
WHERE survey_id = '30000000-0000-0000-0000-000000000001'
|
||||||
|
AND code != '2.3'
|
||||||
|
AND type != 'section';
|
||||||
|
|
||||||
|
-- Verificar: debe mostrar todas las preguntas con required=true excepto 2.3
|
||||||
|
SELECT code, type, required
|
||||||
|
FROM public.questions
|
||||||
|
WHERE survey_id = '30000000-0000-0000-0000-000000000001'
|
||||||
|
AND type != 'section'
|
||||||
|
ORDER BY position;
|
||||||
Reference in New Issue
Block a user