Commit Graph

3889 Commits

Author SHA1 Message Date
Alexander Skvortsov
4661de4ddc Simple Flarum Search Extender and tests (#2483) 2021-02-10 09:59:23 -05:00
flarum-bot
458ae2bfbe Bundled output for commit fcd00cc070 [skip ci] 2021-02-10 14:11:35 +00:00
Alexander Skvortsov
fcd00cc070 Export DiscussionListPane in compat
We forgot to do this in beta 14 when introducing the component.

Fixes https://github.com/flarum/core/issues/2591
2021-02-10 09:09:58 -05:00
Sami Mazouz
b1efe7b133 Rename ApiSerializer's mutate to attributes (#2578) 2021-02-05 13:21:36 -05:00
Alexander Skvortsov
2a2abfb3fa Deprecate GetModelIsPrivate, replace with extender (#2587) 2021-02-04 10:56:10 -05:00
David Wheatley
9ff3afbdc5 Correct non-existent cursor value (disallowed -> not-allowed) (#2585) 2021-02-01 08:58:41 -05:00
flarum-bot
33d7164fd0 Bundled output for commit cf85181e3e [skip ci] 2021-01-30 22:46:26 +00:00
David Sevilla Martín
cf85181e3e Navigate to dashboard page if extension ID not found (#2584) 2021-01-30 17:45:20 -05:00
flarum-bot
fea657e35b Bundled output for commit eedb6d3752 [skip ci] 2021-01-30 22:44:46 +00:00
David Sevilla Martín
eedb6d3752 Set this.changingState back to false in ExtensionPage if an error occurs (#2558) 2021-01-30 17:43:28 -05:00
Daniël Klabbers
54d78f4630 Fixes model visibility (#2580)
Model Visibility extender does not take into consideration missing
dependencies. For instance flarum/tags adds a policy on the Flag model
from flarum/flags. But because flarum/flags might as well not be
installed we need to check for the existence of that model. Otherwise
the exception is thrown or flarum fails to boot.
2021-01-29 08:13:16 -05:00
David Sevilla Martín
e03504a7f2 Use extension names instead of IDs when erroring on enable/disable reqs (#2563) 2021-01-28 19:41:04 -05:00
David Sevilla Martín
9ff85d661e Make disabled extension dot a red border instead of red background (#2562) 2021-01-27 08:04:19 -05:00
flarum-bot
9a04e05cfb Bundled output for commit c749abab21 [skip ci] 2021-01-27 05:04:48 +00:00
Alexander Skvortsov
c749abab21 BasicsPage: fix "show language selector" default
Since some boolean settings might be stored as string "0" or "1", the previous system no longer works, and it always sets the switch to true. The "no setting" check has been changed to reference `undefined`, so now the switch will only be defaulted to `true` if the setting truly hasn't been set.

Fixes https://github.com/flarum/core/issues/2574
2021-01-27 00:03:30 -05:00
Daniël Klabbers
8fdddf91a2 PHP 8 support, cookie unit tests (#2507) 2021-01-26 17:53:28 -05:00
flarum-bot
ec9e194243 Bundled output for commit 76c281aedd [skip ci] 2021-01-26 01:54:28 +00:00
Alexander Skvortsov
76c281aedd Remove unused variable 2021-01-25 20:53:07 -05:00
Alexander Skvortsov
1ede022dd8 ChangeEmailModal: dismiss alert on new request
Removing old errors at the beginning of the next request, rather than at the end of the next successful request, makes it clearer that any new errors are caused by the new inputs.

See https://github.com/flarum/core/pull/2467#issuecomment-749832787
2021-01-25 20:52:21 -05:00
flarum-bot
99dee979a6 Bundled output for commit de874da7e5 [skip ci] 2021-01-24 19:06:21 +00:00
David Wheatley
de874da7e5 Add missing a11y attributes (#2564) 2021-01-24 14:05:14 -05:00
flarum-bot
0e1b33c3e7 Bundled output for commit f4da9319ea [skip ci] 2021-01-24 17:13:48 +00:00
Alexander Skvortsov
f4da9319ea Fix notification panel infinite scroll (#2524)
Improves calculations for determining whether we are at the bottom of the notifications panel (which would trigger infinite scroll). This should be particularly effective in fixing issues on smaller screens.
2021-01-24 12:12:42 -05:00
Alexander Skvortsov
4432bce771 Merge pull request #2557 from flarum/as/remove-deprecated
Remove deprecated PHP events, bootstrap.php fallback
2021-01-23 16:52:38 -05:00
Alexander Skvortsov
375a33145f Remove deprecated bootstrap.php support
See https://github.com/flarum/core/issues/1557
2021-01-23 16:48:29 -05:00
Alexander Skvortsov
1ae7dbe464 Remove deprecated API events 2021-01-23 16:48:22 -05:00
flarum-bot
8f798deb87 Bundled output for commit 912a0381c3 [skip ci] 2021-01-23 21:44:56 +00:00
daniellesniak
912a0381c3 Convert highlight helper to Typescript (#2532) 2021-01-23 16:43:40 -05:00
Alexander Skvortsov
2ee8358dbb Remove deprecated formatting events 2021-01-20 16:25:32 -05:00
Alexander Skvortsov
555c7767df Remove deprecated UserPreferences event 2021-01-20 15:23:56 -05:00
Alexander Skvortsov
30a26b02f4 Remove deprecated floodgate 2021-01-20 15:23:30 -05:00
Alexander Skvortsov
ca99e9911c Remove deprecated notification events 2021-01-20 15:23:30 -05:00
Alexander Skvortsov
1303b3b939 Remove deprecated validation events 2021-01-20 15:23:30 -05:00
Alexander Skvortsov
c2e03d2b02 Remove deprecated post types event 2021-01-20 15:22:28 -05:00
Alexander Skvortsov
54fd02e839 Remove deprecated policy and visibility scoping events 2021-01-20 15:21:30 -05:00
Alexander Skvortsov
c887093e67 Remove deprecated CSRF wildcard path match 2021-01-20 12:01:52 -05:00
flarum-bot
fbdc36dfbd Bundled output for commit 0c30f309b8 [skip ci] 2021-01-19 22:40:14 +00:00
Alexander Skvortsov
0c30f309b8 Bring m.attrs.bidi in as a util
We previously used the tobscure/m.attrs.bidi github repo, but that repo was recently taken offline. We decided to integrate it as a util instead of publishing it as a separate package since we seem to be the only project using it, and adopting it into a new project requires barneycarroll/mattr, which does not seem to be used anywhere.

The code added here was taken from https://github.com/askvortsov1/m.attrs.bidi, a fork (without changes) of the tobscure repo. Support for alternative module systems and ways of registering bidi were removed, and the file was formatted in compliance with our prettier config.
2021-01-19 17:30:03 -05:00
Alexander Skvortsov
60eb89e152 NotificationTest: Rely on adminUser from installation 2021-01-19 17:05:53 -05:00
Sami Mazouz
88ef99b13c Add Notification extender beforeSending method (#2533) 2021-01-19 14:40:19 -05:00
Alexander Skvortsov
c12bf937f5 Policies: treat true as allow, and false as deny (#2534) 2021-01-18 18:28:48 -05:00
Alexander Skvortsov
877296d194 Add subscribe method to event extender (#2535)
Historically, extensions using subscribers has caused problems because subscribers were constructed/applied at extension boot. This caused some classes (e.g. UrlGenerator) to be resolved early, breaking parts of Flarum. For this reason, subscriber support wasn't included in the initial version of the Event extender.

However, updating extensions has shown that there is a legitimate use case for subscribers in organizing clean code; for instance, core's own `DiscussionMetadataUpdater`.

This commit introduces support for subscribers, but only applies them after the app has booted, which avoids the early resolution issues. Since event listeners/subscribers are only intended to be used with domain events, which would never be dispatched during app boot, the late activation of subscribers should not cause issue.
2021-01-15 20:33:29 -05:00
flarum-bot
d8b1ce60a8 Bundled output for commit 9a7fa7e4c9 [skip ci] 2021-01-13 22:50:31 +00:00
Wadim Kalmykov
9a7fa7e4c9 Fix DiscussionListPane jumping around (#2402)
Ensure that scroll position is retained between page changes, so if navigating via the sidebar, you don't need to re-scroll down every time.
2021-01-13 17:49:26 -05:00
Alexander Skvortsov
c1778d5dd6 Merge pull request #2304 from flarum/fl/tests-in-transaction
Run Backend Tests in Transactions
2021-01-12 21:26:59 -05:00
Alexander Skvortsov
a5a8b075dd Apply fixes from StyleCI
[ci skip] [skip ci]
2021-01-09 00:36:07 -05:00
Alexander Skvortsov
54e0d1b7da Fix fulltext search tests
Under InnoDB, database entries created in transactions are not processed by fulltext indexes until the transaction is committed. To work around this, cases that test fulltext search have been split off into a separate class that adds and removes seed discussions/posts outside of transactions during setUp/tearDown.
2021-01-09 00:35:55 -05:00
Alexander Skvortsov
7c0d98c63d Tests: purge settings cache
Some tests need to change settings, but since MemoryCacheSettingsRepository caches settings in-memory, those changes aren't reflected. The new `purgeSettingsCache` removes it from the container, eliminating that cache.

For UserTest, we also need to regenerate the display name driver, since that's set statically on boot, before we'll get a change to clear the settings cache.
2021-01-09 00:35:55 -05:00
Alexander Skvortsov
eeac5ffce9 Tests: Add missing instantiation of data 2021-01-09 00:35:55 -05:00
Alexander Skvortsov
17e2dc21ec Tests: Comply with default permissions
Before transactions, each test class would need to explicitly state starting state for permissions, which made the initial permission configuration somewhat arbitrary. Now, we might as well use the initial state of the default installation.

One of the User show_test tests has been commented out until
2021-01-09 00:35:55 -05:00