about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-04-15 20:31:56 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:22 -0500
commit340f1e9149c6d648d1b4d107d992dad4fddcb627 (patch)
treed978abf144257ab123de662884436eef05baa6f4 /app
parentdfbc2fc51862157e095dbd42c90979c3877a0161 (diff)
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.
Diffstat (limited to 'app')
-rw-r--r--app/javascript/flavours/glitch/components/hashtag.js23
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/search_results.js4
-rw-r--r--app/javascript/flavours/glitch/styles/components/drawer.scss2
3 files changed, 6 insertions, 23 deletions
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 }) => (
-  <div className='trends__item'>
-    <div className='trends__item__name'>
-      <Permalink href={hashtag.get('url')} to={`/timelines/tag/${hashtag.get('name')}`}>
-        #<span>{hashtag.get('name')}</span>
-      </Permalink>
-
-      <FormattedMessage id='trends.count_by_accounts' defaultMessage='{count} {rawCount, plural, one {person} other {people}} talking' values={{ rawCount: hashtag.getIn(['history', 0, 'accounts']), count: <strong>{shortNumberFormat(hashtag.getIn(['history', 0, 'accounts']))}</strong> }} />
-    </div>
-
-    <div className='trends__item__current'>
-      {shortNumberFormat(hashtag.getIn(['history', 0, 'uses']))}
-    </div>
-
-    <div className='trends__item__sparkline'>
-      <Sparklines width={50} height={28} data={hashtag.get('history').reverse().map(day => day.get('uses')).toArray()}>
-        <SparklinesCurve style={{ fill: 'none' }} />
-      </Sparklines>
-    </div>
-  </div>
+  <Permalink className='hashtag' href={hashtag.get('url')} to={`/timelines/tag/${hashtag.get('name')}`}>
+    #<span>{hashtag.get('name')}</span>
+  </Permalink>
 );
 
 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 {
           <FormattedMessage id='search_results.total' defaultMessage='{count, number} {count, plural, one {result} other {results}}' values={{ count }} />
         </header>
 
-        {accounts}
-        {statuses}
         {hashtags}
+        {statuses}
+        {accounts}
       </div>
     );
   };
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;