Commit Graph

634 Commits

Author SHA1 Message Date
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
renovate[bot]
85f3ef3d14 Update dependency postcss to v8.4.33 2024-01-05 11:05:49 +01:00
Daniel Lockyer
fc02ca8bbb Reverted "Update Vite packages"
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1702454781859679

- this reverts commit cf60db85d8 as we've
  seen issues with the `vite-plugin-css-injected-by-js` dependency
2023-12-13 09:24:29 +01:00
renovate[bot]
cf60db85d8 Update Vite packages 2023-12-12 18:23:37 +01:00
renovate[bot]
943ad48614 Update dependency tailwindcss to v3.3.6 2023-12-04 21:52:04 +01:00
renovate[bot]
a1c292b683 Update dependency @vitejs/plugin-react to v4.2.1 2023-12-04 19:41:11 +01:00
renovate[bot]
3267eb9843 Update dependency vite to v4.5.1 2023-12-04 12:56:21 +01:00
renovate[bot]
6f3d16f75b Update dependency postcss to v8.4.32 2023-12-04 08:37:46 +01:00
renovate[bot]
65d0884363 Update tiptap monorepo to v2.1.13 2023-11-30 18:35:37 +00:00
Simon Backx
b6519e0f1f
Removed usage of unquoted ids in filter strings (#19070)
fixes GRO-34
fixes GRO-33

This is a revision of a previous commit, that broke the browser tests
because changes in the data generator (requiring bookshelf had side
effects).

This adds a new way to run all tests with enforced numeric ObjectIDs.
These numeric ids cause issues if they are used withing NQL filters. So
they surface tiny bugs in our codebase.

You can run tests using this option via:
NUMERIC_IDS=1 yarn test:e2e

Removed some defensive logic that could be explained by this discovered
issue.
2023-11-21 09:45:36 +01:00
Simon Backx
d5492bd63c
Revert "Removed usage of unquoted ids in filter strings" (#19052)
Reverts TryGhost/Ghost#19031

Browser tests are failing with an unknown cause
2023-11-20 13:50:07 +00:00
Simon Backx
320eaac4c4
Removed usage of unquoted ids in filter strings (#19031)
fixes GRO-34
fixes GRO-33

This also adds a new way to run all tests with enforced numeric ObjectIDs.
These numeric ids cause issues if they are used withing NQL filters. So they
surface tiny bugs in our codebase.

You can run tests using this option via:
NUMERIC_IDS=1 yarn test:e2e

Also removed some defensive logic that could be explained by unquoted ids.
2023-11-20 14:00:31 +01:00
renovate[bot]
fa51b1b3dd Update dependency @vitejs/plugin-react to v4.2.0 2023-11-20 09:42:07 +01:00
Rene AHONBO
c404784573
Added missing semicolons (#18670)
Co-authored-by: Daniel Lockyer <daniellockyer@fastmail.com>
2023-11-15 12:19:50 +01:00
Daniel Lockyer
ee804fc7af Hidden "info" Vite output unless in CI
refs https://github.com/TryGhost/DevOps/issues/104

- `info` is very verbose as it prints all files and their sizes
- we often don't care about this, so we can do away with `info` in favor
  of `warn`
2023-11-15 10:11:22 +01:00
Daniel Lockyer
53157f3c40 Disabled reporting compressed gzip size
refs https://vitejs.dev/config/build-options.html#build-reportcompressedsize

- this should make building a little bit quicker because it doesn't have
  to calculate the gzip size (I don't think we're likely to hit this
  because we don't have large projects, but it's still nice to clean up
  the output)
2023-11-15 09:11:12 +01:00
Simon Backx
14927ee24b
Added quotes to NQL filters with ids (#18958)
refs https://github.com/TryGhost/Product/issues/4120

Updated some places where we don't add quotes around ids in NQL filters,
which can be an issue when the id is a number
2023-11-13 12:00:20 +01:00
Daniel Lockyer
7b9ecd6056 Released Comments-UI v0.13.3 2023-11-06 10:54:58 +01:00
Djordje Vlaisavljevic
cce3d12f45 Made expertise and comment body text wrap when necessary
refs https://github.com/TryGhost/Product/issues/4045
2023-11-02 20:02:34 +00:00
renovate[bot]
8d324a6257 Update dependency @vitejs/plugin-react to v4.1.1 2023-11-02 09:51:00 +01:00
Daniel Lockyer
1ad6af6f54 Released Comments-UI v0.13.2 2023-10-26 15:42:15 +02:00
renovate[bot]
bf15f86f13 Update dependency tailwindcss to v3.3.5 2023-10-25 16:35:53 +02:00
renovate[bot]
f6a8100d48 Update dependency tailwindcss to v3.3.4 2023-10-25 07:43:24 +02:00
renovate[bot]
5844e5c9f1 Update dependency vite to v4.5.0 2023-10-24 09:13:06 +02:00
renovate[bot]
f18287eb9b Update dependency concurrently to v8.2.2 2023-10-22 12:25:35 +02:00
Djordje Vlaisavljevic
5ccb0887cb Added shorter label for button on narrow screens
refs https://github.com/TryGhost/Product/issues/4045
2023-10-20 14:51:07 +02:00
renovate[bot]
ee0bb283da Update tiptap monorepo to v2.1.12 2023-10-13 06:08:29 +00:00
renovate[bot]
b2cebdc9b0 Update dependency vite to v4.4.11 2023-10-06 07:55:29 +02:00
renovate[bot]
6ec3a600cc Update dependency vite to v4.4.10 2023-10-04 08:35:18 +02:00
renovate[bot]
de3a222231 Update dependency postcss to v8.4.31 2023-10-02 08:51:53 +02:00
renovate[bot]
d9ec7a0b90 Update dependency @vitejs/plugin-react to v4.1.0 2023-09-27 09:36:39 +02:00
renovate[bot]
1387c64e5a Update dependency @playwright/test to v1.38.1 2023-09-25 09:12:04 +02:00
renovate[bot]
ea521242e1 Update dependency autoprefixer to v10.4.16 2023-09-21 11:50:58 +02:00
renovate[bot]
c055179765 Update dependency vite-plugin-svgr to v3.3.0 2023-09-20 08:41:57 +02:00
renovate[bot]
66f17cc82e Update tiptap monorepo to v2.1.10 2023-09-19 15:15:21 +02:00
renovate[bot]
8cfff3743b Update dependency postcss to v8.4.30 2023-09-19 08:09:20 +02:00
renovate[bot]
ccf508e8f7 Update tiptap monorepo to v2.1.10 2023-09-15 14:12:47 +00:00
Daniel Lockyer
8b0de7e6e4 Temporarily increased timeout for Comments-UI web server init
refs https://github.com/TryGhost/Product/issues/3867

- this helps avoid flaky tests before we investigate further
2023-09-15 10:48:08 +02:00
renovate[bot]
a58c77f20a Update tiptap monorepo to v2.1.9 2023-09-15 08:26:18 +00:00
renovate[bot]
a28e4a4395 Update dependency @playwright/test to v1.38.0 2023-09-15 10:09:33 +02:00
Daniel Lockyer
35c70fcf2a Temporarily increased test timeout for Comments-UI
refs https://github.com/TryGhost/Product/issues/3867

- this temporarily increases the timeout to avoid some flaky CI
  performance until the cause has been fixed
2023-09-12 12:56:14 +02:00
Daniel Lockyer
6dc1d08590 Re-enabled general eslint rules in TS config
refs https://github.com/TryGhost/DevOps/issues/50

- when creating a TS config in our `eslint-plugin-ghost` dependency, I
  only extended the recommended config, which left out a lot of
  stylistic things we used to enforce in JS
- this fixes that by bumping the dependency to a version which extends
  those shared configs, and fixes all the code that currently goes
  against those rules
2023-09-08 13:47:42 +02:00
Simon Backx
d40b8c7d63 Released comments-ui v0.13.1 2023-09-06 17:33:42 +02:00
renovate[bot]
d15aed0d0a Update tiptap monorepo to v2.1.8 2023-09-05 06:40:46 +00:00
Daniel Lockyer
c6cb35074a Updated linting and testing packages 2023-09-01 15:51:17 +02:00
renovate[bot]
d5e273a3ac Update dependency @headlessui/react to v1.7.17 2023-08-31 15:03:57 +00:00
renovate[bot]
d58f5dcc9f Update tiptap monorepo to v2.1.7 2023-08-31 14:33:11 +00:00
renovate[bot]
f977227d18 Update dependency postcss to v8.4.29 2023-08-30 08:29:32 +02:00
renovate[bot]
24300120c2 Update dependency vitest to v0.34.3 2023-08-29 18:52:13 +01:00
renovate[bot]
ad1743816a Update dependency @playwright/test to v1.37.1 2023-08-29 08:38:03 +01:00
Simon Backx
7a7c11c7ec Released comments-ui v0.13.0 2023-08-24 11:05:19 +02:00
Simon Backx
e9703f6a15
Extended translations beta to comments (#17801)
refs https://github.com/TryGhost/Product/issues/3504
2023-08-24 10:33:03 +02:00
Simon Backx
375a6d37c2
Added support for i18n in comments-ui (#17797)
refs https://github.com/TryGhost/Product/issues/3504

- This adds support for translations, but doesn't yet translate every
possible string in the app.
- Only active if beta translations is enabled
2023-08-23 13:57:37 +00:00
renovate[bot]
f9589ff7bd Update dependency vitest to v0.34.2 2023-08-23 11:45:02 +01:00
renovate[bot]
26bdba9d4c Update dependency concurrently to v8.2.1 2023-08-22 17:39:36 +01:00
Simon Backx
f1b51729fc
Converted Comments-UI App to TypeScript and React hooks (#17760)
refs https://github.com/TryGhost/Product/issues/3504

- App component now uses React hooks intead of React class component
- App is now written in TypeScript
- All JavaScript is now removed from the Comments-UI project
- Removed `PopupNotification` because these were never displayed
- Removed `action` from AppContext (never used)
- Moved options parsing out of `index.ts` into a separate utility file,
similar to the signup-form
- Improved reliability of some editor tests by always waiting for the
editor to be focused (was not always the case) + added an utility method
for this
2023-08-18 13:30:59 +00:00
Simon Backx
850cc7a9a1
Moved old comment tests to Playwright (#17750)
refs https://github.com/TryGhost/Product/issues/3504
2023-08-17 12:47:08 +02:00
Simon Backx
c8daf2e514
🐛 Fixed comments admin menu not visible when not logged in as member (#17749)
refs https://github.com/TryGhost/Product/issues/3504

- When you are logged in as an admin, but not as a member, no buttons
showed (discovered in new e2e tests)
- Added E2E tests for admin actions
2023-08-17 09:20:40 +00:00
renovate[bot]
e1d92d642a Update dependency postcss to v8.4.28 2023-08-16 06:08:42 +02:00
renovate[bot]
2e86693eb6 Update dependency autoprefixer to v10.4.15 2023-08-14 07:56:13 +02:00
renovate[bot]
4d6e52b28c Update dependency @playwright/test to v1.37.0 2023-08-11 08:53:10 +02:00
renovate[bot]
0424915a31 Update dependency @vitejs/plugin-react to v4.0.4 2023-08-09 11:43:08 +02:00
renovate[bot]
1353b04c9d Update dependency vite-plugin-css-injected-by-js to v3.3.0 2023-08-09 11:28:50 +02:00
renovate[bot]
98dc4d7b06 Update dependency vite to v4.4.9 2023-08-09 10:09:03 +02:00
renovate[bot]
9f85124a2e Update dependency vitest to v0.34.1 2023-08-09 09:54:48 +02:00
renovate[bot]
ca7d829915 Update dependency vite to v4.4.8 2023-08-09 09:50:54 +02:00
Daniel Lockyer
c97cc08455 Updated ESLint config for React+Typescript packages
refs https://github.com/TryGhost/DevOps/issues/50

- `react-app` comes from `eslint-config-react-app`, which is a CRA package
- we're moving away from that so this commit switches the linting over
  to a more recently updated plugin
- once that was removed, we started using a newer version of
  `@typescript-eslint/eslint-plugin`, so there were plenty of
  updates/exemptions to make
2023-07-27 11:40:31 +02:00
Daniel Lockyer
33e2b39295 Removed old versions of @typescript-eslint/{eslint-plugin,parser}
refs https://github.com/TryGhost/DevOps/issues/50

- this helps prevent old versions of the dependency from lingering
  around (especially when it's unused)
2023-07-25 16:48:54 +02:00
renovate[bot]
3830401d55 Update dependency @playwright/test to v1.36.2 2023-07-25 12:26:15 +02:00
renovate[bot]
5ca8c1f568 Update dependency vite to v4.4.7 2023-07-24 20:56:39 +02:00
Daniel Lockyer
d0f9c8cf0c Deduplicated eslint and eslint-plugin-ghost to top-level package.json
refs https://github.com/TryGhost/DevOps/issues/50

- this deduplicates where we define the version of `eslint` and
  `eslint-plugin-ghost` so it's easier to maintain
2023-07-24 16:21:47 +02:00
renovate[bot]
7fc8fd1696 Update tiptap monorepo to v2.0.4 2023-07-24 10:33:33 +00:00
renovate[bot]
401c1a0d10 Update dependency postcss to v8.4.27 2023-07-21 14:42:30 +02:00
renovate[bot]
7cdc87ed99 Update dependency vite to v4.4.6 2023-07-21 12:31:29 +02:00
renovate[bot]
9a24877e7d Update dependency vite to v4.4.5 2023-07-21 09:23:51 +02:00
Daniel Lockyer
52df88cf63 Updated tiptap monorepo to v2.0.3
- also adds `@tiptap/pm` as this is requires in v2.0.0 and removes the
  resolutions as they are no longer needed
2023-07-19 12:08:52 +02:00
renovate[bot]
b6439457e6 Update dependency vite-plugin-css-injected-by-js to v3.2.1 2023-07-17 21:42:43 +02:00
renovate[bot]
8e4393d16f Update dependency @playwright/test to v1.36.1 2023-07-17 09:48:14 +02:00
renovate[bot]
2f76f07dff Update dependency vite to v4.4.4 2023-07-14 11:04:59 +02:00