* add yiq calculator util
* use the new contast util to differentiate light/dark tags
* fix: invert logic
* feat: add tag-dark and tag-light less config
* fix: convert 3 chars hex to 6 chars hex
* fix: rename import
* fix: clarify util name
* fix: rename function
* fix: invert less variables when dark mode is enabled
* fix: TagTiles contrast
* refactor: simplify logic with a unique variable
* refactor: simplify logic with a unique variable
* feat: add text color variables not depending on the dark/light mode
* refactor: use isDark rather than getContrast
* refactor: change getContrast to isDark with for a more direct approach
* fix: adjust snippet description
* refactor: change getContrast to isDark with for a more direct approach
* fix: adjust snippet description
* fix: TagHero contrast
* fix: DiscussionHero contrast
* fix: newDiscussion contrast
* fix(newDiscussion): restore less rule when tag is not colored
* fix: TagTiles description
* fix: TagTiles last posted
* chore: change `var` to `let`
* refactor: keep it for backwards compatibility
* refactor: keep it for backwards compatibility
* Apply suggestions from code review
* fix: missed this when I was resolving
* fix: remove dist files from pull request
* Revert "Resolved merge conflict"
This reverts commit c7f0d14aa8, reversing
changes made to 6753dfc2af.
* fix: missed this when I was resolving
* fix
* Update isDark.ts
* chore: flexible contrast color fixing
* refactor(isDark): clarify the doc block
* fix(isDark): increase the yiq threshold
* typo
* fix: preserve design coloring through light and dark modes
Co-authored-by: David Wheatley <david@davwheat.dev>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* 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
* Update framework/core/src/Extend/Model.php
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* test: add reply creation tests
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: access checking being bypassed for post creation when first post is deleted
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chore: recover tests
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chore: make provider public
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: notifications grant access to private data of posts
* chore: fix tests
* test: start with tests about notification subject visibility
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: check subject access before sending notification to user
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: Daniël Klabbers <daniel@klabbers.email>
* 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>
* feat: allow using utf8 characters in slugs
url-encoded slugs are not read by the backend.
* chore: use as a slug driver
* chore: refactor tests to use data provider
* Apply fixes from StyleCI
* fix: wrong resource used
* fix: forgotten slug from slug manager in serializer
* chore(review): adapt tag slug suggestions on the UI
* chore: introduce modes for slugging
* chore: `yarn format`
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* feat: include current user as forum relation
* Update framework/core/src/Api/Controller/ShowForumController.php
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* Update framework/core/src/Api/Controller/ShowForumController.php
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* Update framework/core/src/Api/Serializer/ForumSerializer.php
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* Update framework/core/tests/integration/api/forum/ShowTest.php
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* Update framework/core/tests/integration/api/forum/ShowTest.php
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* No need to call the user endpoint as we already have the data loaded
* chore: return types
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* feat: allow push additional items to the end of the poststream
* Update framework/core/js/src/forum/components/PostStream.js
Co-authored-by: David Wheatley <hi@davwheat.dev>
* chore: prettier
* Update framework/core/js/src/forum/components/PostStream.js
Co-authored-by: David Wheatley <hi@davwheat.dev>
Co-authored-by: David Wheatley <hi@davwheat.dev>
* Indicate cross-origin request in generic error message
* Run javascript format
* Move text to beginning of error message
* Update framework/core/locale/core.yml
Co-authored-by: David Wheatley <hi@davwheat.dev>
* feat: expose queue driver, schedule status
* Apply fixes from StyleCI
* docblock
* fix inheritdoc
* Add info link for scheduler setup
* Remove unsed import
* fix: phpstan error
* Only show scheduler status when jobs are registered
* Apply fixes from StyleCI
* add ItemList priorities
* Add translations
* Include schedule status in info console cmd
* Apply fixes from StyleCI
* Move identifyX logic into shared 'ApplicationInfoProvider'
* Apply fixes from StyleCI
* uniform data layout
* inject queue
Co-authored-by: StyleCI Bot <bot@styleci.io>
* fix: evaluated page title content
* chore: add comment
* chore: use DOMParser instead
* fix: use `innerHTML` for the actual value
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: David Wheatley <hi@davwheat.dev>