0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/apps/comments-ui
Ronald Langeveld 8db228fa6e
Updated Comments likes UI changes to be instant (#21861)
ref PLG-288

- Implemented instant UI updates for comment likes/unlikes using
optimistic rendering.
- Enhanced error handling reverts state on API failure, ensuring
consistency.
- Added new test helper to mock failed API requests, needed to test
revert state handling.
2025-01-14 15:20:47 +09:00
..
src Updated Comments likes UI changes to be instant (#21861) 2025-01-14 15:20:47 +09:00
test Updated Comments likes UI changes to be instant (#21861) 2025-01-14 15:20:47 +09:00
.env
.eslintrc.js
.yarnrc
LICENSE 2025 2025-01-06 11:40:59 +00:00
package.json Shipped comments-ui@1.0.5 2024-12-12 21:08:41 +00:00
playwright.config.ts Refactored comments-ui form management (#21621) 2024-11-14 18:26:23 +00:00
postcss.config.cjs
README.md 2025 2025-01-06 11:40:59 +00:00
tailwind.config.js Added highlight animation when scrolling to replied-to comment (#21781) 2024-12-05 17:46:16 +00:00
tsconfig.json
tsconfig.node.json
vite.config.ts Added Dev Container setup (#21279) 2024-10-24 11:15:08 -07:00

Comments UI

Comments widget that is embedded at the bottom of posts in Ghost.

Development

Pre-requisites

  • Run yarn in Ghost monorepo root

Running via Ghost yarn dev in root folder

You can automatically start the comments dev server when developing Ghost by running Ghost (in root folder) via yarn dev --all or yarn dev --comments. This will host the comments JavaScript files, and makes sure that Ghost uses these locally hosted assets instead of the ones from the CDN.

Release

A patch release can be rolled out instantly in production, whereas a minor/major release requires the Ghost monorepo to be updated and released. In either case, you need sufficient permissions to release @tryghost packages on NPM.

Patch release

  1. Run yarn ship and select a patch version when prompted
  2. (Optional) Clear JsDelivr cache to get the new version out instantly (docs). Typically, you'll need to open https://purge.jsdelivr.net/ghost/comments-ui@~${COMMENTS_UI_VERSION}/umd/comments-ui.min.js and https://purge.jsdelivr.net/ghost/comments-ui@~${COMMENTS_UI_VERSION}/umd/main.css in your browser, where COMMENTS_UI_VERSION is the latest minor version in ghost/core/core/shared/config/defaults.json (code)

Minor / major release

  1. Run yarn ship and select a minor or major version when prompted
  2. Update the Comments UI version in ghost/core/core/shared/config/defaults.json to the new minor or major version (code)
  3. Wait until a new version of Ghost is released

Copyright & License

Copyright (c) 2013-2025 Ghost Foundation - Released under the MIT license.