3579 Commits

Author SHA1 Message Date
flarum-bot
d7698f04a4 Bundled output for commit 6c27c08672c431224bc2a1c9f13641a9954550db
Includes transpiled JS/TS.

[skip ci]
2021-05-13 00:02:48 +00:00
flarum-bot
9e80c69124 Bundled output for commit ce65375e2a764afb03b5205ab0329cfcff87be2e
Includes transpiled JS/TS.

[skip ci]
2021-05-13 00:02:47 +00:00
Alexander Skvortsov
0ec87f5b43 Apply fixes from StyleCI 2021-05-13 00:02:06 +00:00
Alexander Skvortsov
f9e8c51e76 Don't add filter q if not defined
Otherwise, the backend controller will think we are searching, not filtering, and fail to apply filters.
2021-05-12 20:01:04 -04:00
Alexander Skvortsov
494633537e Update for API Client changes 2021-05-12 19:58:49 -04:00
Alexander Skvortsov
706a07429d Use RequestUtil to access actor 2021-05-12 19:48:17 -04:00
Alexander Skvortsov
ce65375e2a Adjust EditUserModal import 2021-05-12 19:46:07 -04:00
Alexander Skvortsov
0be39b144c Update for ICU MessageFormat 2021-05-12 19:37:44 -04:00
Alexander Skvortsov
d69b3fbb12 Update for ICU MessageFormat 2021-05-12 19:36:41 -04:00
Alexander Skvortsov
ae69dd25c7 Update for ICU MessageFormat 2021-05-12 19:27:13 -04:00
Alexander Skvortsov
6c27c08672 Update for ICU MessageFormat 2021-05-12 19:24:06 -04:00
Alexander Skvortsov
b6113169f8 Use new permissions 2021-05-12 18:52:19 -04:00
flarum-bot
bc187d9b83 Bundled output for commit 3e596aaadf99bb0ee793665eb8417f740782de49 [skip ci] 2021-05-12 19:43:31 +00:00
Sami Mazouz
3e596aaadf Move replies preview dropdown out of Post-footer (#55) 2021-05-12 20:42:33 +01:00
Alexander Skvortsov
fd48af2032 Massively simplify TagPolicy 2021-05-11 22:16:55 -04:00
Alexander Skvortsov
0d5510154e Apply fixes from StyleCI 2021-05-12 00:10:22 +00:00
Alexander Skvortsov
bf5a401787 Remove flags visibility scoping
This was moved to flags in 9fe9dd515b
2021-05-11 20:10:10 -04:00
Alexander Skvortsov
99a82d0069 Apply fixes from StyleCI 2021-05-12 00:08:36 +00:00
Alexander Skvortsov
be59e77a01 Move in visibility scoping from tags, add automated testing. 2021-05-11 20:04:52 -04:00
Sami Mazouz
fffedb4e1d Only check for bypassTagCounts permission for startDiscussion ability (#130)
This doesn't fix anything, but we should explicitly only check the 
permission for the ability it is meant for, just to be safe in the 
future.
Also add more tests.
2021-05-11 16:35:10 -04:00
flarum-bot
a0f9416f90 Bundled output for commit 99009e5d3b965a2c1d67b4bbfd4861b7ad0f3627 [skip ci] 2021-05-11 20:06:14 +00:00
Alexander Skvortsov
99009e5d3b Permission Tag Scoping Field (#127)
This allows tag scoping permissions that don't start with `discussion`, or on the contrary, removing tag scoping from permissions that DO start with `discussion`.

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2021-05-11 16:05:11 -04:00
Glowing Blue
93d373f066 Added created_at to post_likes table (#28) 2021-05-11 15:23:35 -04:00
Alexander Skvortsov
dfbb468744 Refactor queryIdsWhereCan (#128)
- Rename to queryIdsWhereHasPermission, since that's more accurate
- Make the base query an optional 3rd argument. This feels more intuitive
- Add a `can` function in AbstractPolicy, so extensions that add tag scopable permissions don't need to define their own policies (e.g. with approval)
- Combine ScopeDiscussionVisibilityWithAbility and ScopeDiscussionVisibility
- Fix ScopeDiscussionVisibility only requiring in one tag, not all.
- Add lots and lots of tests

Co-authored-by: SychO9 <sychocouldy@gmail.com>
2021-05-11 02:34:30 -04:00
flarum-bot
be62a33d23 Bundled output for commit 7ea9db7426b37cf78aa94c68d5fa9e128dc0e67d [skip ci] 2021-05-10 21:36:25 +00:00
Alexander Skvortsov
7ea9db7426 Editor Consolidation (#28)
- Move insertText to core
- Move styles and apply to core
- Simplify shortcut and button system
- Drop mdarea for now. In the future, we could implement the features we use (list continue, indent) in core.
- Remove admin dist (only admin setting was mdarea)
- Move inline style to css
2021-05-10 17:35:22 -04:00
flarum-bot
382729dd46 Bundled output for commit cc7e805a4bfa11637a50932cbc594285d4f0d056 [skip ci] 2021-05-10 18:22:48 +00:00
Alexander Skvortsov
cc7e805a4b Restore searching in tags when on tag page (#129) 2021-05-10 14:21:43 -04:00
Alexander Skvortsov
8ed08b63cd Fix mentioned filtering (#67) 2021-05-04 14:57:29 -04:00
flarum-bot
42a1c97371 Bundled output for commit a1edbdc9b0e13f2f1ac6fc540dadadd295a8de7d [skip ci] 2021-05-04 17:58:54 +00:00
Daniël Klabbers
a1edbdc9b0 Initial tag load performance improvement (#87)
- Only load lastPostedDiscussion on TagsPage
- For forum payload, only load top-level primary tags and top 3 secondary tags.
- In other cases, load tags in dynamically when needed.


Co-authored-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2021-05-04 13:57:55 -04:00
Alexander Skvortsov
712286151f Optimize tag permissions (#126)
The new implementation generates a subquery of IDs instead of sending big arrays of data to/from the database. This massively speeds up performance.
2021-05-04 12:53:20 -04:00
flarum-bot
e2b309ad95 Bundled output for commit 02d3355989e3fc179b5807584478a4b7b2bee588 [skip ci] 2021-05-02 20:38:50 +00:00
SychO9
02d3355989 Add space when inserting a post mention 2021-05-02 21:37:31 +01:00
flarum-bot
83ed624223 Bundled output for commit e407c6678471368273eb6fadc4a018849149816e [skip ci] 2021-04-21 09:59:51 +00:00
Sami Mazouz
e407c66784 New mentions format, decouple usernames from mentions (#65)
* Convert user mentions to new `@"Display Name"#ID` format

* Handle deleted user's mentions

* Convert post mentions to `@"Display Name"#pID` format

* Handle deleted user's post mentions and deleted posts mentions

* Clean display name of `"#{letters}{numbers}` (replace with underscore _)

* Adapt integration tests to new mention formats

* Use a deleted attribute for user mentions

* Introduce cleanDisplayName util

* Detect new format with autocomplete

* Slug needed on rendering only

* Invalidate user mention tag when ID is invalid
This used to be implicitly done, when there was a username attribute configured, formatter would check that all attributes are available and if not invalidate.

since we now only have `displayname` and `id` attributes which are both available from the regex matching, formatter doesn't implicitly invalidate anymore and therefore validates ANY matches. So we explicitly invalidate the tag when the ID does not match a user.

* Allow username mention format with a setting

* Add tests for turning setting on/off

* Move setting check to tag filter
Because the configurator caches, changing the setting only takes effect after the cache is cleared.

* fix: showing autocomplete at the right moment

* Add dockblocks to explain unparsing process
2021-04-21 10:58:54 +01:00
Alexander Skvortsov
3b3cbdc82f Fix conflicts with other extension visibility scoping (#26)
Wrapping all `wheres` in an `orWhere` ensures that there's no conflict.

See https://github.com/flarum/core/issues/2798, https://github.com/flarum/docs/pull/200
2021-04-20 14:51:01 -04:00
Sami Mazouz
057517688c Add integration tests (#66) 2021-04-13 22:27:42 +01:00
Alexander Skvortsov
62be9088a1 Use RequestUtil to access actor 2021-04-12 17:50:59 -04:00
Alexander Skvortsov
258fe6d158 Apply fixes from StyleCI 2021-04-12 02:29:32 +00:00
Alexander Skvortsov
078441204d Use criteria's sortIsDefault field
This was introduced in https://github.com/flarum/core/pull/2773, and allows us to more cleanly determine whether the sort requested is the default one, while taking extension modifications into account.
2021-04-11 22:29:20 -04:00
Alexander Skvortsov
5235dda1e4 Use RequestUtil to access actor 2021-04-08 00:07:14 -04:00
Alexander Skvortsov
cd3934e358 Use RequestUtil to access actor 2021-04-08 00:03:18 -04:00
Alexander Skvortsov
f80a88d45b Use RequestUtil for accessing actor 2021-04-08 00:02:11 -04:00
Alexander Skvortsov
9936681634 Use Symfony translator contract instead of deprecated component 2021-04-08 00:00:49 -04:00
Sami Mazouz
d5149b7406 Eager load post.user.groups relation and allow extensions to eager load relations (#38)
* Allow extensions to eager load relations
* Eager load post.user.groups
2021-04-07 16:24:52 +01:00
Alexander Skvortsov
0b65a4c375 Update changelog for 0.1.0-beta.16.1 2021-04-06 18:20:14 -04:00
Alexander Skvortsov
c9d9e85780 Fix FullTextGambit interface compatibility 2021-04-04 15:44:07 -04:00
Alexander Skvortsov
ac4edef78c Use extender for setting NicknameFullTextGambit 2021-04-04 13:41:15 -04:00
Alexander Skvortsov
4ec8b87cdc Update changelog for v0.1.0-beta.16.1 2021-03-25 13:54:43 -04:00