From 340f1e9149c6d648d1b4d107d992dad4fddcb627 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 15 Apr 2019 20:31:56 -0500 Subject: Compact the hashtag section of the search UI. Get rid of trending sections; they do not work properly on instances with less than 10,000 active users. --- .../flavours/glitch/components/hashtag.js | 23 +++------------------- .../features/compose/components/search_results.js | 4 ++-- .../flavours/glitch/styles/components/drawer.scss | 2 +- 3 files changed, 6 insertions(+), 23 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/components/hashtag.js b/app/javascript/flavours/glitch/components/hashtag.js index d75edd994..c78a2c74d 100644 --- a/app/javascript/flavours/glitch/components/hashtag.js +++ b/app/javascript/flavours/glitch/components/hashtag.js @@ -1,30 +1,13 @@ import React from 'react'; -import { Sparklines, SparklinesCurve } from 'react-sparklines'; import { FormattedMessage } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Permalink from './permalink'; import { shortNumberFormat } from 'flavours/glitch/util/numbers'; const Hashtag = ({ hashtag }) => ( -
-
- - #{hashtag.get('name')} - - - {shortNumberFormat(hashtag.getIn(['history', 0, 'accounts']))} }} /> -
- -
- {shortNumberFormat(hashtag.getIn(['history', 0, 'uses']))} -
- -
- day.get('uses')).toArray()}> - - -
-
+ + #{hashtag.get('name')} + ); Hashtag.propTypes = { diff --git a/app/javascript/flavours/glitch/features/compose/components/search_results.js b/app/javascript/flavours/glitch/features/compose/components/search_results.js index 69df8cdc9..5c443980e 100644 --- a/app/javascript/flavours/glitch/features/compose/components/search_results.js +++ b/app/javascript/flavours/glitch/features/compose/components/search_results.js @@ -97,9 +97,9 @@ class SearchResults extends ImmutablePureComponent { - {accounts} - {statuses} {hashtags} + {statuses} + {accounts} ); }; diff --git a/app/javascript/flavours/glitch/styles/components/drawer.scss b/app/javascript/flavours/glitch/styles/components/drawer.scss index 0068223b2..5ad78e0b6 100644 --- a/app/javascript/flavours/glitch/styles/components/drawer.scss +++ b/app/javascript/flavours/glitch/styles/components/drawer.scss @@ -229,7 +229,7 @@ } & > .hashtag { - display: block; + display: inline-block; padding: 10px; color: $secondary-text-color; text-decoration: none; -- cgit