feat(badges): search filter polish and result limit stepper
- Replace show_hidden checkbox with visibility_filter select (Default / Show Hidden / Show Disabled+Hidden) — collapses two orphaned boolean fields (show_hidden, show_not_enabled) into one purpose-built value; wires disabled-badge filter through to both IDB and API paths - Add max-results stepper (edit mode only): steps of 25 up to 250, steps of 100 up to 2550; tier-capped (trusted=250, manager=2550); stepper uses pure reactivity — no handle_search_trigger() call needed - Fix fallback liveQuery (SCENARIO 2): was hardcoded .limit(50); now reads qry_result_limit in outer $derived.by so Svelte tracks it and stepper updates the no-text browse list immediately - Fix Search button disabled state: replace pointer-events-none + class:opacity-50 with HTML disabled attribute + disabled:cursor-not-allowed so hover cursor reflects disabled state correctly - Global placeholder fix (app.css): add italic + opacity-0.6 rule for .input/.textarea ::placeholder in light mode; add italic to dark rule — prevents placeholder text from reading as typed content Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -97,8 +97,8 @@ export const default_trusted_can_edit: string[] = [
|
||||
// ---------------------------------------------------------------------------
|
||||
export interface BadgesLocState {
|
||||
auto_view: boolean;
|
||||
show_hidden: boolean;
|
||||
show_not_enabled: boolean;
|
||||
// 'default' = hide hidden+disabled | 'show_hidden' = show hidden | 'show_all' = show hidden+disabled
|
||||
visibility_filter: 'default' | 'show_hidden' | 'show_all';
|
||||
show_printed: boolean;
|
||||
allow_reprint: boolean;
|
||||
show_element__cfg: boolean;
|
||||
@@ -110,6 +110,7 @@ export interface BadgesLocState {
|
||||
qry_printed_status: string; // 'all' | 'printed' | 'not_printed'
|
||||
qry_affiliations: string | null;
|
||||
qry_sort_order: string;
|
||||
qry_result_limit: number; // UI override for max results (edit mode only; tier max enforced by stepper)
|
||||
status_qry__search: string | null;
|
||||
use_id_li: boolean;
|
||||
search_status: string | null;
|
||||
@@ -158,8 +159,7 @@ export interface BadgesSessState {
|
||||
export const badges_loc_defaults: BadgesLocState = {
|
||||
auto_view: true,
|
||||
|
||||
show_hidden: false, // Hidden (archived) badges are excluded from the main list.
|
||||
show_not_enabled: false,
|
||||
visibility_filter: 'default', // 'default' | 'show_hidden' | 'show_all'
|
||||
|
||||
show_printed: false,
|
||||
allow_reprint: false,
|
||||
@@ -178,6 +178,7 @@ export const badges_loc_defaults: BadgesLocState = {
|
||||
qry_printed_status: 'all', // 'all' | 'printed' | 'not_printed'
|
||||
qry_affiliations: null, // null = no affiliation filter
|
||||
qry_sort_order: '', // '' = default sort order
|
||||
qry_result_limit: 25,
|
||||
|
||||
status_qry__search: null,
|
||||
use_id_li: true,
|
||||
|
||||
Reference in New Issue
Block a user