mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
4e806f7de4
REF https://linear.app/ghost/issue/PLG-274/ - Currently, replies are hidden when the parent comment is being edited. This PR ensures that replies remain visible when the parent comment is being edited. - To achieve this, the `CommentComponent` now checks if the parent comment is being edited. If so, the comment content is swapped by the EditForm, while the comment's avatar, header, menu, and replies remain visible. - The Form component now only renders the FormEditor. A FormWrapper component is used to wrap the avatar and comment header. - This Form component is used in the EditForm without the FormWrapper, as it is already wrapped in the CommentComponent. - The ReplyForm and the MainForm use the FormWrapper. - The Avatar component now also accepts a `member` prop, which is used to display the avatar image. This is because it's no longer used inside the Form component. |
||
---|---|---|
.. | ||
src | ||
test | ||
.env | ||
.eslintrc.js | ||
.yarnrc | ||
LICENSE | ||
package.json | ||
playwright.config.ts | ||
postcss.config.cjs | ||
README.md | ||
tailwind.config.js | ||
tsconfig.json | ||
tsconfig.node.json | ||
vite.config.ts |
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
- Run
yarn ship
and select a patch version when prompted - (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
andhttps://purge.jsdelivr.net/ghost/comments-ui@~${COMMENTS_UI_VERSION}/umd/main.css
in your browser, whereCOMMENTS_UI_VERSION
is the latest minor version inghost/core/core/shared/config/defaults.json
(code)
Minor / major release
- Run
yarn ship
and select a minor or major version when prompted - Update the Comments UI version in
ghost/core/core/shared/config/defaults.json
to the new minor or major version (code) - Wait until a new version of Ghost is released
Copyright & License
Copyright (c) 2013-2024 Ghost Foundation - Released under the MIT license.