承接 maxime-rainville/shared-draft-comment 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

maxime-rainville/shared-draft-comment

Composer 安装命令:

composer require maxime-rainville/shared-draft-comment

包简介

Allow non-users to comment on shared draft.

README 文档

README

This is a Silverstripe CMS module that adds the capability to leave comments on shared draft directly in the front end of your website.

Warning

This is an experimental module. Use at your own risk.

Team

  • JS and PHP development
    • @aria5305
    • @maxime-rainville
  • UX and UI
    • Oscar Urrutia
  • User research and strategy
    • Erin Charter
  • Other contributions
    • Claire Kirby
    • @SimulatedPanda
    • Maira Florez
    • @matthew-dyson
    • Sandra De Villiers
    • @tamatifkaa

What does it do?

The silverstripe/sharedraftcontent allows content authors to create special links to draft content. Content author can then choose to share those draft links with their stakeholders so they can preview the content.

However, any feedback on the draft content then has to be collected in side channels like email message or Google Doc.

This module extends the capability of the shared draft content module so people looking at a preview link can leave comment directly in the front end. Other users looking at the draft can view their comments and leave replies as well.

Comment thread

live-demo-comment.mp4

How does it work?

Backend

4 DataObjects are tracked:

  • Selection which represent a specific sample of text on a specific page.
  • DomMeta which define the start or the end of a selection. Each selection has a startMeta and a endMeta.
  • Comment which represent a comment left on a specific selection. All comments attached to a selection are displayed together as a comment thread.
  • Commenter which represent a person who posted one or more comments. Commenters don't have any credentials and no attempt is made to validate their name. This is done to remove any barrier before posting a comment.

The data can be retrieve and updated via a GraphQL endpoint at /shared-draft-comment/graphql.

Frontend

The front end is divided into three main parts:

  • the inline commenting library
  • the Apollo Silverstripe CMS GraphQL data store
  • the Redux test data store.

All the front end logic is written in TypeScript.

Inline commenting library

The files stored under the src/lib are responsible for:

  • displaying existing existing selections
  • providing an interface to create new selections
  • displaying comments
  • recording new comments.

The inline commenting library is designed to be "store agnostic". Basically it doesn't care where its initial data is coming from and where newly created data goes. When the inline library get initialised, it expects a bunch of handlers it will then called to retrieve or update data.

This part was designed so it could be split off as its own library later on.

web-highlighter is used to control the highlighting of text selection.

The UI is rendered with React.

While commenter data is attached to each comment, the inline commenting library doesn't manage that data or give you the means to update that data. It is the responsibility of the data store to keep track of who the current user is and to make sure that any new comment are attached to that user. This is done to avoid mandating any specific approach to managing the identity of commenters.

Apollo Silverstripe CMS GraphQL data store

The logic to control the exchange of data with the Silverstripe CMS backend via GraphQL is stored in /src/apolloBootstrap.ts and /src/apollo.

This is also responsible for providing an interface to record the commenter's details.

Basically, all the GraphQL queries and mutation are wrapped in handlers that return promises. Those handlers are then uses to bootstrap the inline commenting library.

Redux test data store

A simple test Redux store is included in /src/reduxBootstrap.ts and /src/Store. It basically does the same thing as the apollo store, except the data is read for a redux state and the updates are managed via redux action.

This is only included to help test and update the inline commenting library. All changes are lost when you refresh the page.

Development

npm run build

To run the full Silverstripe CMS JS client, run npm run build. Performance optimisations have been disabled for now.

See the section about deployment for more information.

npm start

If you are just working on the inline commenting library, you can execute just that part with npm start.

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

maxime-rainville/shared-draft-comment 适用场景与选型建议

maxime-rainville/shared-draft-comment 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 248 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 11 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 maxime-rainville/shared-draft-comment 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 maxime-rainville/shared-draft-comment 我们能提供哪些服务?
定制开发 / 二次开发

基于 maxime-rainville/shared-draft-comment 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 248
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2023-11-26