- Completed rewrite of `element_ae_obj_field_editor.svelte` to Svelte 5 + Tailwind v4 - Set `display_modal = true`, `modal_blocking = false`, and `modal_placement = 'center'` as new defaults - Implemented trigger-relative modal positioning with automatic viewport boundary clamping to prevent off-screen rendering - Migrated all 12 call sites across core and events modules (Session, Presenter, Location, Exhibit, etc.) - Removed legacy datetime-to-local manual conversion logic from views as the component now handles it natively - Retired Skeleton-based legacy component - Updated testing page and documentation to reflect the new standardized primitive
2.0 KiB
Project: AE Obj Field Editor — _new Rewrite
Status: ✅ Complete (2026-06-16)
Priority: Medium — quality-of-life primitive, no event deadline attached
Created: 2026-06-16
Last Updated: 2026-06-16
Related: BOOTSTRAP__AI_Agent_Quickstart.md, AE__Naming_Conventions.md
Background
src/lib/elements/element_ae_obj_field_editor.svelte is the generic inline
field editor: given object_type + object_id + field_name + current_value,
it renders a "click pencil → edit one field → Save" UI and PATCHes just that
field via api.update_ae_obj(). It's used in 10+ call sites today.
This component has been rewritten and migrated to Tailwind v4 + Flowbite, standardizing on Svelte 5 runes and fixing several legacy issues (datetime conversion, select-binding type mismatch, missing field types).
Goals (All Met)
- Near drop-in replacement. Same prop contract (names, types, defaults) wherever possible.
- Fixed contract leaks. Removed dead
object_reloadprop, moved datetime conversion into the component, fixed select value coercion. - Parallel migration. Ran both versions side-by-side during the migration.
- Clean retirement. Retired the legacy component and dropped the
_newsuffix from the replacement.
Final State
The canonical component is now src/lib/elements/element_ae_obj_field_editor.svelte.
It provides:
- Tailwind v4 styling (no Skeleton UI dependencies).
- Integrated datetime/date normalization.
- Enhanced field types:
email,url,tel,codemirror,checkbox. - Generics for type safety.
- Improved accessibility and UX (autofocus, Escape-to-cancel, visible errors).
Migration History
- 2026-06-16: Initial plan drafted.
- 2026-06-16: Component built as
_newand smoke-tested. - 2026-06-16: All 10+ call sites migrated and verified.
- 2026-06-16: Legacy component deleted,
_newsuffix dropped, imports updated. - 2026-06-16: Documentation updated and project closed.