diff --git a/app/internal_packages/composer-signature/lib/main.es6 b/app/internal_packages/composer-signature/lib/main.es6
index 05df986f2..11ac60cae 100644
--- a/app/internal_packages/composer-signature/lib/main.es6
+++ b/app/internal_packages/composer-signature/lib/main.es6
@@ -2,13 +2,12 @@ import {PreferencesUIStore, ExtensionRegistry, ComponentRegistry} from 'nylas-ex
import SignatureComposerExtension from './signature-composer-extension';
import SignatureComposerDropdown from './signature-composer-dropdown';
-import PreferencesSignatures from "./preferences-signatures";
export function activate() {
this.preferencesTab = new PreferencesUIStore.TabItem({
tabId: "Signatures",
displayName: "Signatures",
- component: PreferencesSignatures,
+ componentClassFn: () => require('./preferences-signatures').default, // eslint-disable-line
});
ExtensionRegistry.Composer.register(SignatureComposerExtension);
diff --git a/app/internal_packages/composer-signature/lib/signature-composer-dropdown.jsx b/app/internal_packages/composer-signature/lib/signature-composer-dropdown.jsx
index c1f9808a6..0c2fe6033 100644
--- a/app/internal_packages/composer-signature/lib/signature-composer-dropdown.jsx
+++ b/app/internal_packages/composer-signature/lib/signature-composer-dropdown.jsx
@@ -96,8 +96,8 @@ export default class SignatureComposerDropdown extends React.Component {
}
_renderSignatures() {
- const header = [
No signature
]
- const footer = [Edit Signatures...
]
+ const header = [No signature
]
+ const footer = [Edit Signatures...
]
const sigItems = Object.values(this.state.signatures)
return (
diff --git a/app/internal_packages/composer-templates/lib/main.es6 b/app/internal_packages/composer-templates/lib/main.es6
index b6353be78..a6f486944 100644
--- a/app/internal_packages/composer-templates/lib/main.es6
+++ b/app/internal_packages/composer-templates/lib/main.es6
@@ -9,7 +9,7 @@ export function activate(state = {}) {
this.preferencesTab = new PreferencesUIStore.TabItem({
tabId: 'Quick Replies',
displayName: 'Quick Replies',
- component: require('./preferences-templates').default,
+ componentClassFn: () => require('./preferences-templates').default,
});
ComponentRegistry.register(TemplatePicker, {role: 'Composer:ActionButton'});
ComponentRegistry.register(TemplateStatusBar, {role: 'Composer:Footer'});
diff --git a/app/internal_packages/composer-templates/lib/template-picker.jsx b/app/internal_packages/composer-templates/lib/template-picker.jsx
index bba257517..9f65621ad 100644
--- a/app/internal_packages/composer-templates/lib/template-picker.jsx
+++ b/app/internal_packages/composer-templates/lib/template-picker.jsx
@@ -80,8 +80,8 @@ class TemplatePopover extends React.Component {
];
const footerComponents = [
- Save Draft as Template...
,
- Manage Templates...
,
+ Save Draft as Template...
,
+ Manage Templates...
,
];
return (
diff --git a/app/internal_packages/preferences/lib/main.jsx b/app/internal_packages/preferences/lib/main.jsx
index 753b28d79..59cfceccd 100644
--- a/app/internal_packages/preferences/lib/main.jsx
+++ b/app/internal_packages/preferences/lib/main.jsx
@@ -1,50 +1,47 @@
-import {PreferencesUIStore,
+/* eslint global-require: 0 */
+import {
+ PreferencesUIStore,
WorkspaceStore,
- ComponentRegistry} from 'nylas-exports';
+ ComponentRegistry,
+} from 'nylas-exports';
import PreferencesRoot from './preferences-root';
-import PreferencesGeneral from './tabs/preferences-general';
-import PreferencesAccounts from './tabs/preferences-accounts';
-import PreferencesAppearance from './tabs/preferences-appearance';
-import PreferencesKeymaps from './tabs/preferences-keymaps';
-import PreferencesMailRules from './tabs/preferences-mail-rules';
-import PreferencesIdentity from './tabs/preferences-identity';
export function activate() {
PreferencesUIStore.registerPreferencesTab(new PreferencesUIStore.TabItem({
tabId: 'General',
displayName: 'General',
- component: PreferencesGeneral,
+ componentClassFn: () => require('./tabs/preferences-general').default,
order: 1,
}))
PreferencesUIStore.registerPreferencesTab(new PreferencesUIStore.TabItem({
tabId: 'Accounts',
displayName: 'Accounts',
- component: PreferencesAccounts,
+ componentClassFn: () => require('./tabs/preferences-accounts').default,
order: 2,
}))
PreferencesUIStore.registerPreferencesTab(new PreferencesUIStore.TabItem({
tabId: 'Subscription',
displayName: 'Subscription',
- component: PreferencesIdentity,
+ componentClassFn: () => require('./tabs/preferences-identity').default,
order: 3,
}))
PreferencesUIStore.registerPreferencesTab(new PreferencesUIStore.TabItem({
tabId: 'Appearance',
displayName: 'Appearance',
- component: PreferencesAppearance,
+ componentClassFn: () => require('./tabs/preferences-appearance').default,
order: 4,
}))
PreferencesUIStore.registerPreferencesTab(new PreferencesUIStore.TabItem({
tabId: 'Shortcuts',
displayName: 'Shortcuts',
- component: PreferencesKeymaps,
+ componentClassFn: () => require('./tabs/preferences-keymaps').default,
order: 5,
}))
PreferencesUIStore.registerPreferencesTab(new PreferencesUIStore.TabItem({
tabId: 'Mail Rules',
displayName: 'Mail Rules',
- component: PreferencesMailRules,
+ componentClassFn: () => require('./tabs/preferences-mail-rules').default,
order: 6,
}))
diff --git a/app/internal_packages/preferences/lib/preferences-root.jsx b/app/internal_packages/preferences/lib/preferences-root.jsx
index 5ddaa3a4d..b265dbcf9 100644
--- a/app/internal_packages/preferences/lib/preferences-root.jsx
+++ b/app/internal_packages/preferences/lib/preferences-root.jsx
@@ -77,6 +77,7 @@ class PreferencesRoot extends React.Component {
render() {
const {tab, selection, tabs} = this.props
+ const TabComponent = tab && tab.componentClassFn();
return (
@@ -88,7 +89,7 @@ class PreferencesRoot extends React.Component {
{ this._contentComponent = el; }}>
{tab ?
- :
+ :
false
}
diff --git a/app/internal_packages/preferences/lib/tabs/preferences-keymaps.jsx b/app/internal_packages/preferences/lib/tabs/preferences-keymaps.jsx
index 329ab6c80..fe3baa873 100644
--- a/app/internal_packages/preferences/lib/tabs/preferences-keymaps.jsx
+++ b/app/internal_packages/preferences/lib/tabs/preferences-keymaps.jsx
@@ -7,8 +7,7 @@ import { Flexbox } from 'nylas-component-kit';
import displayedKeybindings from './keymaps/displayed-keybindings';
import CommandItem from './keymaps/command-item';
-class PreferencesKeymaps extends React.Component {
-
+export default class PreferencesKeymaps extends React.Component {
static displayName = 'PreferencesKeymaps';
static propTypes = {
@@ -135,7 +134,4 @@ class PreferencesKeymaps extends React.Component {
);
}
-
}
-
-export default PreferencesKeymaps;
diff --git a/app/internal_packages/preferences/lib/tabs/preferences-mail-rules.jsx b/app/internal_packages/preferences/lib/tabs/preferences-mail-rules.jsx
index 0f2333b83..06dbf2555 100644
--- a/app/internal_packages/preferences/lib/tabs/preferences-mail-rules.jsx
+++ b/app/internal_packages/preferences/lib/tabs/preferences-mail-rules.jsx
@@ -158,7 +158,7 @@ class PreferencesMailRules extends React.Component {
mode={RetinaImg.Mode.ContentDark}
/>
No rules
-