Skip to content

Fix calendarItemAction persistence in event editor toolbars#64

Merged
jobisoft merged 5 commits intothunderbird:mainfrom
DeBaschdi:calendarItemAction
Mar 5, 2026
Merged

Fix calendarItemAction persistence in event editor toolbars#64
jobisoft merged 5 commits intothunderbird:mainfrom
DeBaschdi:calendarItemAction

Conversation

@DeBaschdi
Copy link
Contributor

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.

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.
@DeBaschdi DeBaschdi requested a review from kewisch as a code owner February 23, 2026 03:57
Copy link
Collaborator

@jobisoft jobisoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you did there, great catch! I added two remarks.

@jobisoft jobisoft self-assigned this Feb 26, 2026
DeBaschdi and others added 3 commits February 27, 2026 04:17
Document why ADDON_UPGRADE is currently included in the startup path:
- ADDON_INSTALL covers fresh profiles
- ADDON_UPGRADE is only a temporary migration path for legacy persisted toolbar state

Also note that this branch should be removed once the behavior is in core
and no legacy profile migration is required.
@jobisoft
Copy link
Collaborator

jobisoft commented Mar 5, 2026

I have massively reworked the PR based on the insights I have gained working on calendar API and toolbar code in the last few days.

Foremost, the goal is to land this in core in March or April. Overriding paint() and unpaint() and not calling super() there is fine and needed to test the new code. The updated PR introduces a new mechanic to handle the button being added to multiple windows with different toolbar ids.

The cleanup is needed as mentioned earlier and was moved into the constructor. We are not doing anything special anymore on install or upgrade. This may auto-heal broken profiles, but if not, we will not add code for that case.

Would be happy to hear your feedback, but remember to not trigger the edge cases mentioned in bug 2020584.

@jobisoft
Copy link
Collaborator

jobisoft commented Mar 5, 2026

Example using the new code:

experiment16.zip

Copy link
Member

@kewisch kewisch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, thanks for making the effort!

@jobisoft jobisoft merged commit 8aa58d0 into thunderbird:main Mar 5, 2026
1 check passed
@DeBaschdi DeBaschdi deleted the calendarItemAction branch March 6, 2026 04:23
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.

3 participants