From b189afeeaf42c40ec38a30d34dcf6fa9cd882ca1 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Tue, 3 Feb 2015 17:16:25 -0800 Subject: [PATCH] fix(drafts): Rename files inbox-composer =>composer --- internal_packages/composer/README.md | 2 +- internal_packages/composer/bower.json | 2 +- internal_packages/composer/lib/composer-view.cjsx | 5 +++-- internal_packages/composer/lib/main.cjsx | 4 ++-- internal_packages/composer/menus/inbox-composer.cson | 6 +++--- internal_packages/composer/package.json | 2 +- .../composer/stylesheets/inbox-composer.less | 6 +++--- package.json | 2 +- src/browser/atom-application.coffee | 2 +- src/browser/edgehill-application.coffee | 8 ++++---- src/flux/stores/draft-store.coffee | 2 +- 11 files changed, 21 insertions(+), 20 deletions(-) diff --git a/internal_packages/composer/README.md b/internal_packages/composer/README.md index 8638f4be1..fe0aa095c 100644 --- a/internal_packages/composer/README.md +++ b/internal_packages/composer/README.md @@ -1 +1 @@ -# inbox-composer package +# composer package diff --git a/internal_packages/composer/bower.json b/internal_packages/composer/bower.json index 1f9f27b80..b9d70f07b 100644 --- a/internal_packages/composer/bower.json +++ b/internal_packages/composer/bower.json @@ -1,5 +1,5 @@ { - "name": "inbox-composer", + "name": "composer", "version": "0.0.0", "authors": [ "InboxApp" diff --git a/internal_packages/composer/lib/composer-view.cjsx b/internal_packages/composer/lib/composer-view.cjsx index 24b33de7d..7d7de3cbc 100644 --- a/internal_packages/composer/lib/composer-view.cjsx +++ b/internal_packages/composer/lib/composer-view.cjsx @@ -81,14 +81,14 @@ ComposerView = React.createClass _wrapClasses: -> - "inbox-composer-outer-wrap #{@props.containerClass ? ""}" + "composer-outer-wrap #{@props.containerClass ? ""}" _renderComposer: -> # Do not render the composer unless we have loaded our draft. # Otherwise the Scribe component is initialized with HTML = "" return
if @state.body == undefined -
+
@@ -107,6 +107,7 @@ ComposerView = React.createClass >Change Subject Popout  
diff --git a/internal_packages/composer/lib/main.cjsx b/internal_packages/composer/lib/main.cjsx index 17ca7b543..97fe7217f 100644 --- a/internal_packages/composer/lib/main.cjsx +++ b/internal_packages/composer/lib/main.cjsx @@ -21,8 +21,8 @@ module.exports = else if @item? then return # Activate once @item = document.createElement("div") - @item.setAttribute("id", "inbox-composer-full-window") - @item.setAttribute("class", "inbox-composer-full-window") + @item.setAttribute("id", "composer-full-window") + @item.setAttribute("class", "composer-full-window") document.body.appendChild(@item) # Wait for the remaining state to be passed into the window diff --git a/internal_packages/composer/menus/inbox-composer.cson b/internal_packages/composer/menus/inbox-composer.cson index 4ac1945f9..aebda3449 100644 --- a/internal_packages/composer/menus/inbox-composer.cson +++ b/internal_packages/composer/menus/inbox-composer.cson @@ -1,15 +1,15 @@ # See https://atom.io/docs/latest/creating-a-package#menus for more details 'context-menu': '.overlayer': - 'Enable inbox-composer': 'inbox-composer:toggle' + 'Enable composer': 'composer:toggle' 'menu': [ { 'label': 'Packages' 'submenu': [ - 'label': 'inbox-composer' + 'label': 'composer' 'submenu': [ - { 'label': 'Toggle', 'command': 'inbox-composer:toggle' } + { 'label': 'Toggle', 'command': 'composer:toggle' } ] ] } diff --git a/internal_packages/composer/package.json b/internal_packages/composer/package.json index 0cf12fab2..fa6b91868 100644 --- a/internal_packages/composer/package.json +++ b/internal_packages/composer/package.json @@ -1,5 +1,5 @@ { - "name": "inbox-composer", + "name": "composer", "version": "0.1.0", "main": "./lib/main", "description": "Inbox Composer Component", diff --git a/internal_packages/composer/stylesheets/inbox-composer.less b/internal_packages/composer/stylesheets/inbox-composer.less index cc03bb552..81e9e1721 100644 --- a/internal_packages/composer/stylesheets/inbox-composer.less +++ b/internal_packages/composer/stylesheets/inbox-composer.less @@ -6,16 +6,16 @@ @import "ui-mixins"; @import "buttons"; -.inbox-composer-full-window { +.composer-full-window { width: 100%; height: 100%; - .inbox-composer-outer-wrap { + .composer-outer-wrap { width: 100%; height: 100%; } } -.inbox-composer-inner-wrap { +.composer-inner-wrap { height: 100%; display: flex; flex-flow: column; diff --git a/package.json b/package.json index 687bd80e8..e17d114d6 100644 --- a/package.json +++ b/package.json @@ -175,6 +175,6 @@ "private": true, "scripts": { "preinstall": "node -e 'process.exit(0)'", - "postinstall": "(cd internal_packages/inbox-composer; npm install)" + "postinstall": "(cd internal_packages/composer; npm install)" } } diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index c1f015b92..1c6261bbb 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -240,7 +240,7 @@ class AtomApplication # frame: true # draftId: draftId << arbitrary, goes into atom.getLoadSettings() # windowName: 'composer' << available as atom.state.mode in window - # windowPackages: ['inbox-composer'] << packages to activate in window + # windowPackages: ['composer'] << packages to activate in window # ipc.on 'show-secondary-window', (event, options) => options = _.extend options, diff --git a/src/browser/edgehill-application.coffee b/src/browser/edgehill-application.coffee index 9784774b9..3d84a0ad9 100644 --- a/src/browser/edgehill-application.coffee +++ b/src/browser/edgehill-application.coffee @@ -216,7 +216,7 @@ class AtomApplication # frame: true # draftId: draftId << arbitrary, goes into atom.getLoadSettings() # windowName: 'composer' << available as atom.state.mode in window - # windowPackages: ['inbox-composer'] << packages to activate in window + # windowPackages: ['composer'] << packages to activate in window # ipc.on 'show-secondary-window', (event, options) => w = @prepareSecondaryWindow(options) @@ -351,7 +351,7 @@ class AtomApplication # :title: 'Message' # :frame: true # :windowName: 'composer' - # :windowPackages: ['inbox-composer'] + # :windowPackages: ['composer'] prepareSecondaryWindow: (options) -> options = _.extend options, bootstrapScript: require.resolve("../window-secondary-bootstrap") @@ -369,14 +369,14 @@ class AtomApplication # :title: 'Message' # :frame: true # :windowName: 'composer' - # :windowPackages: ['inbox-composer'] + # :windowPackages: ['composer'] prepareComposerWindow: -> w = @_readyComposerWindow @_readyComposerWindow = @prepareSecondaryWindow title: 'Message' frame: true windowName: 'composer' - windowPackages: ['inbox-composer'] + windowPackages: ['composer'] w showComposerWindow: ({draftLocalId, draftInitialJSON} = {}) -> diff --git a/src/flux/stores/draft-store.coffee b/src/flux/stores/draft-store.coffee index ba726e77e..9d2fcbdf9 100644 --- a/src/flux/stores/draft-store.coffee +++ b/src/flux/stores/draft-store.coffee @@ -99,7 +99,7 @@ DraftStore = Reflux.createStore DatabaseStore.persistModel(draft) # The logic to create a new Draft used to be in the DraftStore (which is - # where it should be). It got moved to inbox-composer/lib/main.cjsx becaues + # where it should be). It got moved to composer/lib/main.cjsx becaues # of an obscure atom-shell/Chrome bug whereby database requests firing right # before the new-window loaded would cause the new-window to load with # about:blank instead of its contents. By moving the DB logic there, we can