Commit Graph

314 Commits

Author SHA1 Message Date
Renaud Chaput 44cd88adc4
Upgrade react-intl (#24906) 2023-05-31 23:43:39 +02:00
fusagiko / takayamaki 38c6216082
Rewrite actions/modal and reducers/modal with typescript (#24833) 2023-05-25 15:42:37 +02:00
Renaud Chaput d27216dc46
Enforce import order with ESLint (#25096) 2023-05-23 17:15:17 +02:00
Renaud Chaput 5eeb40bdbe
Add stricter ESLint rules for Typescript files (#24926) 2023-05-10 12:59:29 +02:00
Renaud Chaput c8181eb0a4
Enforce stricter rules for Typescript files (#24910) 2023-05-09 03:11:56 +02:00
Renaud Chaput d9b93bd15e
Enforce React Rules of Hooks with eslint (#24911) 2023-05-09 03:09:11 +02:00
fusagiko / takayamaki 5bc8e2d1fd
Use LayoutType from is_mobile in actions/app (#24863) 2023-05-08 15:10:21 +02:00
fusagiko / takayamaki 0999cb4601
Rewrite actions/app.ts and reducers/missed_updates.ts with createAction (#24801) 2023-05-03 15:28:39 +02:00
Nick Schonning f22b4e556c
Add eslint-plugin-jsdoc (#24719) 2023-04-30 02:29:54 +02:00
Christian Schmidt bfeccf6748
Fix media description not being cleared (#24720) 2023-04-30 02:29:24 +02:00
Eugen Rochko 8979b70975
Add default post text to onboarding flow in web UI (#24705) 2023-04-28 10:05:34 +02:00
Eugen Rochko 8099ba04be
Change hashtags and mentions in bios to open in-app in web UI (#24643) 2023-04-25 06:33:21 +02:00
Eugen Rochko 0461f83320
Add new onboarding flow to web UI (#24619) 2023-04-23 22:24:53 +02:00
Nick Schonning ab3f23da91
SUBMIT doesn't exist on XMLHttpRequest (#24423) 2023-04-05 10:56:55 +02:00
fusagiko / takayamaki 4520e6473a
[Proposal] Make able to write React in Typescript (#16210)
Co-authored-by: berlysia <berlysia@gmail.com>
Co-authored-by: fusagiko / takayamaki <takayamaki@users.noreply.github.com>
2023-04-03 03:31:39 +02:00
Eugen Rochko 2b11376411
Change search pop-out in web UI (#24305) 2023-04-01 09:59:10 +02:00
Eugen Rochko 9bda933740
Change media upload limits and remove client-side resizing (#23726) 2023-03-25 10:00:03 +01:00
Christian Schmidt bd047acc35
Replace `Status#translatable?` with language matrix in separate endpoint (#24037) 2023-03-16 11:07:24 +01:00
Claire b2283b6838
Fix focus point of already-attached media not saving after edit (#23566) 2023-02-19 07:11:18 +01:00
Nick Schonning db2c58d47a
Enable ESLint no-useless-escape (#23311) 2023-02-13 15:12:14 +01:00
Nick Schonning d9088ef327
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 30e895299c
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 4b92e59f4f
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 fd33bcb3b2
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 06b68490d1
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
Jeremy Kescher 04c611daa1
Fix being unable to react with the keycap number sign emoji (#22231)
#⃣

This bug is caused by the emoji consisting of:
U+23 #
U+FE0F
U+20E3  ⃣

Because it starts with a #, it's interpreted as an anchor link, which is not passed to the API. Therefore, the API sees no emoji to react with and answers correctly with a 404.
2022-12-15 16:18:39 +01:00
trwnh b59ce0a60f
Move V2 Filter methods under /api/v2 prefix (#20622)
* Move V2 Filter methods under /api/v2 prefix

* move over the tests too
2022-11-14 08:34:07 +01:00
Claire 74d40c7d8f
Fix edits not being immediately reflected (#19673)
Fixes #19546
2022-11-02 18:09:39 +01:00
Eugen Rochko 30ef110224
Fix upload progress not communicating processing phase in web UI (#19530) 2022-10-29 20:05:53 +02:00
Eugen Rochko 55af04b253
Fix logged out search and changed logged-in search placeholder (#19514) 2022-10-29 13:32:49 +02:00
Eugen Rochko 56efa8d22f
Fix reply not opening compose page on certain screen sizes in web UI (#19417)
Fix ellipsis next to icons on navigation panel on some browsers
2022-10-22 23:15:14 +02:00
Takeshi Umeda 4c7b5fb6c1
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
Yamagishi Kazutoshi e02bdc14fd
Fix missing `isCancel` (#19354) 2022-10-14 16:14:22 +02:00
Yamagishi Kazutoshi 219c38b921
Replace `CancelToken` to `AbortSignal` (#19352) 2022-10-14 03:16:37 +02:00
Eugen Rochko 1bd00036c2
Change about page to be mounted in the web UI (#19345) 2022-10-13 14:42:37 +02:00
Eugen Rochko d2528b26b6
Add server banner to web app, add `GET /api/v2/instance` to REST API (#19294) 2022-10-05 03:47:56 +02:00
Yamagishi Kazutoshi 216dbaedaf
Disable push notification when not logged in (#19272) 2022-10-03 18:15:47 +02:00
Eugen Rochko 43b5d5e38d
Add logged-out access to the web UI (#18961) 2022-09-29 04:39:33 +02:00
Eugen Rochko 0d6b878808
Add user content translations with configurable backends (#19218) 2022-09-23 23:00:12 +02:00
Claire 55bef1e34f
Fix quickly switching notification filters resulting in empty or incorrect list (#19052)
Follow-up to #18960

The aforementioned PR fixed an issue in which switching notification filters
while notifications were loading prevented the query for the new filter from
running, but another issue remained: if the first query completed after the
second one, its results would override the second one, thus leading to the
same issue.

This commit cancels the first request if it is still running, before issuing
the second one.
2022-08-25 17:36:54 +02:00
Takeshi Umeda 5d70a16a14
Fix action type for unfollowHashtag (#18924) 2022-08-25 04:38:01 +02:00
Claire afb8bc97d0
Fix quickly switching notification filters resulting in empty or incorrect list (#18960) 2022-08-25 04:29:00 +02:00
Claire 50487db122
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
Eugen Rochko 9608e720a4
Add ability to follow hashtags in web UI (#18862) 2022-07-22 15:52:06 +02:00
Eugen Rochko e7aa2be828
Change how hashtags are normalized (#18795)
* Change how hashtags are normalized

* Fix tests
2022-07-13 15:03:28 +02:00
Claire 02851848e9
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 2936f42a14
Add notifications for new reports (#18697) 2022-06-27 09:30:15 +02:00
Eugen Rochko 0cdb077570
Add language dropdown to compose in web UI (#18420) 2022-05-16 11:18:35 +02:00
Eugen Rochko b4d373a3df
Add `limited` attribute to accounts in REST API and a warning in web UI (#18344) 2022-05-10 09:44:35 +02:00
Claire f17e73da09
Fix streaming notifications not using quick filter logic (#18316)
Fixes #18309

The quickFilter logic was used on display and to request new notification
pages, but not for live updates. The main issue this caused is bump the unread
notifications count regardless of the quickFilter setting.

Since notifications are re-fetched when changing quickFilter settings, it is
safe to drop live notifications that do not match the selected filter.
2022-05-07 04:50:40 +02:00