Browse Source

Allow joining several hashtags in a single column (#8904)

* Nascent tag menu on frontend

* Hook up frontend to search

* Tag intersection backend first pass

* Update yarnlock

* WIP

* Fix for tags not searching correctly

* Make radio buttons function

* Simplify radio buttons with modeOption

* Better naming

* Rearrange options

* Add all/any/none functionality on backend

* Small PR cleanup

* Move to service from scope

* Small cleanup, add proper service tests

* Don't use send with user input :D

* Set appropriate column header

* Handle auto updating timeline

* Fix up toggle function

* Use tag value correctly

* A bit more correct to use 'self' rather than 'all' in status scope

* Fix some style issues

* Fix more code style issues

* Style select dropdown more better

* Only use to_id'ed value to ensure no SQL injection

* Revamp frontend to allow for multiple selects

* Update backend / col header to account for more flexible tagging

* Update brakeman ignore

* Codeclimate suggestions

* Fix presenter tag_url

* Implement initial PR feedback

* Handle additional tag streaming

* CodeClimate tweak
James Kiesel 10 months ago
parent
commit
4c03e05a4e

+ 1
- 1
app/controllers/api/v1/timelines/tag_controller.rb View File

@@ -45,7 +45,7 @@ class Api::V1::Timelines::TagController < Api::BaseController
45 45
   end
46 46
 
47 47
   def tag_timeline_statuses
48
-    Status.as_tag_timeline(@tag, current_account, truthy_param?(:local))
48
+    HashtagQueryService.new.call(@tag, params.slice(:any, :all, :none), current_account, truthy_param?(:local))
49 49
   end
50 50
 
51 51
   def insert_pagination_headers

+ 4
- 3
app/controllers/tags_controller.rb View File

@@ -16,14 +16,15 @@ class TagsController < ApplicationController
16 16
       end
17 17
 
18 18
       format.rss do
19
-        @statuses = Status.as_tag_timeline(@tag).limit(PAGE_SIZE)
19
+        @statuses = HashtagQueryService.new.call(@tag, params.slice(:any, :all, :none)).limit(PAGE_SIZE)
20 20
         @statuses = cache_collection(@statuses, Status)
21 21
 
22 22
         render xml: RSS::TagSerializer.render(@tag, @statuses)
23 23
       end
24 24
 
25 25
       format.json do
26
-        @statuses = Status.as_tag_timeline(@tag, current_account, params[:local]).paginate_by_max_id(PAGE_SIZE, params[:max_id])
26
+        @statuses = HashtagQueryService.new.call(@tag, params.slice(:any, :all, :none), current_account, params[:local])
27
+                                       .paginate_by_max_id(PAGE_SIZE, params[:max_id])
27 28
         @statuses = cache_collection(@statuses, Status)
28 29
 
29 30
         render json: collection_presenter,
@@ -46,7 +47,7 @@ class TagsController < ApplicationController
46 47
 
47 48
   def collection_presenter
48 49
     ActivityPub::CollectionPresenter.new(
49
-      id: tag_url(@tag),
50
+      id: tag_url(@tag, params.slice(:any, :all, :none)),
50 51
       type: :ordered,
51 52
       size: @tag.statuses.count,
52 53
       items: @statuses.map { |s| ActivityPub::TagManager.instance.uri_for(s) }

+ 3
- 3
app/javascript/mastodon/actions/streaming.js View File

@@ -12,7 +12,7 @@ import { getLocale } from '../locales';
12 12
 
13 13
 const { messages } = getLocale();
14 14
 
15
-export function connectTimelineStream (timelineId, path, pollingRefresh = null) {
15
+export function connectTimelineStream (timelineId, path, pollingRefresh = null, accept = null) {
16 16
 
17 17
   return connectStream (path, pollingRefresh, (dispatch, getState) => {
18 18
     const locale = getState().getIn(['meta', 'locale']);
@@ -24,7 +24,7 @@ export function connectTimelineStream (timelineId, path, pollingRefresh = null)
24 24
       onReceive (data) {
25 25
         switch(data.event) {
26 26
         case 'update':
27
-          dispatch(updateTimeline(timelineId, JSON.parse(data.payload)));
27
+          dispatch(updateTimeline(timelineId, JSON.parse(data.payload), accept));
28 28
           break;
29 29
         case 'delete':
30 30
           dispatch(deleteFromTimelines(data.payload));
@@ -51,6 +51,6 @@ const refreshHomeTimelineAndNotification = (dispatch, done) => {
51 51
 export const connectUserStream      = () => connectTimelineStream('home', 'user', refreshHomeTimelineAndNotification);
52 52
 export const connectCommunityStream = ({ onlyMedia } = {}) => connectTimelineStream(`community${onlyMedia ? ':media' : ''}`, `public:local${onlyMedia ? ':media' : ''}`);
53 53
 export const connectPublicStream    = ({ onlyMedia } = {}) => connectTimelineStream(`public${onlyMedia ? ':media' : ''}`, `public${onlyMedia ? ':media' : ''}`);
54
-export const connectHashtagStream   = tag => connectTimelineStream(`hashtag:${tag}`, `hashtag&tag=${tag}`);
54
+export const connectHashtagStream   = (id, tag, accept) => connectTimelineStream(`hashtag:${id}`, `hashtag&tag=${tag}`, null, accept);
55 55
 export const connectDirectStream    = () => connectTimelineStream('direct', 'direct');
56 56
 export const connectListStream      = id => connectTimelineStream(`list:${id}`, `list&list=${id}`);

+ 27
- 2
app/javascript/mastodon/actions/timelines.js View File

@@ -4,6 +4,7 @@ import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
4 4
 
5 5
 export const TIMELINE_UPDATE  = 'TIMELINE_UPDATE';
6 6
 export const TIMELINE_DELETE  = 'TIMELINE_DELETE';
7
+export const TIMELINE_CLEAR   = 'TIMELINE_CLEAR';
7 8
 
8 9
 export const TIMELINE_EXPAND_REQUEST = 'TIMELINE_EXPAND_REQUEST';
9 10
 export const TIMELINE_EXPAND_SUCCESS = 'TIMELINE_EXPAND_SUCCESS';
@@ -13,10 +14,14 @@ export const TIMELINE_SCROLL_TOP = 'TIMELINE_SCROLL_TOP';
13 14
 
14 15
 export const TIMELINE_DISCONNECT = 'TIMELINE_DISCONNECT';
15 16
 
16
-export function updateTimeline(timeline, status) {
17
+export function updateTimeline(timeline, status, accept) {
17 18
   return (dispatch, getState) => {
18 19
     const references = status.reblog ? getState().get('statuses').filter((item, itemId) => (itemId === status.reblog.id || item.get('reblog') === status.reblog.id)).map((_, itemId) => itemId) : [];
19 20
 
21
+    if (typeof accept === 'function' && !accept(status)) {
22
+      return;
23
+    }
24
+
20 25
     dispatch(importFetchedStatus(status));
21 26
 
22 27
     dispatch({
@@ -44,8 +49,20 @@ export function deleteFromTimelines(id) {
44 49
   };
45 50
 };
46 51
 
52
+export function clearTimeline(timeline) {
53
+  return (dispatch) => {
54
+    dispatch({ type: TIMELINE_CLEAR, timeline });
55
+  };
56
+};
57
+
47 58
 const noOp = () => {};
48 59
 
60
+const parseTags = (tags = {}, mode) => {
61
+  return (tags[mode] || []).map((tag) => {
62
+    return tag.value;
63
+  });
64
+};
65
+
49 66
 export function expandTimeline(timelineId, path, params = {}, done = noOp) {
50 67
   return (dispatch, getState) => {
51 68
     const timeline = getState().getIn(['timelines', timelineId], ImmutableMap());
@@ -79,9 +96,17 @@ export const expandCommunityTimeline       = ({ maxId, onlyMedia } = {}, done =
79 96
 export const expandAccountTimeline         = (accountId, { maxId, withReplies } = {}) => expandTimeline(`account:${accountId}${withReplies ? ':with_replies' : ''}`, `/api/v1/accounts/${accountId}/statuses`, { exclude_replies: !withReplies, max_id: maxId });
80 97
 export const expandAccountFeaturedTimeline = accountId => expandTimeline(`account:${accountId}:pinned`, `/api/v1/accounts/${accountId}/statuses`, { pinned: true });
81 98
 export const expandAccountMediaTimeline    = (accountId, { maxId } = {}) => expandTimeline(`account:${accountId}:media`, `/api/v1/accounts/${accountId}/statuses`, { max_id: maxId, only_media: true });
82
-export const expandHashtagTimeline         = (hashtag, { maxId } = {}, done = noOp) => expandTimeline(`hashtag:${hashtag}`, `/api/v1/timelines/tag/${hashtag}`, { max_id: maxId }, done);
83 99
 export const expandListTimeline            = (id, { maxId } = {}, done = noOp) => expandTimeline(`list:${id}`, `/api/v1/timelines/list/${id}`, { max_id: maxId }, done);
84 100
 
101
+export const expandHashtagTimeline         = (hashtag, { maxId, tags } = {}, done = noOp) => {
102
+  return expandTimeline(`hashtag:${hashtag}`, `/api/v1/timelines/tag/${hashtag}`, {
103
+    max_id: maxId,
104
+    any: parseTags(tags, 'any'),
105
+    all: parseTags(tags, 'all'),
106
+    none: parseTags(tags, 'none'),
107
+  }, done);
108
+};
109
+
85 110
 export function expandTimelineRequest(timeline) {
86 111
   return {
87 112
     type: TIMELINE_EXPAND_REQUEST,

+ 102
- 0
app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js View File

@@ -0,0 +1,102 @@
1
+import React from 'react';
2
+import PropTypes from 'prop-types';
3
+import ImmutablePropTypes from 'react-immutable-proptypes';
4
+import { injectIntl, FormattedMessage } from 'react-intl';
5
+import Toggle from 'react-toggle';
6
+import AsyncSelect from 'react-select/lib/Async';
7
+
8
+@injectIntl
9
+export default class ColumnSettings extends React.PureComponent {
10
+
11
+  static propTypes = {
12
+    settings: ImmutablePropTypes.map.isRequired,
13
+    onChange: PropTypes.func.isRequired,
14
+    onLoad: PropTypes.func.isRequired,
15
+    intl: PropTypes.object.isRequired,
16
+  };
17
+
18
+  state = {
19
+    open: this.hasTags(),
20
+  };
21
+
22
+  hasTags () {
23
+    return ['all', 'any', 'none'].map(mode => this.tags(mode).length > 0).includes(true);
24
+  }
25
+
26
+  tags (mode) {
27
+    let tags = this.props.settings.getIn(['tags', mode]) || [];
28
+    if (tags.toJSON) {
29
+      return tags.toJSON();
30
+    } else {
31
+      return tags;
32
+    }
33
+  };
34
+
35
+  onSelect = (mode) => {
36
+    return (value) => {
37
+      this.props.onChange(['tags', mode], value);
38
+    };
39
+  };
40
+
41
+  onToggle = () => {
42
+    if (this.state.open && this.hasTags()) {
43
+      this.props.onChange('tags', {});
44
+    }
45
+    this.setState({ open: !this.state.open });
46
+  };
47
+
48
+  modeSelect (mode) {
49
+    return (
50
+      <div className='column-settings__section'>
51
+        {this.modeLabel(mode)}
52
+        <AsyncSelect
53
+          isMulti
54
+          autoFocus
55
+          value={this.tags(mode)}
56
+          settings={this.props.settings}
57
+          settingPath={['tags', mode]}
58
+          onChange={this.onSelect(mode)}
59
+          loadOptions={this.props.onLoad}
60
+          classNamePrefix='column-settings__hashtag-select'
61
+          name='tags'
62
+        />
63
+      </div>
64
+    );
65
+  }
66
+
67
+  modeLabel (mode) {
68
+    switch(mode) {
69
+    case 'any':  return <FormattedMessage id='hashtag.column_settings.tag_mode.any' defaultMessage='Any of these' />;
70
+    case 'all':  return <FormattedMessage id='hashtag.column_settings.tag_mode.all' defaultMessage='All of these' />;
71
+    case 'none': return <FormattedMessage id='hashtag.column_settings.tag_mode.none' defaultMessage='None of these' />;
72
+    }
73
+    return '';
74
+  };
75
+
76
+  render () {
77
+    return (
78
+      <div>
79
+        <div className='column-settings__row'>
80
+          <div className='setting-toggle'>
81
+            <Toggle
82
+              id='hashtag.column_settings.tag_toggle'
83
+              onChange={this.onToggle}
84
+              checked={this.state.open}
85
+            />
86
+            <span className='setting-toggle__label'>
87
+              <FormattedMessage id='hashtag.column_settings.tag_toggle' defaultMessage='Include additional tags in this column' />
88
+            </span>
89
+          </div>
90
+        </div>
91
+        {this.state.open &&
92
+          <div className='column-settings__hashtags'>
93
+            {this.modeSelect('any')}
94
+            {this.modeSelect('all')}
95
+            {this.modeSelect('none')}
96
+          </div>
97
+        }
98
+      </div>
99
+    );
100
+  }
101
+
102
+}

+ 31
- 0
app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js View File

@@ -0,0 +1,31 @@
1
+import { connect } from 'react-redux';
2
+import ColumnSettings from '../components/column_settings';
3
+import { changeColumnParams } from '../../../actions/columns';
4
+import api from '../../../api';
5
+
6
+const mapStateToProps = (state, { columnId }) => {
7
+  const columns = state.getIn(['settings', 'columns']);
8
+  const index   = columns.findIndex(c => c.get('uuid') === columnId);
9
+
10
+  if (!(columnId && index >= 0)) {
11
+    return {};
12
+  }
13
+
14
+  return { settings: columns.get(index).get('params') };
15
+};
16
+
17
+const mapDispatchToProps = (dispatch, { columnId }) => ({
18
+  onChange (key, value) {
19
+    dispatch(changeColumnParams(columnId, key, value));
20
+  },
21
+
22
+  onLoad (value) {
23
+    return api().get('/api/v2/search', { params: { q: value } }).then(response => {
24
+      return (response.data.hashtags || []).map((tag) => {
25
+        return { value: tag.name, label: `#${tag.name}` };
26
+      });
27
+    });
28
+  },
29
+});
30
+
31
+export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);

+ 56
- 16
app/javascript/mastodon/features/hashtag_timeline/index.js View File

@@ -4,7 +4,8 @@ import PropTypes from 'prop-types';
4 4
 import StatusListContainer from '../ui/containers/status_list_container';
5 5
 import Column from '../../components/column';
6 6
 import ColumnHeader from '../../components/column_header';
7
-import { expandHashtagTimeline } from '../../actions/timelines';
7
+import ColumnSettingsContainer from './containers/column_settings_container';
8
+import { expandHashtagTimeline, clearTimeline } from '../../actions/timelines';
8 9
 import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
9 10
 import { FormattedMessage } from 'react-intl';
10 11
 import { connectHashtagStream } from '../../actions/streaming';
@@ -16,6 +17,8 @@ const mapStateToProps = (state, props) => ({
16 17
 export default @connect(mapStateToProps)
17 18
 class HashtagTimeline extends React.PureComponent {
18 19
 
20
+  disconnects = [];
21
+
19 22
   static propTypes = {
20 23
     params: PropTypes.object.isRequired,
21 24
     columnId: PropTypes.string,
@@ -35,6 +38,30 @@ class HashtagTimeline extends React.PureComponent {
35 38
     }
36 39
   }
37 40
 
41
+  title = () => {
42
+    let title = [this.props.params.id];
43
+    if (this.additionalFor('any')) {
44
+      title.push(<FormattedMessage id='hashtag.column_header.tag_mode.any'  values={{ additional: this.additionalFor('any') }} defaultMessage=' or {additional}' />);
45
+    }
46
+    if (this.additionalFor('all')) {
47
+      title.push(<FormattedMessage id='hashtag.column_header.tag_mode.all'  values={{ additional: this.additionalFor('all') }} defaultMessage=' and {additional}' />);
48
+    }
49
+    if (this.additionalFor('none')) {
50
+      title.push(<FormattedMessage id='hashtag.column_header.tag_mode.none' values={{ additional: this.additionalFor('none') }} defaultMessage=' without {additional}' />);
51
+    }
52
+    return title;
53
+  }
54
+
55
+  additionalFor = (mode) => {
56
+    const { tags } = this.props.params;
57
+
58
+    if (tags && (tags[mode] || []).length > 0) {
59
+      return tags[mode].map(tag => tag.value).join('/');
60
+    } else {
61
+      return '';
62
+    }
63
+  }
64
+
38 65
   handleMove = (dir) => {
39 66
     const { columnId, dispatch } = this.props;
40 67
     dispatch(moveColumn(columnId, dir));
@@ -44,30 +71,40 @@ class HashtagTimeline extends React.PureComponent {
44 71
     this.column.scrollTop();
45 72
   }
46 73
 
47
-  _subscribe (dispatch, id) {
48
-    this.disconnect = dispatch(connectHashtagStream(id));
74
+  _subscribe (dispatch, id, tags = {}) {
75
+    let any  = (tags.any || []).map(tag => tag.value);
76
+    let all  = (tags.all || []).map(tag => tag.value);
77
+    let none = (tags.none || []).map(tag => tag.value);
78
+
79
+    [id, ...any].map((tag) => {
80
+      this.disconnects.push(dispatch(connectHashtagStream(id, tag, (status) => {
81
+        let tags = status.tags.map(tag => tag.name);
82
+        return all.filter(tag => tags.includes(tag)).length === all.length &&
83
+               none.filter(tag => tags.includes(tag)).length === 0;
84
+      })));
85
+    });
49 86
   }
50 87
 
51 88
   _unsubscribe () {
52
-    if (this.disconnect) {
53
-      this.disconnect();
54
-      this.disconnect = null;
55
-    }
89
+    this.disconnects.map(disconnect => disconnect());
90
+    this.disconnects = [];
56 91
   }
57 92
 
58 93
   componentDidMount () {
59 94
     const { dispatch } = this.props;
60
-    const { id } = this.props.params;
95
+    const { id, tags } = this.props.params;
61 96
 
62
-    dispatch(expandHashtagTimeline(id));
63
-    this._subscribe(dispatch, id);
97
+    dispatch(expandHashtagTimeline(id, { tags }));
64 98
   }
65 99
 
66 100
   componentWillReceiveProps (nextProps) {
67
-    if (nextProps.params.id !== this.props.params.id) {
68
-      this.props.dispatch(expandHashtagTimeline(nextProps.params.id));
101
+    const { dispatch, params } = this.props;
102
+    const { id, tags } = nextProps.params;
103
+    if (id !== params.id || tags !== params.tags) {
69 104
       this._unsubscribe();
70
-      this._subscribe(this.props.dispatch, nextProps.params.id);
105
+      this._subscribe(dispatch, id, tags);
106
+      this.props.dispatch(clearTimeline(`hashtag:${id}`));
107
+      this.props.dispatch(expandHashtagTimeline(id, { tags }));
71 108
     }
72 109
   }
73 110
 
@@ -80,7 +117,8 @@ class HashtagTimeline extends React.PureComponent {
80 117
   }
81 118
 
82 119
   handleLoadMore = maxId => {
83
-    this.props.dispatch(expandHashtagTimeline(this.props.params.id, { maxId }));
120
+    const { id, tags } = this.props.params;
121
+    this.props.dispatch(expandHashtagTimeline(id, { maxId, tags }));
84 122
   }
85 123
 
86 124
   render () {
@@ -93,14 +131,16 @@ class HashtagTimeline extends React.PureComponent {
93 131
         <ColumnHeader
94 132
           icon='hashtag'
95 133
           active={hasUnread}
96
-          title={id}
134
+          title={this.title()}
97 135
           onPin={this.handlePin}
98 136
           onMove={this.handleMove}
99 137
           onClick={this.handleHeaderClick}
100 138
           pinned={pinned}
101 139
           multiColumn={multiColumn}
102 140
           showBackButton
103
-        />
141
+        >
142
+          {columnId && <ColumnSettingsContainer columnId={columnId} />}
143
+        </ColumnHeader>
104 144
 
105 145
         <StatusListContainer
106 146
           trackScroll={!pinned}

+ 1
- 1
app/javascript/mastodon/features/standalone/hashtag_timeline/index.js View File

@@ -27,7 +27,7 @@ class HashtagTimeline extends React.PureComponent {
27 27
     const { dispatch, hashtag } = this.props;
28 28
 
29 29
     dispatch(expandHashtagTimeline(hashtag));
30
-    this.disconnect = dispatch(connectHashtagStream(hashtag));
30
+    this.disconnect = dispatch(connectHashtagStream(hashtag, hashtag));
31 31
   }
32 32
 
33 33
   componentWillUnmount () {

+ 7
- 0
app/javascript/mastodon/locales/en.json View File

@@ -137,6 +137,13 @@
137 137
   "getting_started.open_source_notice": "Mastodon is open source software. You can contribute or report issues on GitHub at {github}.",
138 138
   "getting_started.security": "Security",
139 139
   "getting_started.terms": "Terms of service",
140
+  "hashtag.column_settings.tag_toggle": "Include additional tags for this column",
141
+  "hashtag.column_settings.tag_mode.any": "Any of these",
142
+  "hashtag.column_settings.tag_mode.all": "All of these",
143
+  "hashtag.column_settings.tag_mode.none": "None of these",
144
+  "hashtag.column_header.tag_mode.any": "{tag} or {additional}",
145
+  "hashtag.column_header.tag_mode.all": "{tag} and {additional}",
146
+  "hashtag.column_header.tag_mode.none": "{tag} without {additional}",
140 147
   "home.column_settings.basic": "Basic",
141 148
   "home.column_settings.show_reblogs": "Show boosts",
142 149
   "home.column_settings.show_replies": "Show replies",

+ 7
- 0
app/javascript/mastodon/reducers/timelines.js View File

@@ -1,6 +1,7 @@
1 1
 import {
2 2
   TIMELINE_UPDATE,
3 3
   TIMELINE_DELETE,
4
+  TIMELINE_CLEAR,
4 5
   TIMELINE_EXPAND_SUCCESS,
5 6
   TIMELINE_EXPAND_REQUEST,
6 7
   TIMELINE_EXPAND_FAIL,
@@ -86,6 +87,10 @@ const deleteStatus = (state, id, accountId, references) => {
86 87
   return state;
87 88
 };
88 89
 
90
+const clearTimeline = (state, timeline) => {
91
+  return state.updateIn([timeline, 'items'], list => list.clear());
92
+};
93
+
89 94
 const filterTimelines = (state, relationship, statuses) => {
90 95
   let references;
91 96
 
@@ -126,6 +131,8 @@ export default function timelines(state = initialState, action) {
126 131
     return updateTimeline(state, action.timeline, fromJS(action.status));
127 132
   case TIMELINE_DELETE:
128 133
     return deleteStatus(state, action.id, action.accountId, action.references, action.reblogOf);
134
+  case TIMELINE_CLEAR:
135
+    return clearTimeline(state, action.timeline);
129 136
   case ACCOUNT_BLOCK_SUCCESS:
130 137
   case ACCOUNT_MUTE_SUCCESS:
131 138
     return filterTimelines(state, action.relationship, action.statuses);

+ 31
- 0
app/javascript/styles/mastodon/_mixins.scss View File

@@ -10,3 +10,34 @@
10 10
   height: $size;
11 11
   background-size: $size $size;
12 12
 }
13
+
14
+@mixin search-input() {
15
+  outline: 0;
16
+  box-sizing: border-box;
17
+  width: 100%;
18
+  border: none;
19
+  box-shadow: none;
20
+  font-family: inherit;
21
+  background: $ui-base-color;
22
+  color: $darker-text-color;
23
+  font-size: 14px;
24
+  margin: 0;
25
+
26
+  &::-moz-focus-inner {
27
+    border: 0;
28
+  }
29
+
30
+  &::-moz-focus-inner,
31
+  &:focus,
32
+  &:active {
33
+    outline: 0 !important;
34
+  }
35
+
36
+  &:focus {
37
+    background: lighten($ui-base-color, 4%);
38
+  }
39
+
40
+  @media screen and (max-width: 600px) {
41
+    font-size: 16px;
42
+  }
43
+}

+ 21
- 27
app/javascript/styles/mastodon/components.scss View File

@@ -3022,6 +3022,26 @@ a.status-card.compact:hover {
3022 3022
   display: block;
3023 3023
   font-weight: 500;
3024 3024
   margin-bottom: 10px;
3025
+
3026
+  .column-settings__hashtag-select {
3027
+    &__control {
3028
+      @include search-input();
3029
+    }
3030
+
3031
+    &__multi-value {
3032
+      background: lighten($ui-base-color, 8%);
3033
+    }
3034
+
3035
+    &__multi-value__label,
3036
+    &__input {
3037
+      color: $darker-text-color;
3038
+    }
3039
+
3040
+    &__indicator-separator,
3041
+    &__dropdown-indicator {
3042
+      display: none;
3043
+    }
3044
+  }
3025 3045
 }
3026 3046
 
3027 3047
 .column-settings__row {
@@ -3473,36 +3493,10 @@ a.status-card.compact:hover {
3473 3493
 }
3474 3494
 
3475 3495
 .search__input {
3476
-  outline: 0;
3477
-  box-sizing: border-box;
3478 3496
   display: block;
3479
-  width: 100%;
3480
-  border: none;
3481 3497
   padding: 10px;
3482 3498
   padding-right: 30px;
3483
-  font-family: inherit;
3484
-  background: $ui-base-color;
3485
-  color: $darker-text-color;
3486
-  font-size: 14px;
3487
-  margin: 0;
3488
-
3489
-  &::-moz-focus-inner {
3490
-    border: 0;
3491
-  }
3492
-
3493
-  &::-moz-focus-inner,
3494
-  &:focus,
3495
-  &:active {
3496
-    outline: 0 !important;
3497
-  }
3498
-
3499
-  &:focus {
3500
-    background: lighten($ui-base-color, 4%);
3501
-  }
3502
-
3503
-  @media screen and (max-width: 600px) {
3504
-    font-size: 16px;
3505
-  }
3499
+  @include search-input();
3506 3500
 }
3507 3501
 
3508 3502
 .search__icon {

+ 11
- 0
app/models/status.rb View File

@@ -82,6 +82,17 @@ class Status < ApplicationRecord
82 82
   scope :including_silenced_accounts, -> { left_outer_joins(:account).where(accounts: { silenced: true }) }
83 83
   scope :not_excluded_by_account, ->(account) { where.not(account_id: account.excluded_from_timeline_account_ids) }
84 84
   scope :not_domain_blocked_by_account, ->(account) { account.excluded_from_timeline_domains.blank? ? left_outer_joins(:account) : left_outer_joins(:account).where('accounts.domain IS NULL OR accounts.domain NOT IN (?)', account.excluded_from_timeline_domains) }
85
+  scope :tagged_with_all, ->(tags) {
86
+    Array(tags).map(&:id).map(&:to_i).reduce(self) do |result, id|
87
+      result.joins("INNER JOIN statuses_tags t#{id} ON t#{id}.status_id = statuses.id AND t#{id}.tag_id = #{id}")
88
+    end
89
+  }
90
+  scope :tagged_with_none, ->(tags) {
91
+    Array(tags).map(&:id).map(&:to_i).reduce(self) do |result, id|
92
+      result.joins("LEFT OUTER JOIN statuses_tags t#{id} ON t#{id}.status_id = statuses.id AND t#{id}.tag_id = #{id}")
93
+            .where("t#{id}.tag_id IS NULL")
94
+    end
95
+  }
85 96
 
86 97
   cache_associated :account,
87 98
                    :application,

+ 21
- 0
app/services/hashtag_query_service.rb View File

@@ -0,0 +1,21 @@
1
+# frozen_string_literal: true
2
+
3
+class HashtagQueryService < BaseService
4
+  def call(tag, params, account = nil, local = false)
5
+    any  = tags_for(params[:any])
6
+    all  = tags_for(params[:all])
7
+    none = tags_for(params[:none])
8
+
9
+    @query = Status.as_tag_timeline(tag, account, local)
10
+                   .tagged_with_all(all)
11
+                   .tagged_with_none(none)
12
+    @query = @query.distinct.or(self.class.new.call(any, params.except(:any), account, local).distinct) if any
13
+    @query
14
+  end
15
+
16
+  private
17
+
18
+  def tags_for(tags)
19
+    Tag.where(name: tags.map(&:downcase)) if tags.presence
20
+  end
21
+end

+ 43
- 22
config/brakeman.ignore View File

@@ -7,7 +7,7 @@
7 7
       "check_name": "SQL",
8 8
       "message": "Possible SQL injection",
9 9
       "file": "app/models/report.rb",
10
-      "line": 86,
10
+      "line": 90,
11 11
       "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
12 12
       "code": "Admin::ActionLog.from(\"(#{[Admin::ActionLog.where(:target_type => \"Report\", :target_id => id, :created_at => ((created_at..updated_at))).unscope(:order), Admin::ActionLog.where(:target_type => \"Account\", :target_id => target_account_id, :created_at => ((created_at..updated_at))).unscope(:order), Admin::ActionLog.where(:target_type => \"Status\", :target_id => status_ids, :created_at => ((created_at..updated_at))).unscope(:order)].map do\n \"(#{query.to_sql})\"\n end.join(\" UNION ALL \")}) AS admin_action_logs\")",
13 13
       "render_path": null,
@@ -40,6 +40,26 @@
40 40
       "note": ""
41 41
     },
42 42
     {
43
+      "warning_type": "SQL Injection",
44
+      "warning_code": 0,
45
+      "fingerprint": "19df3740b8d02a9fe0eb52c939b4b87d3a2a591162a6adfa8d64e9c26aeebe6d",
46
+      "check_name": "SQL",
47
+      "message": "Possible SQL injection",
48
+      "file": "app/models/status.rb",
49
+      "line": 84,
50
+      "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
51
+      "code": "result.joins(\"INNER JOIN statuses_tags t#{id} ON t#{id}.status_id = statuses.id AND t#{id}.tag_id = #{id}\")",
52
+      "render_path": null,
53
+      "location": {
54
+        "type": "method",
55
+        "class": "Status",
56
+        "method": null
57
+      },
58
+      "user_input": "id",
59
+      "confidence": "Weak",
60
+      "note": ""
61
+    },
62
+    {
43 63
       "warning_type": "Cross-Site Scripting",
44 64
       "warning_code": 4,
45 65
       "fingerprint": "1fc29c578d0c89bf13bd5476829d272d54cd06b92ccf6df18568fa1f2674926e",
@@ -175,6 +195,26 @@
175 195
       "note": ""
176 196
     },
177 197
     {
198
+      "warning_type": "SQL Injection",
199
+      "warning_code": 0,
200
+      "fingerprint": "6f075c1484908e3ec9bed21ab7cf3c7866be8da3881485d1c82e13093aefcbd7",
201
+      "check_name": "SQL",
202
+      "message": "Possible SQL injection",
203
+      "file": "app/models/status.rb",
204
+      "line": 89,
205
+      "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
206
+      "code": "result.joins(\"LEFT OUTER JOIN statuses_tags t#{id} ON t#{id}.status_id = statuses.id AND t#{id}.tag_id = #{id}\")",
207
+      "render_path": null,
208
+      "location": {
209
+        "type": "method",
210
+        "class": "Status",
211
+        "method": null
212
+      },
213
+      "user_input": "id",
214
+      "confidence": "Weak",
215
+      "note": ""
216
+    },
217
+    {
178 218
       "warning_type": "Cross-Site Scripting",
179 219
       "warning_code": 4,
180 220
       "fingerprint": "82f7b0d09beb3ab68e0fa16be63cedf4e820f2490326e9a1cec05761d92446cd",
@@ -311,25 +351,6 @@
311 351
       "note": ""
312 352
     },
313 353
     {
314
-      "warning_type": "Dynamic Render Path",
315
-      "warning_code": 15,
316
-      "fingerprint": "c5d6945d63264af106d49367228d206aa2f176699ecdce2b98fac101bc6a96cf",
317
-      "check_name": "Render",
318
-      "message": "Render path contains parameter value",
319
-      "file": "app/views/admin/reports/index.html.haml",
320
-      "line": 22,
321
-      "link": "https://brakemanscanner.org/docs/warning_types/dynamic_render_path/",
322
-      "code": "render(action => filtered_reports.page(params[:page]), {})",
323
-      "render_path": [{"type":"controller","class":"Admin::ReportsController","method":"index","line":10,"file":"app/controllers/admin/reports_controller.rb"}],
324
-      "location": {
325
-        "type": "template",
326
-        "template": "admin/reports/index"
327
-      },
328
-      "user_input": "params[:page]",
329
-      "confidence": "Weak",
330
-      "note": ""
331
-    },
332
-    {
333 354
       "warning_type": "Cross-Site Scripting",
334 355
       "warning_code": 4,
335 356
       "fingerprint": "e04aafe1e06cf8317fb6ac0a7f35783e45aa1274272ee6eaf28d39adfdad489b",
@@ -355,7 +376,7 @@
355 376
       "check_name": "PermitAttributes",
356 377
       "message": "Potentially dangerous key allowed for mass assignment",
357 378
       "file": "app/controllers/api/v1/reports_controller.rb",
358
-      "line": 42,
379
+      "line": 37,
359 380
       "link": "https://brakemanscanner.org/docs/warning_types/mass_assignment/",
360 381
       "code": "params.permit(:account_id, :comment, :forward, :status_ids => ([]))",
361 382
       "render_path": null,
@@ -388,6 +409,6 @@
388 409
       "note": ""
389 410
     }
390 411
   ],
391
-  "updated": "2018-08-30 21:55:10 +0200",
412
+  "updated": "2018-10-20 23:24:45 +1300",
392 413
   "brakeman_version": "4.2.1"
393 414
 }

+ 1
- 0
package.json View File

@@ -104,6 +104,7 @@
104 104
     "react-redux-loading-bar": "^2.9.3",
105 105
     "react-router-dom": "^4.1.1",
106 106
     "react-router-scroll-4": "^1.0.0-beta.1",
107
+    "react-select": "^2.0.0",
107 108
     "react-sparklines": "^1.7.0",
108 109
     "react-swipeable-views": "^0.12.17",
109 110
     "react-textarea-autosize": "^5.2.1",

+ 60
- 0
spec/services/hashtag_query_service_spec.rb View File

@@ -0,0 +1,60 @@
1
+require 'rails_helper'
2
+
3
+describe HashtagQueryService, type: :service do
4
+  describe '.call' do
5
+    let(:account) { Fabricate(:account) }
6
+    let(:tag1) { Fabricate(:tag) }
7
+    let(:tag2) { Fabricate(:tag) }
8
+    let!(:status1) { Fabricate(:status, tags: [tag1]) }
9
+    let!(:status2) { Fabricate(:status, tags: [tag2]) }
10
+    let!(:both) { Fabricate(:status, tags: [tag1, tag2]) }
11
+
12
+    it 'can add tags in "any" mode' do
13
+      results = subject.call(tag1, { any: [tag2.name] })
14
+      expect(results).to include status1
15
+      expect(results).to include status2
16
+      expect(results).to include both
17
+    end
18
+
19
+    it 'can remove tags in "all" mode' do
20
+      results = subject.call(tag1, { all: [tag2.name] })
21
+      expect(results).to_not include status1
22
+      expect(results).to_not include status2
23
+      expect(results).to     include both
24
+    end
25
+
26
+    it 'can remove tags in "none" mode' do
27
+      results = subject.call(tag1, { none: [tag2.name] })
28
+      expect(results).to     include status1
29
+      expect(results).to_not include status2
30
+      expect(results).to_not include both
31
+    end
32
+
33
+    it 'ignores an invalid mode' do
34
+      results = subject.call(tag1, { wark: [tag2.name] })
35
+      expect(results).to     include status1
36
+      expect(results).to_not include status2
37
+      expect(results).to     include both
38
+    end
39
+
40
+    it 'handles being passed non existant tag names' do
41
+      results = subject.call(tag1, { any: ['wark'] })
42
+      expect(results).to     include status1
43
+      expect(results).to_not include status2
44
+      expect(results).to     include both
45
+    end
46
+
47
+    it 'can restrict to an account' do
48
+      BlockService.new.call(account, status1.account)
49
+      results = subject.call(tag1, { none: [tag2.name] }, account)
50
+      expect(results).to_not include status1
51
+    end
52
+
53
+    it 'can restrict to local' do
54
+      status1.account.update(domain: 'example.com')
55
+      status1.update(local: false, uri: 'example.com/toot')
56
+      results = subject.call(tag1, { any: [tag2.name] }, nil, true)
57
+      expect(results).to_not include status1
58
+    end
59
+  end
60
+end

+ 143
- 4
yarn.lock View File

@@ -731,6 +731,50 @@
731 731
   resolved "https://registry.yarnpkg.com/@csstools/sass-import-resolve/-/sass-import-resolve-1.0.0.tgz#32c3cdb2f7af3cd8f0dca357b592e7271f3831b5"
732 732
   integrity sha512-pH4KCsbtBLLe7eqUrw8brcuFO8IZlN36JjdKlOublibVdAIPHCzEnpBWOVUXK5sCf+DpBi8ZtuWtjF0srybdeA==
733 733
 
734
+"@emotion/babel-utils@^0.6.4":
735
+  version "0.6.9"
736
+  resolved "https://registry.yarnpkg.com/@emotion/babel-utils/-/babel-utils-0.6.9.tgz#bb074fadad65c443a575d3379488415fd194fc75"
737
+  dependencies:
738
+    "@emotion/hash" "^0.6.5"
739
+    "@emotion/memoize" "^0.6.5"
740
+    "@emotion/serialize" "^0.9.0"
741
+    convert-source-map "^1.5.1"
742
+    find-root "^1.1.0"
743
+    source-map "^0.7.2"
744
+
745
+"@emotion/hash@^0.6.2", "@emotion/hash@^0.6.5":
746
+  version "0.6.5"
747
+  resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.6.5.tgz#097729b84a5164f71f9acd2570ecfd1354d7b360"
748
+
749
+"@emotion/memoize@^0.6.1", "@emotion/memoize@^0.6.5":
750
+  version "0.6.5"
751
+  resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.6.5.tgz#f868c314b889e7c3d84868a1d1cc323fbb40ca86"
752
+
753
+"@emotion/serialize@^0.9.0":
754
+  version "0.9.0"
755
+  resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.9.0.tgz#ac5577cb98c7557c1a24a94cc101c5da6dc18322"
756
+  dependencies:
757
+    "@emotion/hash" "^0.6.5"
758
+    "@emotion/memoize" "^0.6.5"
759
+    "@emotion/unitless" "^0.6.6"
760
+    "@emotion/utils" "^0.8.1"
761
+
762
+"@emotion/stylis@^0.6.10":
763
+  version "0.6.12"
764
+  resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.6.12.tgz#3fb58220e0fc9e380bcabbb3edde396ddc1dfe6e"
765
+
766
+"@emotion/stylis@^0.7.0":
767
+  version "0.7.0"
768
+  resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.7.0.tgz#4c30e6fccc9555e42fa6fef98b3bd0788b954684"
769
+
770
+"@emotion/unitless@^0.6.2", "@emotion/unitless@^0.6.6":
771
+  version "0.6.6"
772
+  resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.6.6.tgz#988957ecd0a9be00ee9de27172f8c56d41595a93"
773
+
774
+"@emotion/utils@^0.8.1":
775
+  version "0.8.1"
776
+  resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.8.1.tgz#f3a81587ad8d0ef33cdad6f3b4310774fcc1053e"
777
+
734 778
 "@types/node@*":
735 779
   version "10.9.4"
736 780
   resolved "https://registry.yarnpkg.com/@types/node/-/node-10.9.4.tgz#0f4cb2dc7c1de6096055357f70179043c33e9897"
@@ -1324,7 +1368,7 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
1324 1368
     esutils "^2.0.2"
1325 1369
     js-tokens "^3.0.2"
1326 1370
 
1327
-babel-core@^6.0.0, babel-core@^6.26.0:
1371
+babel-core@^6.0.0, babel-core@^6.26.0, babel-core@^6.26.3:
1328 1372
   version "6.26.3"
1329 1373
   resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
1330 1374
   integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==
@@ -1413,6 +1457,24 @@ babel-messages@^6.23.0:
1413 1457
   dependencies:
1414 1458
     babel-runtime "^6.22.0"
1415 1459
 
1460
+babel-plugin-emotion@^9.2.9:
1461
+  version "9.2.9"
1462
+  resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-9.2.9.tgz#7b3c72fd6a333127abafe7fb693bcb421e7f5b9f"
1463
+  dependencies:
1464
+    "@babel/helper-module-imports" "^7.0.0"
1465
+    "@emotion/babel-utils" "^0.6.4"
1466
+    "@emotion/hash" "^0.6.2"
1467
+    "@emotion/memoize" "^0.6.1"
1468
+    "@emotion/stylis" "^0.7.0"
1469
+    babel-core "^6.26.3"
1470
+    babel-plugin-macros "^2.0.0"
1471
+    babel-plugin-syntax-jsx "^6.18.0"
1472
+    convert-source-map "^1.5.0"
1473
+    find-root "^1.1.0"
1474
+    mkdirp "^0.5.1"
1475
+    source-map "^0.5.7"
1476
+    touch "^1.0.0"
1477
+
1416 1478
 babel-plugin-istanbul@^4.1.6:
1417 1479
   version "4.1.6"
1418 1480
   resolved "http://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45"
@@ -1439,7 +1501,7 @@ babel-plugin-lodash@^3.3.4:
1439 1501
     lodash "^4.17.10"
1440 1502
     require-package-name "^2.0.1"
1441 1503
 
1442
-babel-plugin-macros@^2.2.2:
1504
+babel-plugin-macros@^2.0.0, babel-plugin-macros@^2.2.2:
1443 1505
   version "2.4.0"
1444 1506
   resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.4.0.tgz#6c5f9836e1f6c0a9743b3bab4af29f73e437e544"
1445 1507
   integrity sha512-flIBfrqAdHWn+4l2cS/4jZEyl+m5EaBHVzTb0aOF+eu/zR7E41/MoCFHPhDNL8Wzq1nyelnXeT+vcL2byFLSZw==
@@ -1463,6 +1525,10 @@ babel-plugin-react-intl@^3.0.0:
1463 1525
     intl-messageformat-parser "^1.2.0"
1464 1526
     mkdirp "^0.5.1"
1465 1527
 
1528
+babel-plugin-syntax-jsx@^6.18.0:
1529
+  version "6.18.0"
1530
+  resolved "http://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"
1531
+
1466 1532
 babel-plugin-syntax-object-rest-spread@^6.13.0:
1467 1533
   version "6.13.0"
1468 1534
   resolved "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
@@ -2278,7 +2344,7 @@ content-type@~1.0.4:
2278 2344
   resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
2279 2345
   integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
2280 2346
 
2281
-convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.1:
2347
+convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1:
2282 2348
   version "1.6.0"
2283 2349
   resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20"
2284 2350
   integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==
@@ -2354,6 +2420,18 @@ create-ecdh@^4.0.0:
2354 2420
     bn.js "^4.1.0"
2355 2421
     elliptic "^6.0.0"
2356 2422
 
2423
+create-emotion@^9.2.6:
2424
+  version "9.2.6"
2425
+  resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-9.2.6.tgz#f64cf1c64cf82fe7d22725d1d77498ddd2d39edb"
2426
+  dependencies:
2427
+    "@emotion/hash" "^0.6.2"
2428
+    "@emotion/memoize" "^0.6.1"
2429
+    "@emotion/stylis" "^0.6.10"
2430
+    "@emotion/unitless" "^0.6.2"
2431
+    csstype "^2.5.2"
2432
+    stylis "^3.5.0"
2433
+    stylis-rule-sheet "^0.0.10"
2434
+
2357 2435
 create-hash@^1.1.0, create-hash@^1.1.2:
2358 2436
   version "1.2.0"
2359 2437
   resolved "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196"
@@ -2552,6 +2630,10 @@ csstype@^2.2.0:
2552 2630
   resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.6.tgz#2ae1db2319642d8b80a668d2d025c6196071e788"
2553 2631
   integrity sha512-tKPyhy0FmfYD2KQYXD5GzkvAYLYj96cMLXr648CKGd3wBe0QqoPipImjGiLze9c8leJK8J3n7ap90tpk3E6HGQ==
2554 2632
 
2633
+csstype@^2.5.2:
2634
+  version "2.5.7"
2635
+  resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.7.tgz#bf9235d5872141eccfb2d16d82993c6b149179ff"
2636
+
2555 2637
 currently-unhandled@^0.4.1:
2556 2638
   version "0.4.1"
2557 2639
   resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
@@ -2985,6 +3067,13 @@ emojis-list@^2.0.0:
2985 3067
   resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
2986 3068
   integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k=
2987 3069
 
3070
+emotion@^9.1.2:
3071
+  version "9.2.9"
3072
+  resolved "https://registry.yarnpkg.com/emotion/-/emotion-9.2.9.tgz#c2028705acc60a138ecb69d3fc1d2056764f61a1"
3073
+  dependencies:
3074
+    babel-plugin-emotion "^9.2.9"
3075
+    create-emotion "^9.2.6"
3076
+
2988 3077
 encodeurl@~1.0.2:
2989 3078
   version "1.0.2"
2990 3079
   resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
@@ -3712,6 +3801,10 @@ find-cache-dir@^2.0.0:
3712 3801
     make-dir "^1.0.0"
3713 3802
     pkg-dir "^3.0.0"
3714 3803
 
3804
+find-root@^1.1.0:
3805
+  version "1.1.0"
3806
+  resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4"
3807
+
3715 3808
 find-up@^1.0.0:
3716 3809
   version "1.1.2"
3717 3810
   resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
@@ -5897,6 +5990,10 @@ mem@^4.0.0:
5897 5990
     mimic-fn "^1.0.0"
5898 5991
     p-is-promise "^1.1.0"
5899 5992
 
5993
+memoize-one@^4.0.0:
5994
+  version "4.0.2"
5995
+  resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-4.0.2.tgz#3fb8db695aa14ab9c0f1644e1585a8806adc1aee"
5996
+
5900 5997
 memory-fs@^0.4.0, memory-fs@~0.4.1:
5901 5998
   version "0.4.1"
5902 5999
   resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552"
@@ -6427,6 +6524,12 @@ nopt@^4.0.1:
6427 6524
     abbrev "1"
6428 6525
     osenv "^0.1.4"
6429 6526
 
6527
+nopt@~1.0.10:
6528
+  version "1.0.10"
6529
+  resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee"
6530
+  dependencies:
6531
+    abbrev "1"
6532
+
6430 6533
 normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
6431 6534
   version "2.4.0"
6432 6535
   resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
@@ -7881,6 +7984,12 @@ react-immutable-pure-component@^1.1.1:
7881 7984
   optionalDependencies:
7882 7985
     "@types/react" "16.4.6"
7883 7986
 
7987
+react-input-autosize@^2.2.1:
7988
+  version "2.2.1"
7989
+  resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.1.tgz#ec428fa15b1592994fb5f9aa15bb1eb6baf420f8"
7990
+  dependencies:
7991
+    prop-types "^15.5.8"
7992
+
7884 7993
 react-intl-translations-manager@^5.0.3:
7885 7994
   version "5.0.3"
7886 7995
   resolved "https://registry.yarnpkg.com/react-intl-translations-manager/-/react-intl-translations-manager-5.0.3.tgz#aee010ecf35975673e033ca5d7d3f4147894324d"
@@ -7991,6 +8100,18 @@ react-router@^4.3.1:
7991 8100
     prop-types "^15.6.1"
7992 8101
     warning "^4.0.1"
7993 8102
 
8103
+react-select@^2.0.0:
8104
+  version "2.0.0"
8105
+  resolved "https://registry.yarnpkg.com/react-select/-/react-select-2.0.0.tgz#7e7ba31eff360b37ffc52b343a720f4248bd9b3b"
8106
+  dependencies:
8107
+    classnames "^2.2.5"
8108
+    emotion "^9.1.2"
8109
+    memoize-one "^4.0.0"
8110
+    prop-types "^15.6.0"
8111
+    raf "^3.4.0"
8112
+    react-input-autosize "^2.2.1"
8113
+    react-transition-group "^2.2.1"
8114
+
7994 8115
 react-sparklines@^1.7.0:
7995 8116
   version "1.7.0"
7996 8117
   resolved "https://registry.yarnpkg.com/react-sparklines/-/react-sparklines-1.7.0.tgz#9b1d97e8c8610095eeb2ad658d2e1fcf91f91a60"
@@ -8054,7 +8175,7 @@ react-toggle@^4.0.1:
8054 8175
   dependencies:
8055 8176
     classnames "^2.2.5"
8056 8177
 
8057
-react-transition-group@^2.2.0:
8178
+react-transition-group@^2.2.0, react-transition-group@^2.2.1:
8058 8179
   version "2.4.0"
8059 8180
   resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.4.0.tgz#1d9391fabfd82e016f26fabd1eec329dbd922b5a"
8060 8181
   integrity sha512-Xv5d55NkJUxUzLCImGSanK8Cl/30sgpOEMGc5m86t8+kZwrPxPCPcFqyx83kkr+5Lz5gs6djuvE5By+gce+VjA==
@@ -8981,6 +9102,10 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
8981 9102
   resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
8982 9103
   integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
8983 9104
 
9105
+source-map@^0.7.2:
9106
+  version "0.7.3"
9107
+  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
9108
+
8984 9109
 spdx-correct@^3.0.0:
8985 9110
   version "3.0.0"
8986 9111
   resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82"
@@ -9267,6 +9392,14 @@ style-loader@^0.23.0:
9267 9392
     loader-utils "^1.1.0"
9268 9393
     schema-utils "^0.4.5"
9269 9394
 
9395
+stylis-rule-sheet@^0.0.10:
9396
+  version "0.0.10"
9397
+  resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430"
9398
+
9399
+stylis@^3.5.0:
9400
+  version "3.5.3"
9401
+  resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.3.tgz#99fdc46afba6af4deff570825994181a5e6ce546"
9402
+
9270 9403
 substring-trie@^1.0.2:
9271 9404
   version "1.0.2"
9272 9405
   resolved "https://registry.yarnpkg.com/substring-trie/-/substring-trie-1.0.2.tgz#7b42592391628b4f2cb17365c6cce4257c7b7af5"
@@ -9481,6 +9614,12 @@ to-regex@^3.0.1, to-regex@^3.0.2:
9481 9614
     regex-not "^1.0.2"
9482 9615
     safe-regex "^1.1.0"
9483 9616
 
9617
+touch@^1.0.0:
9618
+  version "1.0.0"
9619
+  resolved "https://registry.yarnpkg.com/touch/-/touch-1.0.0.tgz#449cbe2dbae5a8c8038e30d71fa0ff464947c4de"
9620
+  dependencies:
9621
+    nopt "~1.0.10"
9622
+
9484 9623
 tough-cookie@>=2.3.3, tough-cookie@^2.3.4, tough-cookie@~2.4.3:
9485 9624
   version "2.4.3"
9486 9625
   resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"