Commit graph

286 commits

Author SHA1 Message Date
Renaud Chaput
e1985e14f6 Fixes build errors from some previous TS-related commits (#24811) 2023-05-03 16:28:14 +02:00
fusagiko / takayamaki
9ed91c444e Rewrite actions/app.ts and reducers/missed_updates.ts with createAction (#24801) 2023-05-03 15:28:39 +02:00
Eugen Rochko
ff65e8e974 Add default post text to onboarding flow in web UI (#24705) 2023-04-28 10:05:34 +02:00
Eugen Rochko
30666618ea Add new onboarding flow to web UI (#24619) 2023-04-23 22:24:53 +02:00
Eugen Rochko
d22e712648 Change search pop-out in web UI (#24305) 2023-04-01 09:59:10 +02:00
Christian Schmidt
7583523bf0 Replace Status#translatable? with language matrix in separate endpoint (#24037) 2023-03-16 11:07:24 +01:00
Dean Bassett
28bc6265bf Fix case-sensitive check for previously used hashtags (#23526) 2023-02-13 14:54:08 +01:00
Claire
3c1e48d304 Fix attached media uploads not being cleared when replying to a post (#23504) 2023-02-10 22:03:35 +01:00
Akira Ouchi
bbcbb2dd7f autofocus the compose form again on /share (#23094) 2023-01-30 14:49:10 +01:00
Nick Schonning
3874a3067d Separate ESLint CI from Superlinter (#23029)
* Separate ESLint CI from Superlinter

* Correct JS indenting level

* Remove extra semicolons with ESLint autofix
2023-01-29 23:44:03 +01:00
Connor Shea
be280f10c5 Add listing of followed hashtags (#21773)
* Add followed_tags route.

This at least gets us to the point where the page can actually be
rendered, although it doesn't display any hashtags (yet?).

Attempting to implement #20763.

* Fix minor issues.

* I've got the followed tags data partially working

But the Hashtag component errors for some reason. Something about the
value of the history attribute being invalid.

* Fix a mistake in the code

* Minor change.

* Get the followed hashtags list fully working.

Still need to add the Follow/Unfollow buttons, though.

* Resolve JS linter issues.

* Add pagination logic to followed tags list view.

However, it currently loads further pages immediately on page load, so
that's not ideal. Need to figure that one out.

* Appease the linter.

* Apply suggestions from code review

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Fixes and resolve some other feedback.

* Use set/update instead of setIn/updateIn.

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2023-01-18 16:44:33 +01:00
Claire
42aa864c84 Add support for editing media description and focus point of already-posted statuses (#20878)
* Add backend support for editing media attachments of existing posts

* Allow editing media attachments of already-posted toots

* Add tests
2023-01-18 16:33:55 +01:00
Peter Simonsson
9d20c31f9c Fix dropdown menu positions when scrolling (#22916)
* Update react-overlays to latest version

* Fix breaking changes in dropdown menus

* Use react-overlays built-in arrow positioning feature
* Re-implemented `.dropdown-menu__arrow` to have a defined width and height to improve positioning
* Moved wrapping div (`.dropdown-menu` from `DropdownMenu` to `Dropdown`)
* Wrap button in a span to solve issue with ref
* Temporarily remove animations

* Fix breaking changes in emoji picker

* Wrap EmojiPickerMenu in a div where react-overlays’ ref is added

* Fix breaking changes in language dropdown

* Fix breaking changes in privacy dropdown

* Fix breaking changes in search form

* Add animations back using `@keyframes`

* Fix arrow color in light theme

* Fix linting issue

* Remove unused `mounted` state

* Remove `placement` state from components and redux

And remove the placement state from props of the menu components.

* Remove abolution position to fix flip issue

* Remove z-index to fix modals and overlay positions

* Fix lint issues

* Set placement in privacy and language components

Copy the placement state into the `PrivacyDropdown` and `LanguageDropdown` components, to apply correct styling to the buttons depending on which placement the Overlay has.

* Move `placement` state to correct component
2023-01-11 21:58:46 +01:00
Nick Schonning
507f2b4c1e Enable eslint:recommended ruleset (#22433)
* Enable ESLint recommended ruleset

* Disable failing ESLint recommended rules

* Remove rules shadowed by eslint:recommended
2022-12-19 00:51:37 +09:00
Claire
cfeb01b17f Add follow request banner on account header (#20785)
* Add requested_by to relationship maps

* Display whether an account has requested to follow you on their profile
2022-12-15 18:50:11 +01:00
Claire
f5d8ba958f Fix being stuck in edit mode when deleting the edited status (#22126) 2022-12-15 17:47:43 +01:00
Claire
0e7709efce Change default reply language to be default language when replying to a translated reply (#22272)
Fixes #22250
2022-12-13 19:41:53 +01:00
Claire
7fe4f2c715 Fix potential duplicate statuses in Explore tab (#22121) 2022-12-07 14:12:55 +01:00
Nick Schonning
088b0b4b20 Fix spacing warning from ESLint (#22005) 2022-12-04 10:56:21 +09:00
Claire
e668be4cac Fix infinite loading instead of soft 404 for non-existing remote accounts (#21303)
Fixes #21278, #21021
2022-11-27 20:48:12 +01:00
kedama
691b827c87 Fix status mismatch of sensitive check (#21724) 2022-11-27 20:36:21 +01:00
Claire
088c365559 Fix media metadata being only editable once (#20665) 2022-11-14 17:52:31 +01:00
Claire
d55054b166 Add the ability to edit media attachment metadata for any unattached media (#20402) 2022-11-11 21:22:17 +01:00
Claire
793cc2096d Fix redrafting a currently-editing post not leaving edit mode (#20023) 2022-11-08 04:06:54 +01:00
Claire
7e4afba7c6 Fix handling of duplicate and out-of-order notifications in WebUI (#19693)
* Fix handling of duplicate notifications from streaming server

* Fix handling of duplicate and out-of-order notifications when polling/expanding

Fixes #19615
2022-11-04 00:14:39 +01:00
Eugen Rochko
89ef2cf044 Fix upload progress not communicating processing phase in web UI (#19530) 2022-10-29 20:05:53 +02:00
Eugen Rochko
e700e95246 Fix case-sensitive look-up for profiles in web UI (#19397) 2022-10-21 10:06:03 +02:00
Eugen Rochko
0fdfbe555e Change public accounts pages to mount the web UI (#19319)
* Change public accounts pages to mount the web UI

* Fix handling of remote usernames in routes

- When logged in, serve web app
- When logged out, redirect to permalink
- Fix `app-body` class not being set sometimes due to name conflict

* Fix missing `multiColumn` prop

* Fix failing test

* Use `discoverable` attribute to control indexing directives

* Fix `<ColumnLoading />` not using `multiColumn`

* Add `noindex` to accounts in REST API

* Change noindex directive to not be rendered by default before a route is mounted

* Add loading indicator for detailed status in web UI

* Fix missing indicator appearing while account is loading in web UI
2022-10-20 14:35:29 +02:00
Takeshi Umeda
3e88e7ba20 Add featured tags selector for WebUI (#19358)
* Add featured tags selector for WebUI

* Add title to tag count
2022-10-16 08:43:59 +02:00
Eugen Rochko
e376f33207 Change about page to be mounted in the web UI (#19345) 2022-10-13 14:42:37 +02:00
Eugen Rochko
c603978cf6 Add server banner to web app, add GET /api/v2/instance to REST API (#19294) 2022-10-05 03:47:56 +02:00
Eugen Rochko
a593188ded Add user content translations with configurable backends (#19218) 2022-09-23 23:00:12 +02:00
Claire
1d3d86fa53 Fix “Filter this post” potentially listing deleted filters (#19051) 2022-08-25 17:36:35 +02:00
Claire
ef1b55caa6 Fix quickly switching notification filters resulting in empty or incorrect list (#18960) 2022-08-25 04:29:00 +02:00
Claire
522fbf9d13 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
2022-08-25 04:27:47 +02:00
Shlee
7af7fa3a8e Update notifications.js (#18977) 2022-08-15 20:33:05 +02:00
Eugen Rochko
9bbcd2e8a0 Add ability to follow hashtags in web UI (#18862) 2022-07-22 15:52:06 +02:00
Eugen Rochko
e164d6a687 Add customizable user roles (#18641)
* Add customizable user roles

* Various fixes and improvements

* Add migration for old settings and fix tootctl role management
2022-07-05 02:41:40 +02:00
Claire
90e5a9bd98 Revamp post filtering system (#18058)
* Add model for custom filter keywords

* Use CustomFilterKeyword internally

Does not change the API

* Fix /filters/edit and /filters/new

* Add migration tests

* Remove whole_word column from custom_filters (covered by custom_filter_keywords)

* Redesign /filters

Instead of a list, present a card that displays more information and handles
multiple keywords per filter.

* Redesign /filters/new and /filters/edit to add and remove keywords

This adds a new gem dependency: cocoon, as well as a npm dependency:
cocoon-js-vanilla. Those are used to easily populate and remove form fields
from the user interface when manipulating multiple keyword filters at once.

* Add /api/v2/filters to edit filter with multiple keywords

Entities:
- `Filter`: `id`, `title`, `filter_action` (either `hide` or `warn`), `context`
  `keywords`
- `FilterKeyword`: `id`, `keyword`, `whole_word`

API endpoits:
- `GET /api/v2/filters` to list filters (including keywords)
- `POST /api/v2/filters` to create a new filter
  `keywords_attributes` can also be passed to create keywords in one request
- `GET /api/v2/filters/:id` to read a particular filter
- `PUT /api/v2/filters/:id` to update a new filter
  `keywords_attributes` can also be passed to edit, delete or add keywords in
   one request
- `DELETE /api/v2/filters/:id` to delete a particular filter
- `GET /api/v2/filters/:id/keywords` to list keywords for a filter
- `POST /api/v2/filters/:filter_id/keywords/:id` to add a new keyword to a
   filter
- `GET /api/v2/filter_keywords/:id` to read a particular keyword
- `PUT /api/v2/filter_keywords/:id` to edit a particular keyword
- `DELETE /api/v2/filter_keywords/:id` to delete a particular keyword

* Change from `irreversible` boolean to `action` enum

* Remove irrelevent `irreversible_must_be_within_context` check

* Fix /filters/new and /filters/edit with update for filter_action

* Fix Rubocop/Codeclimate complaining about task names

* Refactor FeedManager#phrase_filtered?

This moves regexp building and filter caching to the `CustomFilter` class.

This does not change the functional behavior yet, but this changes how the
cache is built, doing per-custom_filter regexps so that filters can be matched
independently, while still offering caching.

* Perform server-side filtering and output result in REST API

* Fix numerous filters_changed events being sent when editing multiple keywords at once

* Add some tests

* Use the new API in the WebUI

- use client-side logic for filters we have fetched rules for.
  This is so that filter changes can be retroactively applied without
  reloading the UI.
- use server-side logic for filters we haven't fetched rules for yet
  (e.g. network error, or initial timeline loading)

* Minor optimizations and refactoring

* Perform server-side filtering on the streaming server

* Change the wording of filter action labels

* Fix issues pointed out by linter

* Change design of “Show anyway” link in accordence to review comments

* Drop “irreversible” filtering behavior

* Move /api/v2/filter_keywords to /api/v1/filters/keywords

* Rename `filter_results` attribute to `filtered`

* Rename REST::LegacyFilterSerializer to REST::V1::FilterSerializer

* Fix systemChannelId value in streaming server

* Simplify code by removing client-side filtering code

The simplifcation comes at a cost though: filters aren't retroactively
applied anymore.
2022-06-28 09:42:13 +02:00
Eugen Rochko
e6eb0a29b9 Add notifications for new reports (#18697) 2022-06-27 09:30:15 +02:00
Claire
c5eabffe34 Change language to be carried over on reply (#18557)
In most cases, replies to a toot are written in the same language as the
toot being replied to.
2022-05-31 05:53:43 +02:00
Eugen Rochko
e4a9aa1ab4 Add language dropdown to compose in web UI (#18420) 2022-05-16 11:18:35 +02:00
Eugen Rochko
ac3d6f9a35 Add limited attribute to accounts in REST API and a warning in web UI (#18344) 2022-05-10 09:44:35 +02:00
Claire
d43028a0d3 Fix potentially missing statuses when reconnecting to websocket (#17981)
* Fix potentially missing statuses when reconnecting to websocket

* Add gap on reconnect rather than maintaining it constantly
2022-04-07 16:08:17 +02:00
Claire
00d429879f Fix older items possibly disappearing on timeline updates (#17980)
In some rare cases, when receiving statuses out of order from the streaming
API then polling from the REST API, it was possible for the
`expandNormalizedTimeline` function to remove older items from the timeline.

This commit ensures that any item from the replaced slice that is older
than the oldest item retrieved from the API gets added back to the replaced
slice.
2022-04-07 11:27:35 +02:00
Eugen Rochko
cea2cd9a56 Add pagination for trending statuses in web UI (#17976) 2022-04-06 22:53:29 +02:00
Claire
623f8717c8 Fix possible duplicate statuses in timelines in some edge cases (#17971)
In some rare cases, when receiving statuses out of order from the streaming
API then polling from the REST API, it was possible for the
`expandNormalizedTimeline` function to insert duplicates in the timeline,
which would then result in several bugs.

This commits ensures that there are no duplicates inserted in the
timeline.
2022-04-06 21:01:41 +02:00
Eugen Rochko
45341c5287 Fix not showing loading indicator when searching in web UI (#17655) 2022-02-27 07:37:07 +01:00
Claire
cbf951569e Fix reply button on media modal not giving focus to compose form (#17626)
* Avoid compose form and modal management fighting for focus

* Fix reply button on media modal footer not giving focus to compose form
2022-02-25 00:51:01 +01:00
Eugen Rochko
19b4c36e40 Add explore page to web UI (#17123)
* Add explore page to web UI

* Fix not removing loaded statuses from trends on mute/block action
2022-02-25 00:34:33 +01:00