fix(ui): disable Create/Submit buttons for empty required fields #93
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_archipelagos!93
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_ui_required_field_validation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fix three islands whose primary Create/Submit buttons stayed enabled when required fields were empty, producing a silent no-op on click. Mirrors the Contacts validation pattern from lhumina_code/hero_os#50.
Related issue
Closes lhumina_code/hero_os#68
Changes
archipelagos/system/contexts/src/views/create_form.rs— removepointer-events: nonediv wrapper that silently swallowed clicks; applydisabled: !can_submitdirectly on the sharedButton; switch variant toSecondarywhen disabled; invert inner onclick guard to an early return; tightencan_submitwithtrim().archipelagos/communication/room/src/views/room_card.rs— tightencan_savewithtrim().is_empty()so whitespace-only counts as empty (button already gated viadisabled: !can_save).archipelagos/productivity/tasks/src/views/new_task_view.rs— tightencan_submitwithtrim().is_empty()(button already gated viadisabled: !can_submit).All three now rely on the shared
hero_archipelagos_core::Buttondisabled handling: whendisabledis true the component applies thehero-btn-disabledCSS class (opacity: 0.5; cursor: not-allowed; pointer-events: none) and its internal onclick gate early-returns — so disabled buttons cannot fire actions.Test results
cargo check -p hero_archipelagos_contexts,-p hero_archipelagos_room,-p hero_archipelagos_tasks: all pass.cargo testfor each crate: no unit tests defined, vacuous pass.cargo checkhas pre-existing, unrelated failures inhero_archipelagos_knowledgeandhero_archipelagos_messaging(upstream SDK drift) — not introduced by this branch.make runhero_os):hero-btn-disabledclass applied and click does not register when required fields are empty.island-roomis not compiled into the currentwebWASM build (routes through thehero_livekitiframe instead), so runtime verification pending a build that includes the island.