* 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>
* feat(seo): shift h1 tag from logo to discussion title
Many times have we seen opponents of using h2 as the discussion title. Although
my own SEO knowledge is limited, I have seen the importance of structuring pages
according to the content you wish to prioritize. If we only take that into consideration
there is zero reason for the app-wide identical logo to take precedence over any
other heading.
This change makes the logo a standard (visually identical) element, and
makes the discussion hero title a h1.
* feat(seo): rewrite remainder of hero titles and subtitles
* 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>
e.g. This allows you to
`/api/posts?sort=-createdAt&filter[tag]=14` to include tag 14 and `/api/posts?sort=-createdAt&filter[tag]=-14` to exclude tag 14
* 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>
* 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>