From 6857f1226ccb4310cf1b6f3f3ba2083c2d0699ff Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Mon, 18 May 2026 17:18:59 -0400 Subject: [PATCH] =?UTF-8?q?refactor(idaa):=20compact=20filter=20bar=20?= =?UTF-8?q?=E2=80=94=20sr-only=20labels,=20+/-=20stepper=20for=20max=20res?= =?UTF-8?q?ults?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Group labels (Location, Type, Sort, Max) moved to sr-only — visually hidden, accessible to screen readers. Chips are self-descriptive without them. - Max results chips replaced with a [−] 150 [+] stepper that steps through predefined values [25, 50, 100, 150] (+ 200/500 for trusted_access). Minus/plus buttons disable at the ends of the list. limit_steps and limit_idx computed as $derived in script so onclick closures have access without @const gymnastics. Co-Authored-By: Claude Sonnet 4.6 --- .../ae_idaa_comp__event_obj_qry.svelte | 75 ++++++++++--------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_qry.svelte b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_qry.svelte index d8ae3ec7..71ba2ee3 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_qry.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_qry.svelte @@ -37,6 +37,14 @@ import Help_tech from '$lib/app_components/e_app_help_tech.svelte'; let ae_promises: key_val = $state({}); +// Predefined limit steps for the +/- stepper. Trusted staff get larger options +// since they often query with disabled/hidden meetings included. +let limit_steps = $derived($ae_loc.trusted_access ? [25, 50, 100, 150, 200, 500] : [25, 50, 100, 150]); +let limit_idx = $derived.by(() => { + const idx = limit_steps.indexOf($idaa_loc.recovery_meetings.qry__limit); + return idx >= 0 ? idx : limit_steps.length - 1; +}); + // *** Functions and Logic /** * Reactive Search Trigger @@ -184,7 +192,7 @@ function set_sort_mode(mode: string) {
- Location: + Location: - {/each} - {#if $ae_loc.trusted_access} - {#each [200, 500] as n} - {@const active = $idaa_loc.recovery_meetings.qry__limit === n} - - {/each} - {/if} + +
+ Max results: + + + {$idaa_loc.recovery_meetings.qry__limit} + +