Skip to content

refactor(web): stamp registry ids on read-only event cards - #2688

Merged
tyler-dane merged 2 commits into
mainfrom
refactor/d2-readonly-interaction-attrs
Aug 8, 2026
Merged

refactor(web): stamp registry ids on read-only event cards#2688
tyler-dane merged 2 commits into
mainfrom
refactor/d2-readonly-interaction-attrs

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

Summary

  • Stamp Day/Week view-registry id attrs on saved read-only cards (and drafts) so context menus / focus restore keep working
  • Keep drag/resize gated via registry isEnabled + mouse handlers (!isReadOnly, non-placeholder)
  • Remove DATA_EVENT_ELEMENT_ID / data-event-id from event cards and resolve ids through the registry attrs

Test plan

  • Focused unit tests + read-only interaction tests
  • bun test:web
  • bun test:e2e (incl. read-only context menu / drag)
  • Independent review finding fixed (draft id stamping)
  • CI + staging deploy watch

Split identity attrs from drag/resize registration so context menus and
focus restore can resolve read-only cards without a separate data-event-id.
Keep context-menu and draft-id resolution working after dropping
data-event-id by stamping view-registry attrs on drafts too.
@tyler-dane
tyler-dane merged commit 4579756 into main Aug 8, 2026
20 checks passed
@tyler-dane
tyler-dane deleted the refactor/d2-readonly-interaction-attrs branch August 8, 2026 02:36
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