mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-25 13:36:39 +08:00
Summary:
- Rename DraftStoreExtension to ComposerExtension
- Rename MessageStoreExtension to MessageViewExtension
- Rename ContenteditablePlugin to ContenteditableExtension
- Update Contenteditable to use new naming convention
- Adds support for extension handlers as props
- Add ExtensionRegistry to register extensions:
- ContenteditableExtensions will not be registered through the
ExtensionRegistry. They are meant for internal use, or if anyone wants
to use our Contenteditable component directly in their plugins.
- Adds specs
- Refactors internal_packages and src to use new names and new ExtensionRegistry api
- Adds deprecation util function and deprecation notices for old api methods:
- DraftStore.{registerExtension, unregisterExtension}
- MessageStore.{registerExtension, unregisterExtension}
- DraftStoreExtension.{onMouseUp, onTabDown}
- MessageStoreExtension
- Adds and updates docs
Test Plan: - Unit tests
Reviewers: bengotow, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2293
18 lines
663 B
CoffeeScript
18 lines
663 B
CoffeeScript
{PreferencesUIStore, ExtensionRegistry} = require 'nylas-exports'
|
|
SignatureComposerExtension = require './signature-composer-extension'
|
|
|
|
module.exports =
|
|
activate: (@state={}) ->
|
|
@preferencesTab = new PreferencesUIStore.TabItem
|
|
tabId: "Signatures"
|
|
displayName: "Signatures"
|
|
component: require "./preferences-signatures"
|
|
|
|
ExtensionRegistry.Composer.register(SignatureComposerExtension)
|
|
PreferencesUIStore.registerPreferencesTab(@preferencesTab)
|
|
|
|
deactivate: ->
|
|
ExtensionRegistry.Composer.unregister(SignatureComposerExtension)
|
|
PreferencesUIStore.unregisterPreferencesTab(@preferencesTab.sectionId)
|
|
|
|
serialize: -> @state
|