Ghost/apps/comments-ui
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
..
src Added lazy-loading of admin auth in Comments UI (#19799) 2024-03-05 15:57:20 +00:00
test Added lazy-loading of admin auth in Comments UI (#19799) 2024-03-05 15:57:20 +00:00
.env Added custom build setup 2022-07-04 15:15:01 +02:00
.eslintrc.js Extended translations beta to comments (#17801) 2023-08-24 10:33:03 +02:00
.yarnrc Prevented git tags from being created for apps 2023-07-10 13:09:28 +02:00
LICENSE Migrated from Webpack to Vite and updated dependencies 2023-06-21 15:28:01 +02:00
package.json Released Comments-UI 0.15.0 (#19775) 2024-02-28 18:59:01 +00:00
playwright.config.ts Temporarily increased timeout for Comments-UI web server init 2023-09-15 10:48:08 +02:00
postcss.config.cjs Migrated Comments-UI to TypeScript (#17129) 2023-06-27 14:51:37 +02:00
README.md Configured yarn dev to allow starting Comments-UI 2023-06-22 10:23:05 +02:00
tailwind.config.js Removed the duplicate sm config 2022-11-11 15:25:57 +00:00
tsconfig.json Converted Comments-UI App to TypeScript and React hooks (#17760) 2023-08-18 13:30:59 +00:00
tsconfig.node.json Migrated Comments-UI to TypeScript (#17129) 2023-06-27 14:51:37 +02:00
vite.config.ts Hidden "info" Vite output unless in CI 2023-11-15 10:11:22 +01: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.

Copyright & License

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