From 35b329e235ea1c54bca615fe6040d28af0fb3c3b Mon Sep 17 00:00:00 2001 From: rockdrigo Date: Mon, 9 Nov 2026 18:23:00 -0600 Subject: [PATCH] style(indicadores): general filters as one compact row, like the Seguimiento form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit How: the period editor puts Intervalo de análisis, Periodo seleccionado, Aplicar and the "Hay cambios sin aplicar" notice on one row, with Material density -4 (mat.theme((density: -4)) scoped to the component), and folds the applied filter and the availability hint into one small line under it. The "Selección en edición" and "Sin cambios pendientes" lines are gone: the selectors already show the draft, and the notice only appears when there is something pending. The section has less padding, a smaller title and a one-line description per domain. Implications: purely presentational; the filter state, the apply rules and the requests don't change, and every spec passes unchanged. The density applies only inside the period editor, so other form fields keep the global density. --- .../indicadores/indicador-period-filters.html | 9 ++---- .../indicadores/indicador-period-filters.scss | 28 +++++++++---------- .../indicadores/indicadores-page.html | 2 +- .../indicadores/indicadores-page.scss | 4 ++- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/app/features/indicadores/indicador-period-filters.html b/src/app/features/indicadores/indicador-period-filters.html index f8f4f77..2d683e3 100644 --- a/src/app/features/indicadores/indicador-period-filters.html +++ b/src/app/features/indicadores/indicador-period-filters.html @@ -14,9 +14,11 @@ @for (period of unavailableSelection; track period) { {{ period }}, disponibilidad no confirmada } } - {{ availability ? 'Existe reporte en al menos un indicador del dominio; la cobertura puede variar.' : 'Disponibilidad desconocida hasta consultar.' }} + + @if (hasPending) { Hay cambios sin aplicar. } +

Filtro general aplicado: {{ appliedSummary }}. {{ availability ? 'Existe reporte en al menos un indicador del dominio.' : 'Disponibilidad desconocida hasta consultar.' }}

@if (availability) { @if (availability.status === 'loading') {

Consultando periodos disponibles…

} @else if (availability.status === 'error') { @@ -43,10 +45,5 @@ } @if (error) { } -

Selección en edición: {{ summary }}

@if (!canApply) {

Selecciona un periodo válido para aplicar.

} -@if (!hasPending) {

Sin cambios pendientes.

} -@if (hasPending) {

Hay cambios sin aplicar.

} - -

Filtro general aplicado: {{ appliedSummary }}

diff --git a/src/app/features/indicadores/indicador-period-filters.scss b/src/app/features/indicadores/indicador-period-filters.scss index ed8f559..68e3c1b 100644 --- a/src/app/features/indicadores/indicador-period-filters.scss +++ b/src/app/features/indicadores/indicador-period-filters.scss @@ -1,19 +1,19 @@ -:host { display: block; min-width: 0; margin: var(--issste-space-4) 0; } +@use '@angular/material' as mat; + +// One compact row, like the Seguimiento form: the two selectors, Aplicar and the pending notice. +:host { display: block; min-width: 0; @include mat.theme((density: -4)); } section { min-width: 0; } -.fields { display: flex; flex-wrap: wrap; align-items: start; gap: var(--issste-space-3); } -mat-form-field { flex: 1 1 14rem; min-width: 0; max-width: 24rem; } -.period-builder mat-form-field { flex: 0 1 10rem; } -.period-builder button { margin-top: var(--issste-space-2); min-height: 44px; } -p { overflow-wrap: anywhere; line-height: 1.5; margin: var(--issste-space-3) 0; } -.select-value { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; } -.filter-help, .applied-summary { color: var(--issste-text-secondary); font: var(--mat-sys-body-small); } -.draft-summary { font-weight: 500; } -.pending { border-left: 3px solid var(--issste-text); padding-left: var(--issste-space-3); } +.fields { display: flex; flex-wrap: wrap; align-items: center; gap: var(--issste-space-3); } +mat-form-field { flex: 0 1 14rem; min-width: 0; } +.period-builder mat-form-field { flex: 0 1 9rem; } +.period-builder button { min-height: 40px; } +p { overflow-wrap: anywhere; line-height: 1.4; margin: var(--issste-space-2) 0 0; font: var(--mat-sys-body-small); } +.select-value { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; } +.filter-help, .applied-summary { color: var(--issste-text-secondary); } +.pending { color: var(--issste-text); font: var(--mat-sys-body-small); border-left: 3px solid var(--issste-accent); padding-left: var(--issste-space-2); } .error { color: var(--mat-sys-error); } .remove { display: flex; flex-wrap: wrap; gap: var(--issste-space-2); } -.remove button { min-height: 44px; } -.apply-button { min-height: 44px; margin-top: var(--issste-space-2); } +.apply-button { min-height: 40px; } @media (max-width: 550px) { - mat-form-field, .period-builder mat-form-field { flex: 1 1 100%; max-width: none; } - .period-builder button { margin-top: 0; } + mat-form-field, .period-builder mat-form-field { flex: 1 1 100%; } } diff --git a/src/app/features/indicadores/indicadores-page.html b/src/app/features/indicadores/indicadores-page.html index da700e0..8f57ef6 100644 --- a/src/app/features/indicadores/indicadores-page.html +++ b/src/app/features/indicadores/indicadores-page.html @@ -23,7 +23,7 @@ @if (!catalogLoading() && filters; as state) {

Filtros generales de {{ domainLabels[dominio] }}

-

{{ dominio === 'cacu' ? 'La selección se aplica a los indicadores de oportunidad y las gráficas, salvo las que indican selección independiente: Todos con reporte.' : 'La selección aplicada se comparte entre las figuras y los indicadores destacados de este proyecto.' }}

+

{{ dominio === 'tea' ? 'Se aplica a las figuras y los indicadores destacados.' : 'Se aplica a los indicadores de oportunidad y las gráficas, salvo las de selección independiente.' }}

diff --git a/src/app/features/indicadores/indicadores-page.scss b/src/app/features/indicadores/indicadores-page.scss index d3c3c38..7e54a38 100644 --- a/src/app/features/indicadores/indicadores-page.scss +++ b/src/app/features/indicadores/indicadores-page.scss @@ -32,7 +32,9 @@ header p { color: var(--mat-sys-on-surface-variant); margin-bottom: 1.5rem; } h1 { font-size: var(--mat-sys-headline-medium-size); line-height: var(--mat-sys-headline-medium-line-height); } } -.global-filters { margin-block: var(--issste-space-6); padding: clamp(.75rem, 2vw, 1.5rem); border: 1px solid var(--issste-border); border-radius: var(--issste-radius); background: var(--issste-surface); min-width: 0; } +.global-filters { margin-block: var(--issste-space-4); padding: var(--issste-space-3) var(--issste-space-4); border: 1px solid var(--issste-border); border-radius: var(--issste-radius); background: var(--issste-surface); min-width: 0; } +.global-filters .section-title { font-size: 1rem; } +.global-filters .section-description { margin: var(--issste-space-1) 0 var(--issste-space-2); font: var(--mat-sys-body-small); } @container dashboard (min-width: 1000px) { .kpi-grid { grid-template-columns: repeat(min(3, var(--kpi-count)), minmax(0, 1fr)); } }