ep_comments_page 11.1.1 → 11.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.
Files changed (2) hide show
  1. package/AGENTS.md +82 -0
  2. package/package.json +1 -1
package/AGENTS.md ADDED
@@ -0,0 +1,82 @@
1
+ # Agent Guide — ep_comments_page
2
+
3
+ Adds comments on sidebar and link it to the text. For no-skin use ep_page_view.
4
+
5
+ ## Tech stack
6
+
7
+ * Etherpad plugin framework (hooks declared in `ep.json`)
8
+ * EJS templates rendered server-side via `eejsBlock_*` hooks
9
+ * html10n for i18n (`locales/<lang>.json`, `data-l10n-id` in templates)
10
+ * `ep_plugin_helpers` for shared boilerplate
11
+
12
+ ## Project structure
13
+
14
+ ```
15
+ ep_comments_page/
16
+ ├── AGENTS.md
17
+ ├── CONTRIBUTING.md
18
+ ├── apiUtils.js
19
+ ├── commentManager.js
20
+ ├── ep.json
21
+ ├── exportHTML.js
22
+ ├── index.js
23
+ ├── locales/
24
+ │ ├── ar.json
25
+ │ ├── be-tarask.json
26
+ │ ├── bn.json
27
+ │ ├── cs.json
28
+ │ ├── da.json
29
+ │ ├── de.json
30
+ │ └── ...
31
+ ├── package.json
32
+ ├── static/
33
+ │ ├── css/
34
+ │ ├── js/
35
+ │ ├── tests/
36
+ ├── templates/
37
+ │ ├── commentBarButtons.ejs
38
+ │ ├── commentIcons.html
39
+ │ ├── comments.html
40
+ │ ├── layout.ejs
41
+ │ ├── menuButtons.ejs
42
+ │ ├── styles.html
43
+ ```
44
+
45
+ ## Helpers used
46
+
47
+ * `pad-toggle` from `ep_plugin_helpers`
48
+ * `pad-toggle-server` from `ep_plugin_helpers`
49
+
50
+
51
+ ## Helpers NOT used
52
+
53
+ _To be audited in the helpers-adoption sweep (Phase 4)._
54
+
55
+
56
+ ## Running tests locally
57
+
58
+ `ep_comments_page` runs inside Etherpad's test harness. From an etherpad checkout that has installed this plugin via `pnpm run plugins i --path ../ep_comments_page`:
59
+
60
+ ```bash
61
+ # Backend (Mocha) — harness boots its own server
62
+ pnpm --filter ep_etherpad-lite run test
63
+
64
+ # Playwright — needs `pnpm run dev` in a second terminal
65
+ pnpm --filter ep_etherpad-lite run test-ui
66
+ ```
67
+
68
+ ## Standing rules for agent edits
69
+
70
+ * PRs target `main`. Linear commits, no merge commits.
71
+ * Every bug fix includes a regression test in the same commit.
72
+ * All user-facing strings in `locales/`. No hardcoded English in templates.
73
+ * No hardcoded `aria-label` on icon-only controls — etherpad's html10n auto-populates `aria-label` from the localized string when (a) the element has a `data-l10n-id` and (b) no author-supplied `aria-label` is present. Adding a hardcoded English `aria-label` blocks that and leaves it untranslated. (See `etherpad-lite/src/static/js/vendors/html10n.ts:665-678`.)
74
+ * No nested interactive elements (no `<button>` inside `<a>`).
75
+ * LLM/Agent contributions are explicitly welcomed by maintainers.
76
+
77
+ ## Quick reference: hooks declared in `ep.json`
78
+
79
+ * Server: `padInitToolbar`, `padRemove`, `padCopy`, `socketio`, `expressCreateServer`, `collectContentPre`, `eejsBlock_editbarMenuLeft`, `eejsBlock_scripts`, `eejsBlock_mySettings`, `eejsBlock_padSettings`, `eejsBlock_styles`, `loadSettings`, `clientVars`, `exportHtmlAdditionalTagsWithData`, `getLineHTMLForExport`, `exportEtherpadAdditionalContent`, `exportHTMLAdditionalContent`, `handleMessageSecurity`
80
+ * Client: `postToolbarInit`, `postAceInit`, `collectContentPre`, `aceAttribsToClasses`, `aceEditorCSS`, `aceEditEvent`, `aceInitialized`, `handleClientMessage_CLIENT_MESSAGE`
81
+
82
+ When adding a hook, register it in both `ep.json` *and* the matching `exports.<hook> = ...` in the JS file.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "Adds comments on sidebar and link it to the text. For no-skin use ep_page_view.",
3
3
  "name": "ep_comments_page",
4
- "version": "11.1.1",
4
+ "version": "11.1.2",
5
5
  "author": {
6
6
  "name": "Nicolas Lescop",
7
7
  "email": "limplementeur@gmail.com"