From 37ced4c90394184fcbc476180ad624b1a18e3540 Mon Sep 17 00:00:00 2001 From: cwm Date: Tue, 12 Dec 2017 00:01:17 -0600 Subject: [PATCH 01/12] add components to getting started column --- .../glitch/features/getting_started/index.js | 45 ++++++++------ .../features/getting_started_misc/index.js | 59 +++++++++++++++++++ .../flavours/glitch/features/ui/index.js | 2 + .../flavours/glitch/util/async-components.js | 4 ++ 4 files changed, 92 insertions(+), 18 deletions(-) create mode 100644 app/javascript/flavours/glitch/features/getting_started_misc/index.js diff --git a/app/javascript/flavours/glitch/features/getting_started/index.js b/app/javascript/flavours/glitch/features/getting_started/index.js index 47142fdd12b..1ca0a0b764d 100644 --- a/app/javascript/flavours/glitch/features/getting_started/index.js +++ b/app/javascript/flavours/glitch/features/getting_started/index.js @@ -9,6 +9,8 @@ import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { me } from 'flavours/glitch/util/initial_state'; +import { createSelector } from 'reselect'; +import { fetchLists } from 'flavours/glitch/actions/lists'; const messages = defineMessages({ heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' }, @@ -23,19 +25,25 @@ const messages = defineMessages({ settings: { id: 'navigation_bar.app_settings', defaultMessage: 'App settings' }, follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' }, sign_out: { id: 'navigation_bar.logout', defaultMessage: 'Logout' }, - favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' }, - blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' }, - mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' }, - info: { id: 'navigation_bar.info', defaultMessage: 'Extended information' }, - show_me_around: { id: 'getting_started.onboarding', defaultMessage: 'Show me around' }, - pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned toots' }, lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' }, keyboard_shortcuts: { id: 'navigation_bar.keyboard_shortcuts', defaultMessage: 'Keyboard shortcuts' }, + lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' }, + lists_subheading: { id: 'column_subheading.lists', defaultMessage: 'Lists' }, + misc: { id: 'navigation_bar.misc', defaultMessage: 'Misc' }, +}); + +const getOrderedLists = createSelector([state => state.get('lists')], lists => { + if (!lists) { + return lists; +} + + return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title'))); }); const mapStateToProps = state => ({ myAccount: state.getIn(['accounts', me]), columns: state.getIn(['settings', 'columns']), + lists: getOrderedLists(state), }); @connect(mapStateToProps) @@ -48,6 +56,7 @@ export default class GettingStarted extends ImmutablePureComponent { columns: ImmutablePropTypes.list, multiColumn: PropTypes.bool, dispatch: PropTypes.func.isRequired, + lists: ImmutablePropTypes.list, }; openSettings = () => { @@ -59,8 +68,12 @@ export default class GettingStarted extends ImmutablePureComponent { this.props.dispatch(openModal('ONBOARDING')); } + componentWillMount () { + this.props.dispatch(fetchLists()); + } + render () { - const { intl, myAccount, columns, multiColumn } = this.props; + const { intl, myAccount, columns, multiColumn, lists } = this.props; let navItems = []; @@ -86,19 +99,12 @@ export default class GettingStarted extends ImmutablePureComponent { navItems.push(); } - navItems = navItems.concat([ - , - , - , - ]); - if (myAccount.get('locked')) { - navItems.push(); + navItems.push(); } navItems = navItems.concat([ - , - , + , ]); return ( @@ -107,9 +113,12 @@ export default class GettingStarted extends ImmutablePureComponent {
{navItems} + + + {lists.map(list => + + )} - - diff --git a/app/javascript/flavours/glitch/features/getting_started_misc/index.js b/app/javascript/flavours/glitch/features/getting_started_misc/index.js new file mode 100644 index 00000000000..cd7ec5c1d26 --- /dev/null +++ b/app/javascript/flavours/glitch/features/getting_started_misc/index.js @@ -0,0 +1,59 @@ +import React from 'react'; +import { connect } from 'react-redux'; +import PropTypes from 'prop-types'; +import ImmutablePropTypes from 'react-immutable-proptypes'; +import LoadingIndicator from 'flavours/glitch/components/loading_indicator'; +import Column from 'flavours/glitch/features/ui/components/column'; +import ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim'; +import { defineMessages, injectIntl } from 'react-intl'; +import ImmutablePureComponent from 'react-immutable-pure-component'; +import ColumnLink from 'flavours/glitch/features/ui/components/column_link'; +import ColumnSubheading from 'flavours/glitch/features/ui/components/column_subheading'; +import { createSelector } from 'reselect'; + +const messages = defineMessages({ + heading: { id: 'column.heading', defaultMessage: 'Misc' }, + subheading: { id: 'column.subheading', defaultMessage: 'Miscellaneous options' }, + favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' }, + blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' }, + mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' }, + info: { id: 'navigation_bar.info', defaultMessage: 'Extended information' }, + show_me_around: { id: 'getting_started.onboarding', defaultMessage: 'Show me around' }, + pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned toots' }, + info: { id: 'navigation_bar.info', defaultMessage: 'Extended information' }, + keyboard_shortcuts: { id: 'navigation_bar.keyboard_shortcuts', defaultMessage: 'Keyboard shortcuts' }, +}); + +@injectIntl +export default class gettingStartedMisc extends ImmutablePureComponent { + + static propTypes = { + intl: PropTypes.object.isRequired, + }; + + openOnboardingModal = (e) => { + e.preventDefault(); + this.props.dispatch(openModal('ONBOARDING')); + } + + render () { + const { intl } = this.props; + + return ( + + + +
+ + + + + + + +
+
+ ); + } + +} diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js index 698ae996c2e..a3a12e6284d 100644 --- a/app/javascript/flavours/glitch/features/ui/index.js +++ b/app/javascript/flavours/glitch/features/ui/index.js @@ -40,6 +40,7 @@ import { Mutes, PinnedStatuses, Lists, + GettingStartedMisc, } from 'flavours/glitch/util/async-components'; import { HotKeys } from 'react-hotkeys'; import { me } from 'flavours/glitch/util/initial_state'; @@ -428,6 +429,7 @@ export default class UI extends React.Component { + diff --git a/app/javascript/flavours/glitch/util/async-components.js b/app/javascript/flavours/glitch/util/async-components.js index e4c991f011c..265a70cdc50 100644 --- a/app/javascript/flavours/glitch/util/async-components.js +++ b/app/javascript/flavours/glitch/util/async-components.js @@ -125,3 +125,7 @@ export function Video () { export function EmbedModal () { return import(/* webpackChunkName: "flavours/glitch/async/embed_modal" */'flavours/glitch/features/ui/components/embed_modal'); } + +export function GettingStartedMisc () { + return import(/* webpackChunkName: "flavours/glitch/async/getting_started_misc" */'flavours/glitch/features/getting_started_misc'); +} From b358483ef2c6dc9563d5616dac6c24a9a0331709 Mon Sep 17 00:00:00 2001 From: cwm Date: Tue, 12 Dec 2017 00:09:18 -0600 Subject: [PATCH 02/12] remove unneeded imports from getting_started_misc --- .../flavours/glitch/features/getting_started_misc/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/getting_started_misc/index.js b/app/javascript/flavours/glitch/features/getting_started_misc/index.js index cd7ec5c1d26..af9a6dc1af8 100644 --- a/app/javascript/flavours/glitch/features/getting_started_misc/index.js +++ b/app/javascript/flavours/glitch/features/getting_started_misc/index.js @@ -1,5 +1,4 @@ import React from 'react'; -import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import LoadingIndicator from 'flavours/glitch/components/loading_indicator'; @@ -9,7 +8,7 @@ import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ColumnLink from 'flavours/glitch/features/ui/components/column_link'; import ColumnSubheading from 'flavours/glitch/features/ui/components/column_subheading'; -import { createSelector } from 'reselect'; +import { openModal } from 'flavours/glitch/actions/modal'; const messages = defineMessages({ heading: { id: 'column.heading', defaultMessage: 'Misc' }, @@ -29,6 +28,7 @@ export default class gettingStartedMisc extends ImmutablePureComponent { static propTypes = { intl: PropTypes.object.isRequired, + dispatch: PropTypes.func.isRequired, }; openOnboardingModal = (e) => { From 9b7208f4b4b4c4d35a14ae75ef56c91d44692048 Mon Sep 17 00:00:00 2001 From: cwm Date: Tue, 12 Dec 2017 00:17:07 -0600 Subject: [PATCH 03/12] readded connect for onboarding modal --- .../flavours/glitch/features/getting_started_misc/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/javascript/flavours/glitch/features/getting_started_misc/index.js b/app/javascript/flavours/glitch/features/getting_started_misc/index.js index af9a6dc1af8..1410d86acf2 100644 --- a/app/javascript/flavours/glitch/features/getting_started_misc/index.js +++ b/app/javascript/flavours/glitch/features/getting_started_misc/index.js @@ -9,6 +9,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import ColumnLink from 'flavours/glitch/features/ui/components/column_link'; import ColumnSubheading from 'flavours/glitch/features/ui/components/column_subheading'; import { openModal } from 'flavours/glitch/actions/modal'; +import { connect } from 'react-redux'; const messages = defineMessages({ heading: { id: 'column.heading', defaultMessage: 'Misc' }, @@ -23,6 +24,7 @@ const messages = defineMessages({ keyboard_shortcuts: { id: 'navigation_bar.keyboard_shortcuts', defaultMessage: 'Keyboard shortcuts' }, }); +@connect() @injectIntl export default class gettingStartedMisc extends ImmutablePureComponent { From b6ded7119ea4d13b03db4c384cc57b41f11a4811 Mon Sep 17 00:00:00 2001 From: cwm Date: Tue, 12 Dec 2017 08:50:31 -0600 Subject: [PATCH 04/12] travis fixes --- .../flavours/glitch/features/getting_started/index.js | 2 +- .../flavours/glitch/features/getting_started_misc/index.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/javascript/flavours/glitch/features/getting_started/index.js b/app/javascript/flavours/glitch/features/getting_started/index.js index 1ca0a0b764d..11fdd234476 100644 --- a/app/javascript/flavours/glitch/features/getting_started/index.js +++ b/app/javascript/flavours/glitch/features/getting_started/index.js @@ -35,7 +35,7 @@ const messages = defineMessages({ const getOrderedLists = createSelector([state => state.get('lists')], lists => { if (!lists) { return lists; -} + } return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title'))); }); diff --git a/app/javascript/flavours/glitch/features/getting_started_misc/index.js b/app/javascript/flavours/glitch/features/getting_started_misc/index.js index 1410d86acf2..7310b1356e2 100644 --- a/app/javascript/flavours/glitch/features/getting_started_misc/index.js +++ b/app/javascript/flavours/glitch/features/getting_started_misc/index.js @@ -1,7 +1,5 @@ import React from 'react'; import PropTypes from 'prop-types'; -import ImmutablePropTypes from 'react-immutable-proptypes'; -import LoadingIndicator from 'flavours/glitch/components/loading_indicator'; import Column from 'flavours/glitch/features/ui/components/column'; import ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim'; import { defineMessages, injectIntl } from 'react-intl'; From 9719983f2dcd8c47b7c6f59b46460a7a4878d8d4 Mon Sep 17 00:00:00 2001 From: cwm Date: Tue, 12 Dec 2017 22:50:20 -0600 Subject: [PATCH 05/12] move list items into an array, don't unnecessarily concat misc nav item --- .../glitch/features/getting_started/index.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/app/javascript/flavours/glitch/features/getting_started/index.js b/app/javascript/flavours/glitch/features/getting_started/index.js index 11fdd234476..af1021dca8c 100644 --- a/app/javascript/flavours/glitch/features/getting_started/index.js +++ b/app/javascript/flavours/glitch/features/getting_started/index.js @@ -76,6 +76,7 @@ export default class GettingStarted extends ImmutablePureComponent { const { intl, myAccount, columns, multiColumn, lists } = this.props; let navItems = []; + let listItems = []; if (multiColumn) { if (!columns.find(item => item.get('id') === 'HOME')) { @@ -103,8 +104,15 @@ export default class GettingStarted extends ImmutablePureComponent { navItems.push(); } - navItems = navItems.concat([ - , + navItems.push(); + + listItems = listItems.concat([ +
+ + {lists.map(list => + + )} +
]); return ( @@ -114,10 +122,7 @@ export default class GettingStarted extends ImmutablePureComponent { {navItems} - - {lists.map(list => - - )} + {listItems} From 17e53b931c12abab8548dba324beaae920c453a8 Mon Sep 17 00:00:00 2001 From: cwm Date: Tue, 12 Dec 2017 23:07:12 -0600 Subject: [PATCH 06/12] code style fixes --- .../flavours/glitch/features/getting_started/index.js | 2 +- .../flavours/glitch/features/getting_started_misc/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/getting_started/index.js b/app/javascript/flavours/glitch/features/getting_started/index.js index af1021dca8c..9782d4d3256 100644 --- a/app/javascript/flavours/glitch/features/getting_started/index.js +++ b/app/javascript/flavours/glitch/features/getting_started/index.js @@ -112,7 +112,7 @@ export default class GettingStarted extends ImmutablePureComponent { {lists.map(list => )} -
+ , ]); return ( diff --git a/app/javascript/flavours/glitch/features/getting_started_misc/index.js b/app/javascript/flavours/glitch/features/getting_started_misc/index.js index 7310b1356e2..1209500a0a0 100644 --- a/app/javascript/flavours/glitch/features/getting_started_misc/index.js +++ b/app/javascript/flavours/glitch/features/getting_started_misc/index.js @@ -34,7 +34,7 @@ export default class gettingStartedMisc extends ImmutablePureComponent { openOnboardingModal = (e) => { e.preventDefault(); this.props.dispatch(openModal('ONBOARDING')); - } + } render () { const { intl } = this.props; From e4ebbf4f07c55868dbe4fcf6a7074771b69f8e29 Mon Sep 17 00:00:00 2001 From: cwm Date: Sun, 17 Dec 2017 21:25:18 -0600 Subject: [PATCH 07/12] use list-ul icon in list header and web/lists --- app/javascript/flavours/glitch/features/list_timeline/index.js | 2 +- app/javascript/flavours/glitch/features/lists/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/list_timeline/index.js b/app/javascript/flavours/glitch/features/list_timeline/index.js index bcc752d34f1..c6a89a92022 100644 --- a/app/javascript/flavours/glitch/features/list_timeline/index.js +++ b/app/javascript/flavours/glitch/features/list_timeline/index.js @@ -134,7 +134,7 @@ export default class ListTimeline extends React.PureComponent { return ( {lists.map(list => - + )} From be50e45a74dfb12b00f8bd4d9ad34109c602b0cb Mon Sep 17 00:00:00 2001 From: cwm Date: Sun, 17 Dec 2017 22:00:25 -0600 Subject: [PATCH 08/12] use makeMapStateToProps --- .../glitch/features/getting_started/index.js | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/app/javascript/flavours/glitch/features/getting_started/index.js b/app/javascript/flavours/glitch/features/getting_started/index.js index 9782d4d3256..ed9d9d1a0f3 100644 --- a/app/javascript/flavours/glitch/features/getting_started/index.js +++ b/app/javascript/flavours/glitch/features/getting_started/index.js @@ -32,22 +32,26 @@ const messages = defineMessages({ misc: { id: 'navigation_bar.misc', defaultMessage: 'Misc' }, }); -const getOrderedLists = createSelector([state => state.get('lists')], lists => { - if (!lists) { - return lists; - } +const makeMapStateToProps = () => { + const getOrderedLists = createSelector([state => state.get('lists')], lists => { + if (!lists) { + return lists; + } - return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title'))); -}); + return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title'))); + }); -const mapStateToProps = state => ({ - myAccount: state.getIn(['accounts', me]), - columns: state.getIn(['settings', 'columns']), - lists: getOrderedLists(state), -}); + const mapStateToProps = state => ({ + lists: getOrderedLists(state), + myAccount: state.getIn(['accounts', me]), + columns: state.getIn(['settings', 'columns']), + }); + + return mapStateToProps; +} -@connect(mapStateToProps) @injectIntl +@connect(makeMapStateToProps) export default class GettingStarted extends ImmutablePureComponent { static propTypes = { From 14aae9c05c8e3053897e6bd3b762edbb1073379b Mon Sep 17 00:00:00 2001 From: cwm Date: Sun, 17 Dec 2017 22:21:15 -0600 Subject: [PATCH 09/12] missed a semicolon --- .../flavours/glitch/features/getting_started/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/features/getting_started/index.js b/app/javascript/flavours/glitch/features/getting_started/index.js index ed9d9d1a0f3..89c77b507c9 100644 --- a/app/javascript/flavours/glitch/features/getting_started/index.js +++ b/app/javascript/flavours/glitch/features/getting_started/index.js @@ -48,7 +48,7 @@ const makeMapStateToProps = () => { }); return mapStateToProps; -} +}; @injectIntl @connect(makeMapStateToProps) From 9042f9a813e8c909e695ffbe20f81c08eef03b7a Mon Sep 17 00:00:00 2001 From: cwm Date: Wed, 20 Dec 2017 09:50:29 -0600 Subject: [PATCH 10/12] add keyboard shortcuts to getting started (fixes #275) --- .../features/getting_started_misc/index.js | 9 +- .../features/keyboard_shortcuts/index.js | 102 ++++++++++++++++++ .../flavours/glitch/features/ui/index.js | 12 +++ .../glitch/styles/components/index.scss | 21 ++++ .../flavours/glitch/util/async-components.js | 4 + 5 files changed, 144 insertions(+), 4 deletions(-) create mode 100644 app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js diff --git a/app/javascript/flavours/glitch/features/getting_started_misc/index.js b/app/javascript/flavours/glitch/features/getting_started_misc/index.js index 1209500a0a0..9cf7ddff931 100644 --- a/app/javascript/flavours/glitch/features/getting_started_misc/index.js +++ b/app/javascript/flavours/glitch/features/getting_started_misc/index.js @@ -45,10 +45,11 @@ export default class gettingStartedMisc extends ImmutablePureComponent {
- - - - + + + + +
diff --git a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js new file mode 100644 index 00000000000..0a12737643f --- /dev/null +++ b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js @@ -0,0 +1,102 @@ +import React from 'react'; +import Column from 'flavours/glitch/features/ui/components/column'; +import ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim'; +import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; +import PropTypes from 'prop-types'; +import ImmutablePureComponent from 'react-immutable-pure-component'; + +const messages = defineMessages({ + heading: { id: 'keyboard_shortcuts.heading', defaultMessage: 'Keyboard Shortcuts' }, +}); + +@injectIntl +export default class KeyboardShortcuts extends ImmutablePureComponent { + + static propTypes = { + intl: PropTypes.object.isRequired, + multiColumn: PropTypes.bool, + }; + + render () { + const { intl } = this.props; + + return ( + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
r
m
f
b
enter
up
down
1-9
n
alt+n
backspace
s
esc
x
?
+
+
+ ); + } + +} diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js index a3a12e6284d..5c80ea07bb5 100644 --- a/app/javascript/flavours/glitch/features/ui/index.js +++ b/app/javascript/flavours/glitch/features/ui/index.js @@ -20,6 +20,7 @@ import { Compose, Status, GettingStarted, + KeyboardShortcuts, PublicTimeline, CommunityTimeline, AccountTimeline, @@ -63,6 +64,7 @@ const mapStateToProps = state => ({ }); const keyMap = { + help: '?', new: 'n', search: 's', forceNew: 'option+n', @@ -312,6 +314,14 @@ export default class UI extends React.Component { this.hotkeys = c; } + handleHotkeyToggleHelp = () => { + if (this.props.location.pathname === '/keyboard-shortcuts') { + this.context.router.history.goBack(); + } else { + this.context.router.history.push('/keyboard-shortcuts'); + } + } + handleHotkeyGoToHome = () => { this.context.router.history.push('/timelines/home'); } @@ -378,6 +388,7 @@ export default class UI extends React.Component { }); const handlers = { + help: this.handleHotkeyToggleHelp, new: this.handleHotkeyNew, search: this.handleHotkeySearch, forceNew: this.handleHotkeyForceNew, @@ -405,6 +416,7 @@ export default class UI extends React.Component { + diff --git a/app/javascript/flavours/glitch/styles/components/index.scss b/app/javascript/flavours/glitch/styles/components/index.scss index 8f98863d88e..06521d7087a 100644 --- a/app/javascript/flavours/glitch/styles/components/index.scss +++ b/app/javascript/flavours/glitch/styles/components/index.scss @@ -2297,6 +2297,27 @@ } } +.keyboard-shortcuts { + padding: 8px 0 0; + overflow: hidden; + + thead { + position: absolute; + left: -9999px; + } + + td { + padding: 0 10px 8px; + } + + code { + display: inline-block; + padding: 3px 5px; + background-color: lighten($ui-base-color, 8%); + border: 1px solid darken($ui-base-color, 4%); + } +} + .setting-text { color: $ui-primary-color; background: transparent; diff --git a/app/javascript/flavours/glitch/util/async-components.js b/app/javascript/flavours/glitch/util/async-components.js index 265a70cdc50..5d21ccca2a6 100644 --- a/app/javascript/flavours/glitch/util/async-components.js +++ b/app/javascript/flavours/glitch/util/async-components.js @@ -50,6 +50,10 @@ export function GettingStarted () { return import(/* webpackChunkName: "flavours/glitch/async/getting_started" */'flavours/glitch/features/getting_started'); } +export function KeyboardShortcuts () { + return import(/* webpackChunkName: "features/keyboard_shortcuts" */'flavours/glitch/features/keyboard_shortcuts'); +} + export function PinnedStatuses () { return import(/* webpackChunkName: "flavours/glitch/async/pinned_statuses" */'flavours/glitch/features/pinned_statuses'); } From 7917d453968b72db6d7a1e2d3eca4e2af0626bc8 Mon Sep 17 00:00:00 2001 From: cwm Date: Thu, 21 Dec 2017 12:45:11 -0600 Subject: [PATCH 11/12] remove themes.default from i18n-tasks unused check --- config/i18n-tasks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index 014055804e9..9e1b620f5ae 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -61,3 +61,4 @@ ignore_unused: - 'errors.429' - 'admin.accounts.roles.*' - 'admin.action_logs.actions.*' + - 'themes.default' From d736739e8ff79044be6f605cd28c89ead710aec6 Mon Sep 17 00:00:00 2001 From: cwm Date: Thu, 21 Dec 2017 13:04:40 -0600 Subject: [PATCH 12/12] instead of in KeyboardShortcuts component (tootsuite pr #6049) --- .../features/keyboard_shortcuts/index.js | 30 +++++++++---------- .../glitch/styles/components/index.scss | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js index 0a12737643f..8aed471f27a 100644 --- a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js +++ b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js @@ -33,63 +33,63 @@ export default class KeyboardShortcuts extends ImmutablePureComponent { - r + r - m + m - f + f - b + b - enter + enter - up + up - down + down - 1-9 + 1-9 - n + n - alt+n + alt+n - backspace + backspace - s + s - esc + esc - x + x - ? + ? diff --git a/app/javascript/flavours/glitch/styles/components/index.scss b/app/javascript/flavours/glitch/styles/components/index.scss index 06521d7087a..35f308b2d4a 100644 --- a/app/javascript/flavours/glitch/styles/components/index.scss +++ b/app/javascript/flavours/glitch/styles/components/index.scss @@ -2310,7 +2310,7 @@ padding: 0 10px 8px; } - code { + kbd { display: inline-block; padding: 3px 5px; background-color: lighten($ui-base-color, 8%);