Commit Graph

3918 Commits

Author SHA1 Message Date
Alexander Skvortsov
6ed4442ea6 Clarify that request argument of render callbacks for Formatter must be either nullable or omitted 2020-12-14 17:20:35 -05:00
Alexander Skvortsov
8f2e76d966 Deprecate CheckingForFlooding
This should have been done earlier as part of the ThrottleApi PR
2020-12-14 17:12:05 -05:00
flarum-bot
c2b3bfe1d9 Bundled output for commit a7306addf1 [skip ci] 2020-12-14 19:07:44 +00:00
Alexander Skvortsov
a7306addf1 Fix scroll on long discussions
- Anchor scroll when inserting post placeholders
- Indicate that pages are loading at start of `loadPage`, which allows `onscroll` to not request that multiple pages be loaded at the same time

These changes are particularly applicable to firefox, where previously, dozens of posts could be skipped at a time if scroll up was held while at the top of the viewport.
2020-12-14 14:06:32 -05:00
Ian Morland
a6547f02b0 Fix wrong namespace in docblock (#2494) 2020-12-12 15:36:25 -05:00
Alexander Skvortsov
91a7205dd8 Fix composer json attribute path to links override section 2020-12-08 19:29:59 -05:00
Sami Mazouz
aaa2f3c3a3 Remove header bottom border (#2489) 2020-12-08 19:15:14 -05:00
Alexander Skvortsov
1e89aa3f0f Policy Extender and Tests (#2461)
Policy application has also been refactored, so that policies return one of `allow`, `deny`, `forceAllow`, `forceDeny`. The result of a set of policies is no longer the first non-null result, but rather the highest priority result (forceDeny > forceAllow > deny > allow, so if a single forceDeny is present, that beats out all other returned results). This removes order in which extensions boot as a factor.
2020-12-08 19:10:06 -05:00
Alexander Skvortsov
dea7683329 Model Visibility Scoping Extender and Tests (#2460) 2020-12-07 20:02:46 -05:00
flarum-bot
2ffb2dbab7 Bundled output for commit 6d07820952 [skip ci] 2020-12-07 20:15:49 +00:00
Charlie
6d07820952 AdminUX Overhaul Small Patches (#2468) 2020-12-07 15:14:22 -05:00
flarum-bot
d6a20567af Bundled output for commit 0fcbca8f4a [skip ci] 2020-12-07 18:35:10 +00:00
Matt Kilgore
0fcbca8f4a Slug Driver Support (#2456)
- Support slug drivers for core's sluggable models, easily extends to other models
- Add automated testing for affected single-model API routes
- Fix nickname selection UI
- Serialize slugs as `slug` attribute
- Make min search length a constant
2020-12-07 13:33:42 -05:00
flarum-bot
0df35e8796 Bundled output for commit b6c4aae067 [skip ci] 2020-12-07 18:26:51 +00:00
David Sevilla Martín
b6c4aae067 Replace forum and admin global compat exports with a Proxy to allow namespace use (#2488) 2020-12-07 13:25:24 -05:00
Sami Mazouz
6d96587205 ApiController Extender and Tests (#2451) 2020-12-06 15:07:48 -05:00
Sami Mazouz
0754de8d1b Pass callback wrapper parameters by reference (#2485)
Because invokable class objects are not directly called and instead it's the callback wrapper that calls these objects, it's currently not possible to receive arguments by reference on an invokable class.

To fix this we pass the arguments by reference by default when calling the object in the callback wrapper.
2020-12-06 14:58:45 -05:00
Sami Mazouz
4389d3b1a0 Add Settings Extender (#2452) 2020-12-04 17:20:06 -05:00
Alexander Skvortsov
073acdf7fb User Preferences Extender and Tests (#2463) 2020-12-04 15:45:08 -05:00
Daniël Klabbers
6618a7f612 Fixes issue with the worker defaulting to the illuminate queue manager (#2481)
We are instantiating our own queue handling factory which returns the
flarum.queue.connection binding no matter what. The queue Worker and
other queue related code rely on this manager to get its thing going.
Therefor we need to re-use our own factory everywhere, including in
the worker.
2020-12-02 13:19:25 -05:00
Alexander Skvortsov
1a49dfc979 Use process isolation for integration tests 2020-12-01 19:33:24 -05:00
flarum-bot
720dfceb25 Bundled output for commit 3b953941b1 [skip ci] 2020-12-01 16:22:59 +00:00
Alexander Skvortsov
3b953941b1 Remove Deprecated Beta14 Code (#2428) 2020-12-01 11:21:28 -05:00
Nina Pypchenko
f0484cab74 DRY up image uploading code (#2477) 2020-12-01 10:42:05 -05:00
Sami Mazouz
55070ede84 ApiSerializer Extender (#2438) 2020-11-30 19:24:50 -05:00
flarum-bot
d1c8d88ddd Bundled output for commit 35228b4b27 [skip ci] 2020-11-30 19:02:41 +00:00
Alexander Skvortsov
35228b4b27 Don't use browser scroll restore in DiscussionPage (#2476)
Although native browser scroll restorations have become quite powerful, it interferes with Flarum's PostStream, so if we're on a DiscussionPage, we use manual scroll restoration.
2020-11-30 14:01:08 -05:00
flarum-bot
c100316451 Bundled output for commit e3acc0a9e3 [skip ci] 2020-11-29 23:34:50 +00:00
Alexander Skvortsov
e3acc0a9e3 Fix goToIndex to visible end
In the PostStream, `this.visibleEnd` represents the index of the last post + 1, but `loadNearIndex` treated it as if it was the index of the last post. This means that executing `goToIndex` on the post stream's current `this.visiblePost` didn't load new posts, and as a result, the requested scrolling did not occur.
2020-11-29 18:33:29 -05:00
flarum-bot
4a165a13c2 Bundled output for commit d85e5c31b7 [skip ci] 2020-11-29 22:47:21 +00:00
Alexander Skvortsov
d85e5c31b7 Merge pull request #2465 from flarum/0.1.0-beta.14.1 2020-11-29 17:45:58 -05:00
Alexander Skvortsov
cb7f8cf92f Reset dist js 2020-11-29 17:41:16 -05:00
Alexander Skvortsov
ed9131b36c Move floodgate to middleware, add extender + integration tests (#2170) 2020-11-29 17:13:22 -05:00
sl-kr
5450fcda00 update a user's comment count if deleting a discussion (#2472) 2020-11-29 17:11:05 -05:00
flarum-bot
8536285106 Bundled output for commit d1f5bd8df5 [skip ci] 2020-11-26 22:54:38 +00:00
Mohammad Reza
d1f5bd8df5 Clear error alerts in change email modal on success (#2467) 2020-11-26 17:53:38 -05:00
Nina Pypchenko
3792509521 Update tsconfig file to include .tsx files (#2457) 2020-11-26 12:00:13 -05:00
flarum-bot
46fd65a2d1 Bundled output for commit bd3c330217 [skip ci] 2020-11-26 06:56:10 +00:00
Alexander Skvortsov
bd3c330217 Defer clearing discussion list on discussion start
This prevents an edge case where `app.discussions` is considered empty while the new page is loading, and as a result, the side pane isn't set as "enabled". Then, if the pane has previously been pinned, when the page loads and the side pane appears, it covers up part of the discussion page.

Fixes https://github.com/flarum/core/issues/2471
2020-11-26 01:54:28 -05:00
flarum-bot
5dec091207 Bundled output for commit d9d6df4326 [skip ci] 2020-11-24 17:46:02 +00:00
Charlie
d9d6df4326 AdminUX Overhaul (#2409)
- Extensions now have their own pages
- The API for extensions to register permissions and settings has been overhauled via the `flarum/admin/utils/ExtensionData` util
- An extension grid has been added as a widget to the Dashboard page
2020-11-24 12:44:40 -05:00
flarum-bot
b2bfe77e67 Bundled output for commit 3d597f9fab [skip ci] 2020-11-14 22:23:04 +00:00
Wadim Kalmykov
3d597f9fab Fix mobile PostStream top scroll adjustment & remove App:before (#2385)
- remove App:before so we can use #app-navigation to access the mobile header
- fix mobile postStream scroll top margin adjustment
2020-11-14 17:21:38 -05:00
Alexander Skvortsov
10e356e1b2 Refactor Route Resolving and Dispatch (#2425)
- Split DispatchRoute. This allows us to run middleware after we figure out which route we're on, but before we actually execute the controller for that route.
- By making the route name explicitly available to middlewares, applications like CSRF and floodgate can set patterns based on route names instead of the path, which is an implementation detail.
- Support using route name match for CSRF extender, deprecate path match
2020-11-10 12:52:12 -05:00
Nina Pypchenko
29157ac2a9 Make checkbox switch component background stand out in modals (#2443) 2020-11-09 20:54:21 -05:00
Alexander Skvortsov
e2366aa5f8 Add missing import 2020-11-08 21:49:11 -05:00
Alexander Skvortsov
74946a3d04 Fix Callables for Extenders (#2423)
- Standardize signatures and variable names for extenders that take callbacks
- Adjust model extender docblock to clarify that default calue can't be an invokable class.
- Make invokable classes provided to Model->relationship
- Add integration tests to ensure Model->relationship and User->groupProcessor extenders accept callbacks
- Extract code for wrapping callbacks into central util
2020-11-08 21:36:38 -05:00
Nina Pypchenko
de5d9644cf Improved Permissions Error Messages for Initial Install (#2435)
- Made the wording of the error more generic
- Added link to the relevant section in the installation guide

Resolves #2327.
2020-11-07 14:48:11 -05:00
Sami Mazouz
0ae19a3da6 Add Service Provider Extender (#2437) 2020-11-06 13:30:10 -05:00
Sami Mazouz
185a737273 Add Notification Channel Extender (#2432) 2020-11-05 12:09:06 -05:00