From 975d888f5cf363d518ba42239ca3153c04118a84 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 47142fdd12..1ca0a0b764 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 0000000000..cd7ec5c1d2 --- /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 698ae996c2..a3a12e6284 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 e4c991f011..265a70cdc5 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 c74638845294002654cac009f5872740adb0429b 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 cd7ec5c1d2..af9a6dc1af 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 6cbf55ce7be38ac34a7cd10df2af5464d3e0c2b8 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 af9a6dc1af..1410d86acf 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 2fa762ef0ac893e1e7e9ed3608001519da77c032 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 1ca0a0b764..11fdd23447 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 1410d86acf..7310b1356e 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 430733477c962d2eeab916f74d136c53fac3b314 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 11fdd23447..af1021dca8 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 f464eefc45c6e1fd89115fdd0e0d4d47e947b5bc 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 af1021dca8..9782d4d325 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 7310b1356e..1209500a0a 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 d6ca0e29a76909363424b6943aab783618b8e939 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 bcc752d34f..c6a89a9202 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 1dd4e3791fe1bfc77487f378243702a33b3f78ff 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 9782d4d325..ed9d9d1a0f 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 5b185a0a0fa38bc08fa7e5ca744135d939b30fbc 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 ed9d9d1a0f..89c77b507c 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 ca77c18c24aeb138166886b556ca1d362c768176 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 1209500a0a..9cf7ddff93 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 0000000000..0a12737643 --- /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 a3a12e6284..5c80ea07bb 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 8f98863d88..06521d7087 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 265a70cdc5..5d21ccca2a 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 d9af646f8874700915c9d8e5424f1079e55b9713 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 014055804e..9e1b620f5a 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 f923aeec08964f0ef21bec8c69f9b4a76856ffad 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 0a12737643..8aed471f27 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 06521d7087..35f308b2d4 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%);