Commit graph

8372 commits

Author SHA1 Message Date
Eugen Rochko e823b49214
Fix "cancel follow request" button having unreadable text in web UI (#11521)
Fix #11478
2019-08-08 08:56:55 +02:00
Eugen Rochko f51c7c105f
Fix acct URIs with IDN domains not being resolved (#11520)
Fix #11494
2019-08-07 21:14:08 +02:00
Eugen Rochko 3a6b6c63f2
Add breakdown of usage by source to admin UI for hashtags (#11517)
Allows determining where the majority of posts in a hashtag come
from on a given day at a glance.
2019-08-07 20:20:39 +02:00
ThibG bced70469a Add domain block notes (#11515)
* Add database columns for adding notes to domain blocks/restrctions

* Add admin UI to set private and public comments when blocking a domain

* Add text for private and public comments on domain blocks

* Show domain block comments in admin UI

* Add comments to the domain block undo page

* Make UnblockDomainService more robust regarding upgraded domain blocks

* Allow editing domain blocks

* Rename button from “undo domain block” to “view domain block” in account admin UI

* Change test to unsilence silenced users from upgraded blocks
2019-08-07 20:20:23 +02:00
Eugen Rochko 94c54997cf
Fix trending tags returning less items than requested sometimes (#11513)
Add better sorting defaults to the hashtags admin UI

Add "not reviewed" filter to hashtags admin UI
2019-08-07 17:08:30 +02:00
Eugen Rochko 7a737c79cc
Add number of pending accounts and pending hashtags to admin dashboard (#11514) 2019-08-07 16:13:34 +02:00
ThibG 396b8cdd0f Improve focus handling with dropdown menus (#11511)
- Focus first item when activated via keyboard
- When the dropdown menu closes, give back the focus to
  the actual element which was focused prior to opening the menu
2019-08-07 13:58:53 +02:00
Eugen Rochko ac33f1aedd
Fix account tags not being saved correctly (#11507)
* Fix account tags not being saved correctly

Regression from f371b32

Fix Tag#discoverable not returning tags where listable is nil instead of true

Add notice when saving hashtags in admin UI

Change public hashtag and directory pages to return 404 for forbidden tags

* Remove unused locale string
2019-08-07 10:01:55 +02:00
Eugen Rochko 5e35aa8280
Fix non-lowercase hashtags not being picked up by the streaming API (#11508)
Regression from f371b32

Fix hashtag links always being lowercase
2019-08-07 10:01:19 +02:00
Eugen Rochko a8958d07e2
Fix featured tags not finding the right tag on save (#11504)
Regression from f371b32
2019-08-07 10:00:58 +02:00
ThibG c8bf30df92 Fix animate on hover in poll options without CW (#11404) 2019-08-06 21:53:23 +02:00
ThibG 7f9431c306 Play animated custom emoji on hover (#11348)
* Play animated custom emoji on hover in status

* Play animated custom emoji on hover in display names

* Play animated custom emoji on hover in bios/bio fields

* Add support for animation on hover on public pages emojis too

* Fix tests

* Code style cleanup
2019-08-06 21:53:21 +02:00
ThibG af410c0706 Display custom emoji in bio field names (#11350)
Already displayed in public pages, but not WebUI
2019-08-06 21:52:25 +02:00
ThibG 16f348431b Only scroll to the compose form if it's not horizontally in the viewport (#11246)
Avoids jumping the scroll around vertically when giving it focus and
editing long toots.
2019-08-06 21:52:25 +02:00
ThibG 6abd849803 When deleting & redrafting a poll, fill in closest expires_in (#11203)
Use the smallest preset expires_in such that the new poll would
not expire before the old one.

In the typical case of a quick delete & redraft, this results in
using the same poll duration.

Fixes #10567
2019-08-06 21:52:25 +02:00
ThibG 99b27a8b4b When sending a toot, ensure a CW is only set if the CW field is visible (#11206)
In some occasions, such as the browser or a browser extension auto-filling
the existing but disabled/hidden CW field, a CW can be set without the user
knowing.
2019-08-06 21:52:25 +02:00
ThibG 39741fa2cd Scroll to compose form rather than reply indicator on focus (#11182) 2019-08-06 21:52:25 +02:00
ThibG 5b3d70ffa7 Display FTS warning based on actual search term, not the one being typed (#11202)
Follow-up to #11112
2019-08-06 21:52:00 +02:00
ThibG 011909262a Add message telling FTS is disabled when no toot can be found because of this (#11112)
* Add message telling FTS is disabled when no toot can be found because of this

Fixes #11082

* Remove info icon and reword message
2019-08-06 21:52:00 +02:00
Eugen Rochko 69680db8a2 Fix unnecessary SQL query performed on unauthenticated requests (#11179) 2019-08-06 21:52:00 +02:00
ThibG 6e28da2139 Apply filters to poll options (#11174)
* Apply filters to poll options in WebUI

Fixes #11128

* Apply filters to poll options server-side

* Add poll options to searchable text
2019-08-06 21:52:00 +02:00
Eugen Rochko 74982c71b0 Fix delete regression (#11450)
Regression from ff789a751a
2019-08-06 21:51:29 +02:00
ThibG c83c87fbe2 Fix boosting & unboosting preventing a boost from appearing in the TL (#11405)
* Fix boosting & unboosting preventing a boost from appearing in the TL

* Add tests

* Avoids side effects when aggregate_reblogs isn't true
2019-08-06 21:51:29 +02:00
ThibG 363afe5e05 Memoize ancestorIds and descendantIds in detailed status view (#11234) 2019-08-06 21:51:02 +02:00
ThibG d588173ab3 Optimize makeGetStatus (#11211)
* Optimize makeGetStatus

Because `ImmutableList.filter` always returns a new object and `createSelector`
memoizes based on object identity, the selector returned by `makeGetStatus`
would *always* execute.

To avoid that, we wrap `getFilters` into a new memoizer that memoizes based on
deep equality, thus returning the same object as long as the filters haven't
changed, allowing the memoization of `makeGetStatus` to work.

Furthermore, we memoize the compiled regexs instead of recomputing them each
time the selector is called.

* Fix memoized result being cleared too often

* Make notifications use memoized getFiltersRegex
2019-08-06 21:51:02 +02:00
Eugen Rochko d1d3684fb5 Fix alerts booleans not being typecast correctly in push subscription (#11343)
* Fix `alerts` booleans not being typecast correctly in push subscription

Fix #10789

* Fix typo
2019-08-06 21:50:45 +02:00
ThibG 6a3876bdaa Fix some flash notices/alerts staying on unrelated pages (#11364) 2019-08-06 21:50:45 +02:00
Eugen Rochko 5cd97c62a0 Remove unused StatsD code and expose StatsD as a global variable (#11232)
The instrumentation code was used for StatsD metrics collection
prior to the switch to the nsa gem and should have been removed
at that point as it no longer does anything at all
2019-08-06 21:50:45 +02:00
Eugen Rochko 769bbd511f Fix statsd UDP sockets not being cleaned up in Sidekiq (#11230) 2019-08-06 21:50:45 +02:00
ThibG 5d79df0273 Fix expiration date of filters being set to “Never” when editing them (#11204)
When editing a custom filter, select the shortest preset duration that
still covers the remaining time of that filter.

Fixes #9506
2019-08-06 21:50:45 +02:00
Eugen Rochko 0367ddb62c Fix support for MP4 files that are actually M4V files (#11210)
Resolve #11187
2019-08-06 21:50:45 +02:00
Georg Gadinger 221110c5d7 Update fuubar dependency to 2.4.1 (#11248)
See also: thekompanee/fuubar#111
2019-08-06 21:50:19 +02:00
ThibG 8904487324 Fix invites not being disabled upon account suspension (#11412)
* Disable invite links from disabled/suspended users

* Add has_many invites relationship to users

* Destroy unused invites when suspending an account
2019-08-06 21:50:06 +02:00
ThibG 6782922584 Fix BlockService trying to reject incorrect follow request (#11288)
Fixes #11148
2019-08-06 21:50:05 +02:00
ThibG 8066717558 Fix Status.remote scope matching *all* statuses (#11265) 2019-08-06 21:50:05 +02:00
ThibG 5a06f68f0e Fix BackupService crashing when an attachment is missing (#11241)
* Fix BackupService crashing when an attachment is missing

For various reasons such as admin error or out-of-sync media and
database backups, it might be possible for local attachments to be lost.

This commit allows the BackupService to continue its work even if some media
file is missing.

* Change error message
2019-08-06 21:50:05 +02:00
Eugen Rochko aef567cb9d Fix option to send e-mail notification about account action always being true (#11242) 2019-08-06 21:50:05 +02:00
ThibG de747948a1 Fix swiping columns on mobile sometimes failing (#11200)
Fixes #9779
2019-08-06 21:50:05 +02:00
ThibG c95ce1f3ac Fix account URI in UpdatePollSerializer (#11194)
* Fix account URI in UpdatePollSerializer

Fixes #11185

* Add specs
2019-08-06 21:50:05 +02:00
Eugen Rochko dd38c280a5
Fix admin dashboard missing latest features (#11505)
Fix redis-namespace deprecation warning about administrative commands
2019-08-06 19:40:06 +02:00
Eugen Rochko 9072fe5ab6
Add trends UI with admin and user settings (#11502) 2019-08-06 17:57:52 +02:00
Yusuke Nakamura 82d2069c75 Bump faker from 1.9.6 to 2.1.0 and update faker api (#11489)
* Bump faker from 1.9.6 to 2.1.0

Bumps [faker](https://github.com/stympy/faker) from 1.9.6 to 2.1.0.
- [Release notes](https://github.com/stympy/faker/releases)
- [Changelog](https://github.com/stympy/faker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stympy/faker/compare/1.9.6...v2.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Use faker api v2

https://github.com/stympy/faker/releases/tag/2.0
2019-08-06 15:33:03 +02:00
Eugen Rochko 1d8d553d8b
Revert "Change links in webUI to rewrite misleading links (#11426)" (#11500)
This reverts commit b31b232edf.
2019-08-06 12:09:28 +02:00
ThibG 111a0628fc Fix image uploads being perfectly white when canvas read access is blocked (#11499)
Fixes #11496
2019-08-06 12:08:19 +02:00
ThibG 27a0d02d0d Improve keyboard navigation in privacy dropdown (#11492)
* Trap tab in privacy dropdown

* Give focus back to last focused element when privacy dropdown menu closes

* Actually give back focus to the element that had it before clicking the dropdown
2019-08-06 11:59:58 +02:00
ThibG a12f1a0baf Improve dropdown menu keyboard navigation (#11491)
* Allow selecting menu items with the space bar in status dropdown menus

* Fix modals opened by keyboard navigation being immediately closed

* Fix menu items triggering modal actions

* Add Tab trapping inside dropdown menu

* Give focus back to last focused element when status dropdown menu closes
2019-08-06 11:59:46 +02:00
ThibG 5c73746b69 Trap tab in modals (#11493) 2019-08-06 11:59:28 +02:00
ThibG 792d0dd470 Fix privacy dropdown active state when dropdown is placed on top of it (#11495) 2019-08-06 11:59:14 +02:00
Eugen Rochko 115dab78f1
Change admin UI for hashtags and add back whitelisted trends (#11490)
Fix #271

Add back the `GET /api/v1/trends` API with the caveat that it does
not return tags that have not been allowed to trend by the staff.

When a hashtag begins to trend (internally) and that hashtag has
not been previously reviewed by the staff, the staff is notified.

The new admin UI for hashtags allows filtering hashtags by where
they are used (e.g. in the profile directory), whether they have
been reviewed or are pending reviewal, they show by how many people
the hashtag is used in the directory, how many people used it
today, how many statuses with it have been created today, and it
allows fixing the name of the hashtag to make it more readable.

The disallowed hashtags feature has been reworked. It is now
controlled from the admin UI for hashtags instead of from
the file `config/settings.yml`
2019-08-05 19:54:29 +02:00
dependabot-preview[bot] 6201bfdfba Bump rubocop from 0.73.0 to 0.74.0 (#11486)
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.73.0 to 0.74.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.73.0...v0.74.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-05 18:53:30 +09:00