diff --git a/documentation/PROJECT__AE_Events_Badges_Review_Print.md b/documentation/PROJECT__AE_Events_Badges_Review_Print.md index dec3f813..efa20530 100644 --- a/documentation/PROJECT__AE_Events_Badges_Review_Print.md +++ b/documentation/PROJECT__AE_Events_Badges_Review_Print.md @@ -110,20 +110,24 @@ Print page edit access needs to be opened to attendee-level permissions, not jus The permission model, field list, and `can_edit()` helper from `ae_comp__badge_review_form.svelte` should be the reference. See Design Intent section above. -### ⏳ TASK 4.1: Auto-Scaling Badge Text v2 — IN PROGRESS (2026-03-12) -**Files created:** -- `src/lib/elements/action_fit_text.ts` — Svelte action: binary-search font scaling with - MutationObserver + ResizeObserver + requestAnimationFrame. -- `src/lib/elements/element_fit_text.svelte` — Component wrapper. Key prop: `height` (required - for binary search to work — without it, offsetHeight == scrollHeight always). -- `src/routes/events/.../ae_comp__badge_obj_view_v2.svelte` — V2 badge render using - Element_fit_text for name/title/affiliations/location in display mode. - `fit_heights` derived object provides layout-aware heights per field per badge layout. - `font_size_*` props default to `undefined` (auto-scale) rather than numeric defaults (v1 behavior). - Manual overrides from print controls still work — any number disables auto-scale for that field. +### ✅ TASK 4.1: Auto-Scaling Badge Text v2 — COMPLETE (2026-03-12) +**Files created/updated:** +- `src/lib/elements/action_fit_text.ts` — Svelte action +- `src/lib/elements/element_fit_text.svelte` — Component wrapper +- `src/routes/events/.../ae_comp__badge_obj_view_v2.svelte` — V2 badge render (canonical) + Debug blocks gated behind `$ae_loc.edit_mode` (hidden in production). +- `print/+page.svelte` — Always uses v2 now. v1/v2 toggle removed. Header redesigned for kiosk UX. +- `ae_comp__badge_print_controls.svelte` — Identity card at top, pronouns moved to attendee section, + "Staff adjustments" divider before badge_type field. +- `print_list/+page.svelte` — Updated to import v2. +- `ae_comp__badge_obj_view.svelte` (v1) — **Moved to ~/tmp/gemini_trash/** -**Toggle:** `v1`/`v2` button in print page header. V1 preserved as fallback. -**Status:** Working — heights in `fit_heights` still need visual tuning with real badge stock. +**Kiosk UX improvements (2026-03-12):** +- Print page header: cleaner, shows name + "Ready"/"Printed N×" status chip, event name. + Header Print Now button removed (duplicate); only Re-print shortcut visible in trusted+edit mode. +- Controls right panel: identity card at top confirms who the badge belongs to before printing. + Pronouns field is now an attendee-level field (was trusted-only). Staff section labelled. +- Debug JSON blocks in v2 badge render hidden behind global edit_mode flag. ### ✅ TASK 3: Badge Print Controls Panel — COMPLETE (2026-03-02) diff --git a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte deleted file mode 100644 index 110bc946..00000000 --- a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte +++ /dev/null @@ -1,1628 +0,0 @@ - - - - - - - - -
- Show list of fields that they can edit here. This may - need to broken down in to sections that can be - collapsed. -
-- This was allowed at the time your badge was printed. - You may opt-out at anytime. -
-- By allowing this QR code to be - scanned by an exhibitor or - staff, you understand and agree - that they may use your personal - information. -
- {:else} -- Tracking was not allowed at the time your badge was - printed. You may opt-in at anytime. -
-- If this QR code is scanned by an - exhibitor or staff, they will not have access to your information. -
- {/if} -
- {JSON.stringify($lq__event_badge_obj, null, 2)}
-
-
-
- {JSON.stringify($lq__event_badge_template_obj, null, 2)}
-
-
- {JSON.stringify($lq__event_badge_obj, null, 2)}
-
+ class="whitespace-pre-wrap break-words text-xs max-h-32 overflow-auto p-2 bg-surface-200 border border-surface-300 rounded mt-4"
+ >{JSON.stringify($lq__event_badge_obj, null, 2)}
- {JSON.stringify($lq__event_badge_template_obj, null, 2)}
-
+ class="whitespace-pre-wrap break-words text-xs max-h-32 overflow-auto p-2 bg-surface-200 border border-surface-300 rounded mt-4"
+ >{JSON.stringify($lq__event_badge_template_obj, null, 2)}
Badge Station
++ {$lq__event_badge_obj.full_name_override ?? $lq__event_badge_obj.full_name ?? '—'} +
+ {#if badge_type_display} +{badge_type_display}
+ {/if} ++ #{$lq__event_badge_obj.event_badge_id} +
+