8498 Commits

Author SHA1 Message Date
David Wheatley
30a95910bb Remove unused dependency 2021-05-12 22:00:34 +01: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
flarum-bot
f1e8821b70 Bundled output for commit b8c0787dfaf64fc0d9741f45991b2eda85dc54a2 [skip ci] 2021-05-12 03:57:28 +00:00
Alexander Skvortsov
b8c0787dfa Tooltip formatting fix 2021-05-11 23:55:52 -04:00
Alexander Skvortsov
0bd3dcec39 Typehint event in console scheduling test case 2021-05-11 23:55:34 -04:00
Alexander Skvortsov
fd48af2032 Massively simplify TagPolicy 2021-05-11 22:16:55 -04:00
Alexander Skvortsov
39aeba8200 Publish v0.1.0-beta.16.1 2021-05-11 20:35:56 -04:00
David Wheatley
4bdb02a878 Move Typescript configuration to webpack config from core (#11) 2021-05-11 20:28:31 -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
David Wheatley
a9184a1c2e Fix base tsconfig typo 2021-05-12 01:03:52 +01:00
David Wheatley
36f546aefa Initial commit 2021-05-12 00:37:38 +01:00
Alexander Skvortsov
ce7484e2c8 Extensions should be considered enabled after boot.
Before boot, we consider them "disabled" so they get migrated.
2021-05-11 19:31:35 -04:00
flarum-bot
2164b82b80 Bundled output for commit 29957d2b1d3d3e9ca21efc9c25bb1afe3553842a [skip ci] 2021-05-11 23:15:50 +00:00
David Sevilla Martín
29957d2b1d Create abstract PaginatedListState for DiscussionList and others (#2781) 2021-05-11 19:14:26 -04:00
Alexander Skvortsov
d68d551e16 Ensure that migrations run 2021-05-11 17:15:11 -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
Alexander Skvortsov
5febbf8fb1 get/set enabled extensions from test case, not DB 2021-05-11 16:24:27 -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
flarum-bot
3a7acc48d0 Bundled output for commit bd33954a570ccb364b739890183e49d01b113bbd [skip ci] 2021-05-11 19:17:04 +00:00
Alexander Skvortsov
bd33954a57 Rename viewDiscussions => viewForum, viewUserList => searchUsers (#2854)
This naming is clearer as to the intended effect. Changes include:

- A migration to rename all permissions
- Updating the seed migration to use the original naming from the start
- Replacing usage of the old names with new names in code
- Throwing warnings when the old names are used.
2021-05-11 15:15:27 -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
f08767fed2 Bundled output for commit acd3873bbd46e92510ebf92e7182324e1c6d540e [skip ci] 2021-05-11 02:31:32 +00:00
Alexander Skvortsov
acd3873bbd Search frontend cleanup (#2849)
- Convert KeyboardNavigatable to TypeScript, as that is used internally here.
- Convert search sources to TypeScript
- Convert Search component to TypeScript
- Convert Search States to Typescript
- Add `getInitialSearch` to `SearchState`
- Fix search disappearing on page reload / direct link
2021-05-10 22:30:04 -04:00
David Sevilla Martín
6fd185e425 Improve discussion page canonical URL (#2853)
* Switch to ?page= discussion page canonical URL & fix no-JS pagination buttons
2021-05-10 19:20:47 -04:00
Alexander Skvortsov
03e4f31bda Squash core migrations (#2842)
Data migrations (seed default groups, seed default permissions) are deliberately excluded.
This also allows us to remove a lot of now unnecessary public API from the migrator and migration repository.
2021-05-10 18:05:01 -04:00
flarum-bot
2401355fb9 Bundled output for commit 90cfd36e30dace4edea174a2dd35e1c9823954ab [skip ci] 2021-05-10 21:56:41 +00:00
Alexander Skvortsov
90cfd36e30 Some minor JS cleanup (#2846)
- Change index files to ts
- Remove deprecated EditUserModal from forum compat
- Remove b14-specific error
- Remove transChoice method (ICU should be used instead)
- Translator to TypeScript
- Small JS => TS cleanup
* Trivial js => ts change

Co-authored-by: David Wheatley <hi@davwheat.dev>
2021-05-10 17:54:58 -04:00
Alexander Skvortsov
60dea59815 Use github markdown utils in core, support key handlers (#2826)
This simplifies the markdown extension and allows BBCode to use these features.
It also allows undoing stuff like inserting replies/mentions
2021-05-10 17:53:32 -04:00
Alexander Skvortsov
d5c2a997b1 Run API Client requests through middleware (#2783)
- Add integration tests for login and registration
- Use URL instead of controller
- Add fluent API
- Allow setting parent request, user, session
2021-05-10 17:41:38 -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
a7373487fb Bundled output for commit 194031bdae33f730bc4403802fe5031540cdff1a [skip ci] 2021-05-10 20:07:59 +00:00
David Wheatley
194031bdae Add tooltip component (#2843)
* Add Tooltip component to common

Will be used to provide backwards compatibility when we switch to CSS tooltips.

All other methods of creating tooltips are deprecated and this component-based method should be used instead.

* Modify direct child instead of using container element

Instead of using a container to house the tooltip, we'll now modify the
first direct child of the Tooltip component.

The Tooltip component will ensure that:
- children are passed to it
- only one child is present
- that child is an actual HTML Element and not a text node, or similar
- that child is currently present in the DOM

Only after all of the above are satisfied, will the tooltip be created
on that element. We store a reference to the DOM node that the tooltip
should be created on, then use this to perform tooltip actions via
jQuery. If this element gets changes (e.g. the tooltip content is
updated to another element) then the tooltip will be recreated.

If any of the first 3 requirements are not satisfied, an error will
be thrown to alert the developer to their misuse of this component.

To make this work, we do need to overwrite the title attribute of
the element with the tooltip, but this is the only solution other than
specifying `title` as an option when making the tooltip, but this is
not accessible by screenreaders unless they simulate a hover on the
element.

* Add warning about component overwriting `title` attr

* Update previous uses of Tooltip component
2021-05-10 21:06:40 +01: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
David Wheatley
3610f08d6b Support Mithril fragments with <></> syntax (#10)
* Support Mithril fragments with `<></>` syntax

* Use '[' for pragmaFrag
2021-05-10 12:23:08 +01:00
flarum-bot
afad2dc584 Bundled output for commit 6c2d01a5b8189def42d2de89d3eb83fec581db64 [skip ci] 2021-05-09 22:10:56 +00:00
Alexander Skvortsov
6c2d01a5b8 Use all Mithril lifecycle stubs (#2847) 2021-05-09 18:09:45 -04:00
David Wheatley
45602a83c6 Remove spin.js, bump some dependencies (#2848) 2021-05-09 18:09:29 -04:00
flarum-bot
c81d203e8e Bundled output for commit e7427f59daacd1e68e83a2afdcaeb99c413bf68a [skip ci] 2021-05-09 21:35:04 +00:00
David Wheatley
e7427f59da Fix typo in LoadingIndicator docblock 2021-05-09 22:33:33 +01:00
flarum-bot
0704952b5c Bundled output for commit 1d0d1c825ad65ee9f4e70ed78da01ad59b725cdf [skip ci] 2021-05-09 21:23:38 +00:00
David Wheatley
1d0d1c825a Fix required selector argument to Component.$() (#2844) 2021-05-09 17:22:22 -04:00
flarum-bot
503c3fe640 Bundled output for commit e335e316afdf6f8a7d7cd3117f346c945336ec1b [skip ci] 2021-05-07 16:31:01 +00:00