Skip to content

calendar: provide deterministic editor context for item action clicks and editor item handling#65

Open
DeBaschdi wants to merge 3 commits intothunderbird:mainfrom
DeBaschdi:editor_context
Open

calendar: provide deterministic editor context for item action clicks and editor item handling#65
DeBaschdi wants to merge 3 commits intothunderbird:mainfrom
DeBaschdi:editor_context

Conversation

@DeBaschdi
Copy link
Contributor

@DeBaschdi DeBaschdi commented Feb 23, 2026

This proposal improves editor-context handling for calendar add-ons in dialog and tab editors:

  • include editorId/editorType in calendarItemAction.onClicked info
  • provide deterministic editor-instance-targeted getCurrent/updateCurrent in calendar.items
  • make updateCurrent transactional across UI fields and item properties
  • expose tracked editor close lifecycle signaling (persisted/discarded/superseded)

Goal: enable add-ons to work with open editors (including unsaved items) without custom experiments.

Improves calendarItemAction toolbar persistence across restart and upgrade in calendar event editors (dialog + tab).

Stop mutating xulStore in onShutdown().
Ensure button placement on ADDON_INSTALL and ADDON_UPGRADE. Cover both toolbars: event-toolbar and event-tab-toolbar.
… and editor item handling

This proposal improves editor-context handling for calendar add-ons in dialog and tab editors:

- include editorRef/editorType in calendarItemAction.onClicked info
- support deterministic editor-targeted item access/update in calendar.items APIs
- expose editor close lifecycle signaling for persisted/discarded/superseded flows

Goal: enable add-ons to work with open editors (including unsaved items) without custom experiments.
@DeBaschdi DeBaschdi requested a review from kewisch as a code owner February 23, 2026 03:58
@DeBaschdi DeBaschdi marked this pull request as draft February 23, 2026 18:48
Follow-up hardening for editor-context APIs:

- bind editorId to concrete editor instances (tabId + editor outerWindowID)
- reject stale tab editor instances during editorId resolution
- remove global bridge registries in favor of per-extension bridge state
- make calendar.items.updateCurrent transactional across fields and properties:
  - rollback fields on field failure
  - rollback applied properties and fields on property failure
- align schema docs with the implemented contract (editor instance + transactional updateCurrent)

This tightens long-term API contract behavior for dialog/tab editors, including unsaved items.
@DeBaschdi DeBaschdi marked this pull request as ready for review February 24, 2026 05:05
@jobisoft jobisoft self-assigned this Feb 26, 2026
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.

2 participants