Skip to content

refactor: pass action type as bw-action-type attribute#87

Merged
ohxyz merged 2 commits into
mainfrom
refactor/pass-action-type-as-attribute
Jun 21, 2026
Merged

refactor: pass action type as bw-action-type attribute#87
ohxyz merged 2 commits into
mainfrom
refactor/pass-action-type-as-attribute

Conversation

@ohxyz

@ohxyz ohxyz commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

What

Stamp custom-action buttons with a bw-action-type HTML attribute instead of a bwActionType element expando property. transferGlass reads the attribute back to distinguish builtin actions from custom ones.

Why

A primitive string like the action type belongs in a namespaced bw- attribute on a native <button> — it's inspectable in the DOM and query/CSS-selectable. Element properties are reserved for object/reference values or grouped bwXxx data bags.

Also

  • Updated docs/context/conventions.md to make the attribute-first rule explicit (properties only for objects, or primitives grouped with other bwXxx props).
  • chore: set vite dev server port to 7100.

ohxyz added 2 commits June 21, 2026 15:47
…ando

Stamp custom-action buttons with a bw-action-type HTML attribute rather than
a bwActionType element property; transferGlass reads it back to tell builtins
from custom actions. Update conventions.md to prefer attributes for primitive
stash data and reserve bwXxx properties for objects or grouped bw-data bags.
@ohxyz ohxyz merged commit 5fef613 into main Jun 21, 2026
@ohxyz ohxyz deleted the refactor/pass-action-type-as-attribute branch June 21, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant