Commit Graph

612 Commits

Author SHA1 Message Date
renovate[bot]
f561f362f4 Update dependency postcss to v8.4.39 2024-07-01 07:28:24 +02:00
Peter Zimon
cd8a54d7cc
Updated borders in comments CTA box (#20274)
DES-189

Our use of borders makes it very difficult to style a theme that looks
good with all states. Theme developers need a border to separate
comments from the content, but the current comments output includes
borders. It's possible to make it look ok in most of the time, but it's
difficult to work with. This change updates borders from the comments
CTA box with the following rules:

- Logged out without comments: no borders
- Logged out with comments: top border only
- Logged in without comments: no borders
- Logged in with comments: no borders
2024-06-18 13:43:53 +02:00
Ronald Langeveld
e615c36f83
Published new version of Comments-UI (#20380)
no issue

- Bumped from 0.17.0 to 0.17.1
2024-06-13 09:25:31 +07:00
Ronald Langeveld
e1e31c530a
Moved pagination button back to top in comments (#20379)
no issue

- moving the pagination button back to the top since it's not needed
now.
- Will move it to bottom in future along with additional comments enhancements.
2024-06-13 09:10:30 +07:00
Ronald Langeveld
a33ae00dee
Bumped Comments UI to 0.17 minor (#20373)
ref MOM-211
2024-06-12 11:33:16 +00:00
Ronald Langeveld
bea074b23d
Updated default comments from 5 to 20 (#20359)
ref MOM-135 MOM-211 MOM-213

- Bumped up the default comments count from 5 to 20 comments before
pagination kicks in.
- Moved the pagination (`Show X previous comments)` to bottom of the
page (soon to be reworded to `Show x more comments`)
- Updated tests and added a new helper for adding multiple comments easier.
2024-06-11 18:39:59 +07:00
renovate[bot]
496f4fde86 Update dependency tailwindcss to v3.4.4 2024-06-10 15:18:16 +02:00
Michael Barrett
58dcbe9096
Published comments-ui v0.16.2 (#20345)
no refs

Published comments-ui v0.16.2 to include recently added translations
2024-06-06 21:38:29 +01:00
renovate[bot]
3e3bcb81fd Update dependency jsdom to v24 2024-05-27 09:07:18 +02:00
renovate[bot]
0beba6b605 Update tiptap monorepo to v2.4.0 2024-05-14 13:29:36 +00:00
renovate[bot]
9bf5a61d99 Update tiptap monorepo to v2.3.2 2024-05-08 16:16:50 +00:00
renovate[bot]
eccb48e91b Update tiptap monorepo to v2.3.1 2024-04-30 19:13:27 +00:00
renovate[bot]
197d510c9c Update dependency tailwindcss to v3.4.3 2024-04-23 11:27:43 +02:00
renovate[bot]
2af9c04477 Update CSS preprocessors 2024-04-16 09:44:36 +02:00
renovate[bot]
3f960818eb Update dependency vite to v4.5.3 [SECURITY] 2024-04-16 09:21:49 +02:00
renovate[bot]
3e4fc467c1 Update dependency @headlessui/react to v1.7.19 2024-04-15 17:47:58 +00:00
renovate[bot]
e0b8f612af Update tiptap monorepo to v2.3.0 2024-04-09 12:33:17 +00:00
Kevin Ansfield
85b8b61631
Removed admin-auth error logs for unknown message events (#20000)
closes https://linear.app/tryghost/issue/ENG-780

- the `admin-auth` frame was set up to log when any `message` event was handled but couldn't be parsed as JSON. For our own events that's fine but `message` events are also frequently triggered by browser extensions meaning the DevTools console log could become quite noisy for no reason
- removed the logging as it's noisy and not useful outside of development
2024-04-08 16:50:49 +00:00
renovate[bot]
58e5aa5b53 Update tiptap monorepo to v2.2.6 2024-04-08 00:39:32 +00:00
renovate[bot]
bcf0fcb7d2 Update dependency tailwindcss to v3.4.2 2024-03-28 10:13:19 +01:00
Kevin Ansfield
9203eea673
Released comments-ui 0.16.1 (#19847)
no issue

- includes fix for IFrame modal throwing errors and making comments block disappear when performing certain actions
2024-03-12 18:04:20 +00:00
Kevin Ansfield
dd3bc06761
🐛 Fixed comments block disappearing when performing certain actions (#19846)
closes https://linear.app/tryghost/issue/ENG-739

- `props.innerRef` in `<IFrame>` was inadvertently assumed to always exist, sometimes throwing an error on render when certain popups like the profile settings modal were opened resulting in the app crashing and the whole comments block disappearing
- added a guard to ensure the ref exists before trying to set it
- updated tests so the profile modal route is tested
2024-03-12 17:39:36 +00:00
Kevin Ansfield
ef143978e7
🎨 Reduced requests and 403 responses for comments auth check (#19840)
closes https://linear.app/tryghost/issue/ENG-721
ref https://linear.app/tryghost/issue/ENG-708

Comments-UI loads `/ghost/admin-frame/` in an iframe to check if a Staff User is authenticated in order to  show moderation options. That iframe request loads a HTML page which in turn contains a script that fires off an API request that attempts to fetch the logged-in user details, resulting in a 403 "error" showing up when not authenticated. In the vast majority of cases there will be no staff user authenticated so lots of extra requests and "errors" are seen unnecessarily.

- adjusted the `/ghost/auth-frame/` endpoint to check if the request contains an Admin session cookie
  - if it does, continue as before with rendering the HTML page so the script is loaded
  - if it doesn't, return an empty 204 response avoiding the script request and subsequent 403-generating API request
- eliminates the 403 error being generated for all typical visitor traffic, the error should only be seen when an Admin was previously logged in but their cookie is no longer valid (either from logging out, or going past the 6month validity period)
2024-03-12 12:27:18 +00:00
Kevin Ansfield
857588ed60
Released comments-ui 0.16.0 (#19800)
no issue

- defers loading of `admin-auth` frame and it's API request until we are displaying some comments
  - defers the frame load and API request until the comments box is scrolled into view
  - eliminates the requests altogether for posts that have no comments
2024-03-05 16:20:19 +00:00
Kevin Ansfield
92a8a53a95
Added lazy-loading of admin auth in Comments UI (#19799)
closes ENG-711

When an Admin is authenticated in Comments-UI we only add moderation options to the displayed comments so we don't need to pre-emptively load the `admin-auth` iframe and make the `/ghost/api/admin/users/me/` request until some comments are actually visible.

- used `state.comments.length` property to defer rendering of the admin auth frame until comments have been fetched (after box is scrolled into view) and the count is > 0
2024-03-05 15:57:20 +00:00
Kevin Ansfield
c365972aa8
Released Comments-UI 0.15.0 (#19775)
no issue

- switches post browse requests to`/members/api/comments/post/:post_id/` to enable better cache bucketing
and invalidation
- removes `order` param from browse and replies requests
2024-02-28 18:59:01 +00:00
Kevin Ansfield
44e602b447
Switched to default ordering for comments API requests (#19774)
closes ENG-681

There's no need to provide an `order` param with every request in Comments-UI if the API has default ordering that matches our requirements. The order param makes logs more noisy/harder to read than they need to be so we want to get rid of it.

- modified comments API input serializer to add a default order param to the browse and replies endpoints when none is provided
- removed order param from the requests that Comments-UI makes
2024-02-28 18:42:02 +00:00
Fabien O'Carroll
a291914fc4 Updated Comments UI to use new endpoint
refs https://linear.app/tryghost/issue/ENG-676/

Now we have the case that there is no filter param, the simple string
approach fails. Instead we build up a URLSearchParams object which
makes it easier to handle conditional params & stringify it at the end.
2024-02-28 22:40:56 +07:00
Kevin Ansfield
b91bf74236
Released comments-ui 0.14.1 (#19770)
part of ENG-678

- comments are now lazy-loaded when the comments block is scrolled into view
2024-02-28 13:12:55 +00:00
Kevin Ansfield
5b6d8fb7a8
Added lazy-loading to comments (#19769)
closes ENG-678

The comments block is typically shown at the bottom of a post so it doesn't make sense to eagerly fetch comments from the API when we don't know if the comments block will even be viewed. By lazy-loading the data only when the comments block comes into view we can reduce both data usage for visitors and load on the site.

- uses IntersectionObserver API to delay comments app initialisation until the comments block has scrolled into view
- updated all iframe-related components to forward a `ref` so we can use the `<iframe>` element reference inside the `App` component
2024-02-28 12:52:24 +00:00
Fabien O'Carroll
6a4d36878e Removed timestamp from initial load of comments
refs https://linear.app/tryghost/issue/ENG-673

This means that the initial load of comments can be cached for everyone.

We also improve the timestamp which is used when fetching future comments,
instead of using a locally generated timestamp, we use the created_at of
the first comment loaded, this drastically improved the likelyhood that the
timestamp will be the same, meaning that it will hit the cache.
2024-02-28 07:38:22 +07:00
Fabien O'Carroll
359c1049c6 Fixed comments MockedApi and tests
The Comments API should be serving comments in reverse chronological order
2024-02-28 07:38:22 +07:00
Kevin Ansfield
ef38316976
Added rounding to Comments-UI API fetch timestamp (#19750)
no issue

- allows for comments to be cached for 10s to greatly reduce the load hitting Ghost
2024-02-23 19:53:27 +00:00
renovate[bot]
6294ccc370 Update tiptap monorepo to v2.2.4 2024-02-23 12:56:29 +00:00
renovate[bot]
261cc3d022 Update tiptap monorepo to v2.2.3 2024-02-15 18:21:19 +00:00
Ryan Feigenbaum
69eb78b740
Released comments-ui 0.13.5 (#19703)
No issue
2024-02-15 13:19:45 -05:00
renovate[bot]
8d357bd551
Update dependency tailwindcss to v3.4.1 (#19395)
no ref

- includes run of `eslint --fix` to update changed classname ordering in Tailwind

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2024-02-13 14:28:02 +00:00
renovate[bot]
d424e1ada1 Update tiptap monorepo to v2.2.2 2024-02-07 13:43:15 +00:00
Daniel Lockyer
e0fec5b952 Released @tryghost/comments-ui v0.13.4 2024-01-31 15:38:17 +01:00
renovate[bot]
3ed6fab216 Update tiptap monorepo to v2.2.1 2024-01-31 10:03:38 +00:00
renovate[bot]
e77b53f6cf Update tiptap monorepo to v2.2.0 2024-01-29 13:07:18 +00:00
Ronald Langeveld
0c95111f8e
🎨 Admin X - Offers (#19520)
no issue

- Offers rebuilt in React and now located in Settings.
2024-01-25 12:41:54 +00:00
renovate[bot]
3575102462 Update dependency vite to v4.5.2 [SECURITY] 2024-01-22 09:25:09 +01:00
Daniel Lockyer
57c5f92770 Reverted "🎨 Added Offers to the new Settings (#19493)"
This reverts commit c7d7b883cc.
2024-01-18 15:04:59 +01:00
Ronald Langeveld
c7d7b883cc
🎨 Added Offers to the new Settings (#19493)
no issue

- Removes flags for the new Offers in Admin X (Settings)
- Removes old Offers from the sidebar.
- See a new version of Offers in Settings. 🎨
2024-01-18 12:56:08 +00:00
renovate[bot]
0108b9578d Update dependency autoprefixer to v10.4.17 2024-01-18 08:34:25 +01:00
renovate[bot]
42158c0792 Update tiptap monorepo to v2.1.16 2024-01-11 14:07:12 +00:00
renovate[bot]
ad37aaa53c Update tiptap monorepo to v2.1.15 2024-01-08 21:57:34 +00:00
renovate[bot]
4cc7070fae Update dependency @headlessui/react to v1.7.18 2024-01-08 16:13:31 +00:00
renovate[bot]
52051132b0 Update tiptap monorepo to v2.1.14 2024-01-08 12:46:44 +00:00