twenty-app-record-comments 0.0.0-stage → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -2
- package/dependencies/yarn.lock +2028 -0
- package/manifest.json +820 -0
- package/package.json +50 -4
- package/public/logo.svg +6 -0
- package/src/front-components/record-comments.mjs +181 -0
- package/src/front-components/record-comments.mjs.map +7 -0
- package/src/front-components/record-comments.tsx +631 -0
package/README.md
CHANGED
|
@@ -1,3 +1,61 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Record Comments for Twenty
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A comment feed for [Twenty CRM](https://twenty.com) records. It adds a **Comments** tab to Company, Person and Opportunity pages where teammates can leave comments and attach images.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Comments tab** on Company, Person and Opportunity record pages, in the full page and in the side panel.
|
|
8
|
+
- **Real authors.** Each comment is posted under the workspace member who writes it, with their avatar and time. Authors can delete their own comments.
|
|
9
|
+
- **Image attachments.** Attach one or more images (up to 10 per comment, 10 MB each). They are stored as regular attachments of the record, so they also appear in its **Files** tab.
|
|
10
|
+
- **Thumbnails and preview.** Images show as thumbnails. Click one to expand it inside the feed; close it with the X button, a click on the image or Escape. **Original** opens the full-size file in a new tab.
|
|
11
|
+
- **Live feed.** New comments from teammates appear within 15 seconds. `Ctrl+Enter` sends.
|
|
12
|
+
- **All 33 Twenty languages.** The tab, object and field names and the whole comment UI follow each user's language in Twenty.
|
|
13
|
+
|
|
14
|
+
## How it works
|
|
15
|
+
|
|
16
|
+
The app adds one object, `recordComment`, with a `text` field and relations to `company`, `person` and `opportunity`. Deleting a record deletes its comments.
|
|
17
|
+
|
|
18
|
+
An image is a standard `attachment` linked both to the record and to its comment (`attachment.recordComment`). Deleting a comment keeps the file in the record's Files tab.
|
|
19
|
+
|
|
20
|
+
The app role requests the `UPLOAD_FILE` and `DOWNLOAD_FILE` permissions to handle images.
|
|
21
|
+
|
|
22
|
+
## Translations
|
|
23
|
+
|
|
24
|
+
Every string lives in [`translations/translations.mjs`](translations/translations.mjs). After editing it, run:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
twenty app translations extract # only if entity labels changed
|
|
28
|
+
yarn translations # writes locales/*.json and src/utils/strings.generated.ts
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The script refuses to write anything if a language misses a key or a placeholder. Translations other than English and Russian were written without a native-speaker review; corrections are welcome as pull requests.
|
|
32
|
+
|
|
33
|
+
## Requirements
|
|
34
|
+
|
|
35
|
+
- Twenty server 2.58.0 or later.
|
|
36
|
+
|
|
37
|
+
## Limitations
|
|
38
|
+
|
|
39
|
+
- Pasting images with `Ctrl+V` is not supported: front components only receive text from the clipboard. Use **Attach image**.
|
|
40
|
+
- Comments are available on Company, Person and Opportunity. Supporting another object takes one entry in `COMMENT_TARGETS` in `src/constants/universal-identifiers.ts`.
|
|
41
|
+
|
|
42
|
+
## Development
|
|
43
|
+
|
|
44
|
+
Setup instructions live in [SETUP.md](SETUP.md).
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
yarn install
|
|
48
|
+
twenty auth login --url https://your-twenty-server.com --name dev
|
|
49
|
+
twenty app apply --create --remote dev
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Publishing
|
|
53
|
+
|
|
54
|
+
The `Publish` workflow (`.github/workflows/publish.yml`) publishes the app to npm with provenance using [npm trusted publishing](https://docs.npmjs.com/trusted-publishers). To release:
|
|
55
|
+
|
|
56
|
+
1. Bump `version` in `package.json` and add an entry to [CHANGELOG.md](CHANGELOG.md).
|
|
57
|
+
2. Push a version tag: `git tag v0.1.0 && git push --tags`.
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
[MIT](LICENSE)
|