diff --git a/internal_packages/composer/lib/new-compose-button.cjsx b/internal_packages/composer/lib/new-compose-button.cjsx index 033a52e48..52cd94ef1 100644 --- a/internal_packages/composer/lib/new-compose-button.cjsx +++ b/internal_packages/composer/lib/new-compose-button.cjsx @@ -5,10 +5,8 @@ React = require 'react' module.exports = NewComposeButton = React.createClass render: -> -
+ _onNewCompose: -> Actions.composeNewBlankDraft() diff --git a/internal_packages/composer/stylesheets/composer.less b/internal_packages/composer/stylesheets/composer.less index e6fe354bf..218650df8 100644 --- a/internal_packages/composer/stylesheets/composer.less +++ b/internal_packages/composer/stylesheets/composer.less @@ -262,18 +262,6 @@ } -///////////////////////////// -// new-compose-button.cjsx // -///////////////////////////// -#new-compose-button { - order: -100; - .btn-compose { - margin-top: @spacing-half; - margin-left: @spacing-standard; - } -} - - /////////////////////////// // floating-toolbar.cjsx // /////////////////////////// diff --git a/internal_packages/message-list/lib/core-primary-actions.cjsx b/internal_packages/message-list/lib/core-primary-actions.cjsx deleted file mode 100644 index d43678559..000000000 --- a/internal_packages/message-list/lib/core-primary-actions.cjsx +++ /dev/null @@ -1,40 +0,0 @@ -React = require 'react' -{Actions} = require("inbox-exports") - -# Note: These always have a thread, but only sometimes get a -# message, depending on where in the UI they are being displayed. - -module.exports = - ReplyButton: React.createClass - render: -> - - - _onReply: (e) -> - Actions.composeReply(threadId: @props.thread.id, messageId: @props.message?.id) - e.stopPropagation() - - ReplyAllButton: React.createClass - render: -> - - - _onReplyAll: (e) -> - Actions.composeReplyAll(threadId: @props.thread.id, messageId: @props.message?.id) - e.stopPropagation() - - ForwardButton: React.createClass - render: -> - - - _onForward: (e) -> - Actions.composeForward(threadId: @props.thread.id, messageId: @props.message?.id) - e.stopPropagation() - - ArchiveButton: React.createClass - render: -> - - - _onArchive: (e) -> - # Calling archive() sends an Actions.queueTask with an archive task - # TODO Turn into an Action - @props.thread.archive() - e.stopPropagation() diff --git a/internal_packages/message-list/lib/main.cjsx b/internal_packages/message-list/lib/main.cjsx index 34f671bf2..3a4c9a65a 100644 --- a/internal_packages/message-list/lib/main.cjsx +++ b/internal_packages/message-list/lib/main.cjsx @@ -1,33 +1,17 @@ React = require "react" MessageList = require "./message-list" +MessageToolbarItems = require "./message-toolbar-items.cjsx" {ComponentRegistry} = require 'inbox-exports' -{ReplyButton, - ReplyAllButton, - ForwardButton, - ArchiveButton} = require "./core-primary-actions.cjsx" - module.exports = item: null # The DOM item the main React component renders into activate: (@state={}) -> # Register Message List Actions we provide globally ComponentRegistry.register - name: 'edgehill-reply-button' - role: 'MessageListPrimaryAction' - view: ReplyButton - ComponentRegistry.register - name: 'edgehill-reply-all-button' - role: 'MessageListPrimaryAction' - view: ReplyAllButton - ComponentRegistry.register - name: 'edgehill-forward-button' - role: 'MessageListPrimaryAction' - view: ForwardButton - ComponentRegistry.register - name: 'edgehill-archive-button' - role: 'MessageListPrimaryAction' - view: ArchiveButton + name: 'MessageToolbarItems' + role: 'MessageList:Toolbar' + view: MessageToolbarItems ComponentRegistry.register name: 'MessageList' @@ -35,10 +19,7 @@ module.exports = view: MessageList deactivate: -> - ComponentRegistry.unregister 'edgehill-reply-button' - ComponentRegistry.unregister 'edgehill-reply-all-button' - ComponentRegistry.unregister 'edgehill-forward-button' - ComponentRegistry.unregister 'edgehill-archive-button' + ComponentRegistry.unregister 'MessageToolbarItems' ComponentRegistry.unregister 'MessageList' serialize: -> @state diff --git a/internal_packages/message-list/lib/message-list.cjsx b/internal_packages/message-list/lib/message-list.cjsx index e163e3335..1c5467fff 100755 --- a/internal_packages/message-list/lib/message-list.cjsx +++ b/internal_packages/message-list/lib/message-list.cjsx @@ -54,12 +54,6 @@ MessageList = React.createClass - _messageListPrimaryActions: -> - MLActions = ComponentRegistry.findAllViewsByRole('MessageListPrimaryAction') -