Alexander Skvortsov
29525daa9b
Fix logic for TagListState
...
This should load in the requested includes, not just parent and lastPostedDiscussion
2021-05-17 00:20:09 -04:00
Alexander Skvortsov
8468a05b87
Unset tags relation after setting ( #131 )
...
This ensures that the proper tag values are returned to the API by clearing any cached tags before returning a response. It also makes sure that the listeners to the `DiscussionWasTagged` event won't have old data under `$event->discussion->tags`.
Fixes https://github.com/flarum/core/issues/2514
2021-05-16 23:28:54 -04:00
SychO9
3635dbad19
Fix $tag
object getting overriden by last array item
2021-05-16 23:53:34 +01:00
Alexander Skvortsov
bcb5577de5
Bump composer reqs for 1.0.0
2021-05-16 18:29:46 -04:00
SychO9
88f44ca0d0
Use core dev-master for tests
2021-05-15 22:54:01 +01:00
David Wheatley
e15aaf428c
Update copyright year
2021-05-15 00:58:11 +01:00
flarum-bot
91891da48b
Bundled output for commit 0ec87f5b43
...
Includes transpiled JS/TS.
[skip ci]
2021-05-13 00:03:13 +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
d69b3fbb12
Update for ICU MessageFormat
2021-05-12 19:36:41 -04:00
Alexander Skvortsov
b6113169f8
Use new permissions
2021-05-12 18:52:19 -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
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 99009e5d3b
[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
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
382729dd46
Bundled output for commit cc7e805a4b
[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
flarum-bot
42a1c97371
Bundled output for commit a1edbdc9b0
[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
Alexander Skvortsov
5235dda1e4
Use RequestUtil to access actor
2021-04-08 00:07:14 -04:00
Sami Mazouz
a1ba21ec69
Eager load tags relation in discussion, posts and flags listing endpoints ( #125 )
...
* Eager load tags relation when listing posts & discussions
* Eager load ListFlags post.discussion.tags relation
2021-03-25 15:37:14 +01:00
Ian Morland
1b339267f8
Canonical URL: Use UrlGenerator in place of extracting the url from request ( #122 )
2021-03-15 21:44:22 -04:00
Daniel Klabbers
4ff74d3289
Release v0.1.0-beta.16
2021-03-15 13:03:08 +01:00
Alexander Skvortsov
6c25f09c9b
Use non-deprecated translator interface
2021-03-13 17:11:42 -05:00
flarum-bot
208aa47e60
Bundled output for commit 932c31db6d
[skip ci]
2021-03-13 22:01:34 +00:00
Alexander Skvortsov
932c31db6d
Apply fixes from StyleCI
2021-03-13 22:00:39 +00:00
Alexander Skvortsov
ee48c97a23
Tags admin list: move edit button back to where it should be
2021-03-13 17:00:27 -05:00
Alexander Skvortsov
85de81627d
Update for beta 16
2021-03-13 16:54:03 -05:00
Alexander Skvortsov
80efe35b16
Add defaults to params that should have it.
...
This fixes PHP8 warnings about required parameters following optional ones.
2021-03-08 15:51:56 -05:00
Charlie
7c1a96119c
Change category ( #118 )
2021-03-08 14:20:41 -05:00
Sami Mazouz
b78b097724
Eagerload lastPostedDiscussion needed relationships ( #120 )
2021-03-06 10:37:26 -05:00
Daniël Klabbers
162167fe23
made compatible with illuminate 8 and beta 16 ( #121 )
2021-03-05 09:44:20 -05:00
flarum-bot
6dc433470f
Bundled output for commit 181229ae93
[skip ci]
2021-03-05 03:16:09 +00:00
Sami Mazouz
181229ae93
Check for selectable tags before opening tag selection modal ( #112 )
2021-03-04 22:15:27 -05:00
Robert Korulczyk
0bf6384bb2
Move locale files from language pack to extension ( #99 )
2021-02-17 16:24:19 -05:00
flarum-bot
ad9eaa38b2
Bundled output for commit 42158112bf
[skip ci]
2021-02-17 13:51:41 +00:00
David Wheatley
42158112bf
Add missing Button-label span from ButtonLink ( #113 )
...
Every sideNav item created by flarum/core includes this span, so tags should too.
2021-02-17 08:50:35 -05:00
flarum-bot
03426b57a0
Bundled output for commit 300e47cfb3
[skip ci]
2021-02-08 02:34:44 +00:00
Alexander Skvortsov
300e47cfb3
Fix editing tags ( #117 )
...
`tagLabel` expects an object with an isChild method, so we can just wrap needed data in a Tag object. We don't want to update `this.tag`, since that would mess things up if the user exits the modal without saving.
2021-02-07 18:33:49 -08:00
Charlie
1980636ed6
Max-height for tags settings ( #116 )
2021-02-07 17:11:42 -05:00
flarum-bot
0765d3fdb7
Bundled output for commit 9c77d677c6
[skip ci]
2021-02-07 06:39:33 +00:00
Alexander Skvortsov
9c77d677c6
Fix submitting TagDiscussionModal via enter key
...
The DOM submit method doesn't raise a `submit` event (https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit ), so submitting the form this way just refreshed the page (default HTML form behavior). The recommended fix (and the one implemented here) is to simulate a button-triggered submission.
Fixes https://github.com/flarum/core/issues/2595
2021-02-07 01:38:39 -05:00
flarum-bot
7f14e72626
Bundled output for commit b6ca4c8c84
[skip ci]
2021-02-01 21:03:27 +00:00
David Wheatley
b6ca4c8c84
Add "TagLabel--child" class to tagLabel to aid with custom theming ( #114 )
2021-02-01 16:02:36 -05:00
flarum-bot
3573b694e5
Bundled output for commit b985aa8631
[skip ci]
2021-01-26 22:09:35 +00:00