Commit Graph

8719 Commits (469e5af537552e4b0825cac2074c1e18e16f97b2)

Author SHA1 Message Date
ThibG 469e5af537 Fixes to the polls UI
Port 4987602069 to glitch-soc
2019-03-05 21:35:03 +01:00
Eugen Rochko c156b6d696 Fix web UI crash on page load when detailed status has a poll
Port 21246d861e to glitch-soc
2019-03-05 21:35:03 +01:00
ThibG e31450e8ad Insert polls in redux stores before statuses so it avoids crashes
Port 6d08fd5170 to glitch-soc
2019-03-05 21:35:03 +01:00
Eugen Rochko 342d9d25bb Add polls
Port front-end parts of 4a3acdc916 to glitch-soc
2019-03-05 21:35:03 +01:00
Thibaut Girka 69fd801c8e Port upstream refactoring of reducers and actions
Also includes 4923646361
2019-03-05 21:35:03 +01:00
Eugen Rochko 0dc5c2a4a5 Fix home timeline perpetually reloading when empty
Port 0c8d1435c5 to glitch-soc
2019-03-05 19:30:11 +01:00
Thibaut Girka c0b876f726 Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/models/status.rb
- db/schema.rb

Both conflicts are caused by us having extra database columns.
2019-03-05 19:23:16 +01:00
Eugen Rochko 657436c5db Bump version to 2.7.4 (#10179) 2019-03-05 18:22:46 +01:00
Eugen Rochko 7c61f27433 Fix status creation API silently discarding invalid poll (#10171) 2019-03-05 15:21:31 +01:00
ThibG 0c8e3beb51 Do not error out on unsalvageable errors in FetchRepliesService (#10175)
* Do not error out on unsalvageable errors in FetchRepliesService

Fixes #10152

* Fix FetchRepliesWorker erroring out on deleted statuses
2019-03-05 15:21:14 +01:00
ThibG fbe97b9643 Fix suspended account's fields being set as empty dict instead of list (#10178)
Fixes #10177
2019-03-05 15:19:54 +01:00
Eugen Rochko a7dfbbd4fb Fix NoMethodError in ActivityPub::NoteSerializer (#10172) 2019-03-05 05:09:01 +01:00
Eugen Rochko 31a1fa3dcf Fix last_fetched_at not being set on polls (#10170) 2019-03-05 04:10:01 +01:00
Eugen Rochko 1321801577 Fix various issues in polls (#10165)
* Fix ActivityPub poll results being serialized even with hide_totals

* Fix poll refresh button having a different font size

* Display poll in OpenGraph description

* Fix NoMethodError when serializing votes

Regression from #10158

* Fix polls on public pages being broken for non-logged-in users

* Do not show time remaining if poll has no expiration date
2019-03-05 03:51:18 +01:00
Eugen Rochko 53336aa646 Add test ensuring that unknown object types are rejected (#10166) 2019-03-05 11:46:36 +09:00
Eugen Rochko 9cb5dcc379 Fix featured tag form not failing on failed tag validations (#10167) 2019-03-05 03:46:24 +01:00
Eugen Rochko 7f956cfa30 Fix poll options not being stripped of surrounding whitespace on save (#10168) 2019-03-05 03:45:56 +01:00
ThibG 674d232cd1 Display closed polls as such (#10156) 2019-03-04 22:52:41 +01:00
ThibG 7da087dabe Store remote votes URI (#10158)
* Store remote votes URI

* Add spec for accepting remote votes

* Make poll vote id generation work the same way as follows
2019-03-04 22:51:23 +01:00
ThibG 7e84e1a956 Ensure only people allowed to see the poll can actually vote (#10161) 2019-03-04 22:47:47 +01:00
ThibG 1cba6f9790 Widen allowed time windows for polls (#10162) 2019-03-04 22:46:38 +01:00
ThibG d19c56b615 Add non-JS fallback for polls on public pages (#10155) 2019-03-04 18:03:12 +01:00
ThibG 4987602069 Fixes to the polls UI (#10150)
* Allow unselecting choices in multiple choice polls

* Properly disable checkboxes/radio buttons for polls in public pages

* Visually differentiate checkboxes and radio buttons
2019-03-04 01:54:14 +01:00
Eugen Rochko 6056edf7a5 Fix ActivityPub votes having nil IDs (#10151) 2019-03-04 01:53:58 +01:00
Eugen Rochko 03b5da7b6f Add tests for ActivityPub poll processing (#10143) 2019-03-04 01:13:42 +01:00
Eugen Rochko 8e75233020 Fix missing in_reply_to in ActivityPub::VoteSerializer (#10148) 2019-03-04 01:06:19 +01:00
Eugen Rochko 1c6a9a6ea8 Fix another typo in ActivityPub::FetchRemotePollService (#10146) 2019-03-04 00:52:18 +01:00
Eugen Rochko 1bbbc31cc0 Fix typo in ActivityPub::FetchRemotePollService (#10145) 2019-03-04 00:50:56 +01:00
Eugen Rochko 952045604c Fix remote poll expiration time (#10144) 2019-03-04 00:44:34 +01:00
ThibG ad11260825 Correctly make polls and media mutually exclusive (#10141) 2019-03-04 00:40:21 +01:00
ThibG 7d0dc066a7 Make sure the poll is created before storing its id (#10142)
* Make sure the poll is created before storing its id

* Fix updating poll results

* Support fetching Question activities from the search bar
2019-03-04 00:39:06 +01:00
Eugen Rochko 21246d861e Fix web UI crash on page load when detailed status has a poll (#10139) 2019-03-03 23:45:02 +01:00
ThibG 6d08fd5170 Insert polls in redux stores before statuses so it avoids crashes (#10140) 2019-03-03 23:44:52 +01:00
Eugen Rochko 06511d1942 Fix vote validation for polls with multiple choices (#10138) 2019-03-03 23:41:30 +01:00
Eugen Rochko 4a3acdc916 Add polls (#10111)
* Add polls

Fix #1629

* Add tests

* Fixes

* Change API for creating polls

* Use name instead of content for votes

* Remove poll validation for remote polls

* Add polls to public pages

* When updating the poll, update options just in case they were changed

* Fix public pages showing both poll and other media
2019-03-03 22:18:23 +01:00
ThibG 2e28c486b3 Fix lists export (#10136) 2019-03-03 15:38:47 +01:00
Mélanie Chauvel (ariasuni) c02d1558f1 [Glitch] Fix errors found by eslint
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
2019-03-01 14:01:51 +01:00
Mélanie Chauvel (ariasuni) f01d004a1a [Glitch] Make the column header of profile view look like the others, too
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
2019-03-01 14:01:51 +01:00
Mélanie Chauvel (ariasuni) 2a7690601a [Glitch] Make the column header of toot/thread view look like the others
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
2019-03-01 14:01:51 +01:00
Eugen Rochko 0c8d1435c5 Fix home timeline perpetually reloading when empty (#10130)
Regression from #6876
2019-03-01 11:11:35 +01:00
dependabot[bot] e084f9cb17 Bump sidekiq-unique-jobs from 6.0.11 to 6.0.12 (#10132)
Bumps [sidekiq-unique-jobs](https://github.com/mhenrixon/sidekiq-unique-jobs) from 6.0.11 to 6.0.12.
- [Release notes](https://github.com/mhenrixon/sidekiq-unique-jobs/releases)
- [Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v6.0.11...v6.0.12)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-01 15:08:37 +09:00
ThibG b6ca8b5be2 Merge pull request #932 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
2019-02-28 22:02:36 +01:00
Thibaut Girka 91934eeb74 Merge branch 'master' into glitch-soc/merge-upstream 2019-02-28 21:35:53 +01:00
ThibG 7daa4425ac Fix serialization of boosts (#10129)
The condition introduced by #9998 was wrong, serializing boosts
that weren't self-boosts, and not serializing self-boosts.
2019-02-28 21:35:16 +01:00
ThibG 892327c686 Give the `replies` collection an identifier and enable pagination (#10128) 2019-02-28 18:16:34 +01:00
ThibG 9f3f47e91f Improved remote thread fetching (#10106)
* Fetch up to 5 replies when discovering a new remote status

This is used for resolving threads downwards. The originating
server must add a “replies” attributes with such replies for it to
be useful.

* Add some tests for ActivityPub::FetchRepliesWorker

* Add specs for ActivityPub::FetchRepliesService

* Serialize up to 5 public self-replies for ActivityPub notes

* Add specs for ActivityPub::NoteSerializer

* Move exponential backoff logic to a worker concern

* Fetch first page of paginated collections when fetching thread replies

* Add specs for paginated collections in replies

* Move Note replies serialization to a first CollectionPage

The collection isn't actually paginable yet as it has no id nor
a `next` field. This may come in another PR.

* Use pluck(:uri) instead of map(&:uri) to improve performances

* Fix fetching replies when they are in a CollectionPage
2019-02-28 15:22:21 +01:00
ThibG 5ba0c11a72 Fix direct timeline pagination in the WebUI (#10126)
The `hasMore` property of timelines in redux store was set whenever an API
request returned only one page of results, *even* if the query only requested
newer conversations (using `since_id`), causing `hasMore` to be incorrectly set to
false whenever fetching new toots in the direct timeline, which happens each time
the direct message column is opened.

(Basically #9516 for direct messages)
2019-02-27 19:13:16 +01:00
Thibaut Girka bdc5cd092e Port public page mastodon-light fixes from upstream 2019-02-27 16:24:57 +01:00
trwnh ab95e681f4 Allow getting-started to scroll on short screens (#10075)
At 480px height, there is not enough space to fully display the footer.
2019-02-27 15:03:28 +01:00
dependabot[bot] 6e16d69267 Bump capybara from 3.13.2 to 3.14.0 (#10119)
Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.13.2 to 3.14.0.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](https://github.com/teamcapybara/capybara/compare/3.13.2...3.14.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-27 15:02:57 +01:00