]> cat aescling's git repositories - mastodon.git/commit
Add ability to filter individual posts (#18945)
authorClaire <claire.github-309c@sitedethib.com>
Thu, 25 Aug 2022 02:27:47 +0000 (04:27 +0200)
committeraescling <aescling+gitlab@cat.family>
Mon, 5 Sep 2022 04:28:00 +0000 (00:28 -0400)
commit6d482e99d809a3b7d1d0d09a7039fed3701de3dd
tree31b804fb8338f076248b3c7614890d24fa30b701
parent04ef92525a48865b29f592e687a6cbcd9227ef28
Add ability to filter individual posts (#18945)

* Add database table for status-specific filters

* Add REST endpoints, entities and attributes

* Show status filters in /filters interface

* Perform server-side filtering for individual posts filters

* Fix filtering on context mismatch

* Refactor `toServerSideType` by moving it to its own module

* Move loupe and delete icons to their own module

* Add ability to filter individual posts from WebUI

* Replace keyword list by warnings (expired, context mismatch)

* Refactor server-side filtering code

* Add tests
40 files changed:
app/controllers/api/v1/filters/statuses_controller.rb [new file with mode: 0644]
app/controllers/filters/statuses_controller.rb [new file with mode: 0644]
app/controllers/filters_controller.rb
app/javascript/mastodon/actions/filters.js [new file with mode: 0644]
app/javascript/mastodon/actions/statuses.js
app/javascript/mastodon/components/status.js
app/javascript/mastodon/components/status_action_bar.js
app/javascript/mastodon/containers/status_container.js
app/javascript/mastodon/features/compose/components/language_dropdown.js
app/javascript/mastodon/features/filters/added_to_filter.js [new file with mode: 0644]
app/javascript/mastodon/features/filters/select_filter.js [new file with mode: 0644]
app/javascript/mastodon/features/ui/components/filter_modal.js [new file with mode: 0644]
app/javascript/mastodon/features/ui/components/modal_root.js
app/javascript/mastodon/features/ui/util/async-components.js
app/javascript/mastodon/reducers/filters.js
app/javascript/mastodon/selectors/index.js
app/javascript/mastodon/utils/filters.js [new file with mode: 0644]
app/javascript/mastodon/utils/icons.js [new file with mode: 0644]
app/javascript/styles/mastodon/components.scss
app/models/concerns/account_interactions.rb
app/models/custom_filter.rb
app/models/custom_filter_status.rb [new file with mode: 0644]
app/models/form/status_filter_batch_action.rb [new file with mode: 0644]
app/presenters/filter_result_presenter.rb
app/presenters/status_relationships_presenter.rb
app/serializers/rest/filter_result_serializer.rb
app/serializers/rest/filter_serializer.rb
app/serializers/rest/filter_status_serializer.rb [new file with mode: 0644]
app/views/filters/_filter.html.haml
app/views/filters/_filter_fields.html.haml
app/views/filters/statuses/_status_filter.html.haml [new file with mode: 0644]
app/views/filters/statuses/index.html.haml [new file with mode: 0644]
config/locales/en.yml
config/routes.rb
db/migrate/20220808101323_create_custom_filter_statuses.rb [new file with mode: 0644]
db/schema.rb
spec/controllers/api/v1/filters/statuses_controller_spec.rb [new file with mode: 0644]
spec/controllers/api/v1/statuses_controller_spec.rb
spec/fabricators/custom_filter_status_fabricator.rb [new file with mode: 0644]
spec/presenters/status_relationships_presenter_spec.rb