Commit Graph

409 Commits

Author SHA1 Message Date
Sami Mazouz
016503d8c3
feat: export registry (#3842)
* feat: registry first iteration

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat: improve webpack auto export loader

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: remove `compat` API

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: cleanup

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-06-29 18:57:53 +01:00
Sami Mazouz
5820a16a96
chore: increase phpstan level to 6 (#3836)
* chore: increase phpstan level to 6

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-06-21 14:31:24 +01:00
flarum-bot
7799c2fcd5 Bundled output for commit 11b4a810b7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-06-15 17:09:20 +00:00
Sami Mazouz
11b4a810b7
chore: upgrade to mithril 2.2 (#3831)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-06-15 18:04:41 +01:00
Sami Mazouz
493ffa0538
chore(phpstan): upgrade to be compatible with latest dependency updates (#3835) 2023-06-15 17:49:39 +01:00
Sami Mazouz
64b25b26c3
chore: improve test suite (#3814)
Allows running tests without constantly running `composer install` on each extension.
2023-06-15 13:26:39 +01:00
flarum-bot
3757bde4fc Bundled output for commit f67ca5782a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-06-07 10:45:14 +00:00
Sami Mazouz
951f58e567
fix(regression): require flarum/testing:2.0
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-31 09:53:59 +01:00
Sami Mazouz
082f04d3c3
fix(regression): caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-31 09:50:39 +01:00
Sami Mazouz
04fe2616a4
Revert "fix(regression): caught errors"
This reverts commit c94c140484.
2023-05-31 09:47:30 +01:00
Sami Mazouz
c94c140484
fix(regression): caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-31 09:45:50 +01:00
Sami Mazouz
6f11e044a7
chore: update codebase to php8.1 (#3827)
* chore: set minimum php version to 8.1

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: update codebase to php8.1

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: update workflow php version

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: more caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: phpstan caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* fix: test-caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: test-caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: test-caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: introduce `Flarum\Locale\TranslatorInterface`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: remove mixin

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: test-caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: one last error

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-05-30 11:36:12 +01:00
Sami Mazouz
e5abffc75b
chore: v1.8 preparations
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-20 16:08:42 +01:00
Sami Mazouz
231cee1f78
fix(regression): newCollection accepts collections
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-05-15 17:31:23 +01:00
Sami Mazouz
9363682e1c
fix: filter values are not validated (#3795) 2023-05-07 18:37:53 +01:00
flarum-bot
c766881e1f Bundled output for commit e63e161be6
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-05-07 16:49:15 +00:00
David Wheatley
e63e161be6
chore: major frontend JS cleanup (#3609) 2023-05-07 17:40:18 +01:00
Sami Mazouz
919c3bb770
perf: speed up post creation time (#3808)
* chore: drop unused visibility checking in notif syncer

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* perf: eager load parsed mentions

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* perf: eager load some relations needed for visibility checking

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* perf: trigger mentions notifications in a queueable job

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* fix: broken tag mentions

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-04-30 10:10:31 +01:00
Sami Mazouz
af3f91ca5b
fix(tags): DiscussionTaggedPost shows tags as deleted (#3812)
* fix(tags): `DiscussionTaggedPost` shows tags as `deleted`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-04-29 09:48:01 +02:00
flarum-bot
105b22976e Bundled output for commit fea31a8290
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-24 17:10:43 +00:00
Sami Mazouz
accdfde6e1
fix(mentions): mentions XHR fired even after mentioning is done (#3806)
* fix(mentions): mentions XHR fired even after mentioning is done

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: simplify diff

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-24 17:57:41 +01:00
flarum-bot
1792e22639 Bundled output for commit 5e281136f6
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-19 12:05:15 +00:00
Sami Mazouz
5e281136f6
feat(mentions,tags): tag mentions (#3769)
* feat: add tag search

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat(mentions): tag mentions backend

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat: tag mention design

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* refactor: revamp mentions autocomplete

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: unauthorized mention of hidden groups

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat(mentions,tags): use hash format for tag mentions

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* refactor: frontend mention format API with mentionable models

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat: implement tag search on the frontend

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: tag color contrast

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: tag suggestions styling

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* test: works with disabled tags extension

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: move `MentionFormats` to `formats`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: mentions preview bad styling

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* docs: further migration location clarification

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* fix: bad test namespace

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: phpstan

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: conditionally add tag related extenders

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* feat(phpstan): evaluate conditional extenders

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* feat: use mithril routing for tag mentions

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-04-19 12:58:11 +01:00
flarum-bot
c0af41c305 Bundled output for commit d0669b08aa
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-19 08:32:02 +00:00
Sami Mazouz
d0669b08aa
perf(likes): limit likes relationship results (#3781)
* perf(core,mentions): limit `mentionedBy` post relation results

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: use a static property to allow customization

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: use a static property to allow customization

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: include count in show post endpoint

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: consistent locale key format

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: forgot to delete `FilterVisiblePosts`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* test: `mentionedByCount` must not include invisible posts to actor

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: visibility scoping on `mentionedByCount`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: `loadAggregates` conflicts with visibility scopers

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: phpstan

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* perf(likes): limit `likes` relationship results

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: simplify

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* test: `likesCount` is as expected

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: IanM <16573496+imorland@users.noreply.github.com>
2023-04-19 09:22:41 +01:00
flarum-bot
6b8e9ce1db Bundled output for commit fbbece4bda
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-04-19 07:30:05 +00:00
Sami Mazouz
fbbece4bda
perf(core,mentions): limit mentionedBy post relation results (#3780)
* perf(core,mentions): limit `mentionedBy` post relation results

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: use a static property to allow customization

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: use a static property to allow customization

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: include count in show post endpoint

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: consistent locale key format

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: forgot to delete `FilterVisiblePosts`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* test: `mentionedByCount` must not include invisible posts to actor

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: visibility scoping on `mentionedByCount`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: `loadAggregates` conflicts with visibility scopers

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* chore: phpstan

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-04-19 08:23:08 +01:00
dependabot[bot]
13e655aca5
chore(deps): bump webpack from 5.75.0 to 5.76.0 (#3761)
Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 07:45:00 +01:00
Rafael Horvat
85b63681ae
Fix: Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous (#3772) 2023-03-21 10:32:23 +00:00
Sami Mazouz
b66fe5dd5f
chore(release): preparations
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-09 19:00:32 +01:00
Tristian Kelly
33e2bd1a77
fix(mentions): post reply mention missing notification on approval (#3738)
* Add PostWasApproved event

* Apply fixes from StyleCI

* fix: phpstan error

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

---------

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-02-21 15:04:03 +00:00
IanM
1ee5cf6ba9
feat(core): PHP 8.2 Support (#3709)
* chore: test with php 8.2
* chore: bump httphandlerunnder
* chore: bump httphandlerunner
* chore: address php8.2 deprecation
* chore: php 8.2
* chore: bump less.php version
* avoid dynamic properties
* avoid another dynamic property
* Apply fixes from StyleCI
* tags php82
* php82
* fix: check for property existence
* Rerun checks after s9e/text-formatter update
* chore: disable deprecation warnings for php 8.2
* chore: PHP8.2 does not accept dynamic properties
* chore: temporarily disable package manager tests workflow

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2023-02-14 19:09:56 +01:00
flarum-bot
08dead81ce Bundled output for commit 47b670aa29
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-02-08 20:19:47 +00:00
Sami Mazouz
47b670aa29
feat: frontend Model extender (#3646)
* feat: reintroduce frontend extenders
* chore: used `Routes` extender in bundled extensions
* chore: used `PostTypes` extender in bundled extensions
* chore: `yarn format`
* feat: `Model` frontend extender
* chore: naming
* chore(review): attributes can be nullable or undefined
* chore(review): delay extender implementation
* chore(review): unnecessary check
* chore(review): stay consistent
* chore: merge conflicts
* chore: unused import
* chore: multiline extenders
* feat: add Store extender

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-02-08 21:13:53 +01:00
flarum-bot
2e0f026dde Bundled output for commit bf52743510
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-01-22 13:16:48 +00:00
Sami Mazouz
bf52743510
chore: improve group mentions parsing (#3723)
* chore: improve group mentions color handling
* Avoid storing the `GroupMention--dark` and light classes on the database.
* Avoid recreating YIQ logic on the backend.
* Improve text color flexibility through CSS variables.
* Apply fixes from StyleCI
* chore: tweak tests
* chre: unused import

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-22 14:11:13 +01:00
Sami Mazouz
da1bf8da21
chore(phpstan): enable phpstan in bundled extensions (#3667)
* feat(phpstan): pick up extended model relations typings
* feat(phpstan): pick up extended model date attributes
* feat(core): introduce `castAttribute` extender
Stops using `dates` as it's deprecated in laravel 8
* feat(phpstan): pick up extended model attributes through casts
* fix: extenders not resolved when declared namespace
* fix(phpstan): new model attributes are always nullable
* chore(phpstan): add helpful cache clearing command
* Apply fixes from StyleCI
* chore: improve extend files provider logic
* chore: rename `castAttribute` to just `cast`
* chore: update phpstan package to detect `cast` method
* chore: enable phpstan in bundled extensions
* chore: rebasing conflicts
* chore: rebasing conflicts
* chore: typings for latest 1.7 changes

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-19 21:49:38 +01:00
flarum-bot
6adae00f72 Bundled output for commit d7f4975330
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-01-17 18:15:45 +00:00
Sami Mazouz
d7f4975330
feat: introduce frontend extenders (#3645)
* feat: reintroduce frontend extenders
* chore: used `Routes` extender in bundled extensions
* chore: used `PostTypes` extender in bundled extensions
* chore: `yarn format`
* chore: naming
* chore(review): unnecessary check
* chore(review): stay consistent
* chore: unused import

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-17 19:10:24 +01:00
Sami Mazouz
4a38047bfb
Merge branch 'main' into merge-1.6.3-into-main 2023-01-13 19:12:11 +01:00
StyleCI Bot
be63b28437
Apply fixes from StyleCI 2023-01-10 15:00:37 +01:00
Sami Mazouz
132fdea659
Merge pull request from GHSA-22m9-m3ww-53h3
* fix: check post visibility when mentioning

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: `mentionsPosts` include is not used and leaks private posts

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chre: use `PostRepository`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-10 15:00:37 +01:00
flarum-bot
0eff1f6b2d Bundled output for commit a53a0db2b7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-12-12 09:48:42 +00:00
Sami Mazouz
a53a0db2b7
feat(tags): admin tag selection component (reusable tag selection modal) (#3686)
* chore: move `KeyboardNavigation` to `common` first
* feat: exract reusable `TagSelectionModal` from `TagDiscussionModal`
* fix: improve for generic use
* feat: add select tags admin setting component
2022-12-12 10:44:33 +01:00
flarum-bot
0e238a9c82 Bundled output for commit 64fa35f2f3
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-25 17:25:24 +00:00
flarum-bot
c50c924242 Bundled output for commit 18bdd48835
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-16 10:30:13 +00:00
flarum-bot
ab56aefeaa Bundled output for commit 259db92b9a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-10 23:30:18 +00:00
Daniël Klabbers
1e00e3fdbb chore: dependency on core updated for extensions 2022-11-10 13:48:00 +01:00
flarum-bot
1a81c98d43 Bundled output for commit c98e6ba5a7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-07 15:55:28 +00:00
Ian Morland
c98e6ba5a7
fix: groupmentions have poor contrast on some backgrounds (#3672)
* fix: poor text contrast on some backgrounds
* use hexdec()
* fix render test
* appears to be working now
2022-11-07 16:49:47 +01:00