From f2cbfb2eb375cde302461a91e5fb0a3af8f6eeb5 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 10 Sep 2017 08:48:11 +0200 Subject: [PATCH] Fix dimensions of loading component for compose drawer (#4872) --- .../mastodon/features/ui/components/columns_area.js | 7 ++++--- .../mastodon/features/ui/components/drawer_loading.js | 11 +++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 app/javascript/mastodon/features/ui/components/drawer_loading.js diff --git a/app/javascript/mastodon/features/ui/components/columns_area.js b/app/javascript/mastodon/features/ui/components/columns_area.js index 7d84bece7..539af8ce3 100644 --- a/app/javascript/mastodon/features/ui/components/columns_area.js +++ b/app/javascript/mastodon/features/ui/components/columns_area.js @@ -9,6 +9,7 @@ import { links, getIndex, getLink } from './tabs_bar'; import BundleContainer from '../containers/bundle_container'; import ColumnLoading from './column_loading'; +import DrawerLoading from './drawer_loading'; import BundleColumnError from './bundle_column_error'; import { Compose, Notifications, HomeTimeline, CommunityTimeline, PublicTimeline, HashtagTimeline, FavouritedStatuses } from '../../ui/util/async-components'; @@ -129,8 +130,8 @@ export default class ColumnsArea extends ImmutablePureComponent { ); } - renderLoading = () => { - return ; + renderLoading = columnId => () => { + return columnId === 'COMPOSE' ? : ; } renderError = (props) => { @@ -158,7 +159,7 @@ export default class ColumnsArea extends ImmutablePureComponent { const params = column.get('params', null) === null ? null : column.get('params').toJS(); return ( - + {SpecificComponent => } ); diff --git a/app/javascript/mastodon/features/ui/components/drawer_loading.js b/app/javascript/mastodon/features/ui/components/drawer_loading.js new file mode 100644 index 000000000..08b0d2347 --- /dev/null +++ b/app/javascript/mastodon/features/ui/components/drawer_loading.js @@ -0,0 +1,11 @@ +import React from 'react'; + +const DrawerLoading = () => ( +
+
+
+
+
+); + +export default DrawerLoading;