ep_template_content 0.0.54 → 0.0.55

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/CONTRIBUTING.md +67 -126
  2. package/package.json +1 -1
package/CONTRIBUTING.md CHANGED
@@ -1,133 +1,74 @@
1
- # Contributor Guidelines
2
- (Please talk to people on the mailing list before you change this page, see our section on [how to get in touch](https://github.com/ether/etherpad-lite#get-in-touch))
3
-
4
- ## Pull requests
5
-
6
- * the commit series in the PR should be _linear_ (it **should not contain merge commits**). This is necessary because we want to be able to [bisect](https://en.wikipedia.org/wiki/Bisection_(software_engineering)) bugs easily. Rewrite history/perform a rebase if necessary
7
- * PRs should be issued against the **develop** branch: we never pull directly into **master**
8
- * PRs **should not have conflicts** with develop. If there are, please resolve them rebasing and force-pushing
9
- * when preparing your PR, please make sure that you have included the relevant **changes to the documentation** (preferably with usage examples)
10
- * contain meaningful and detailed **commit messages** in the form:
11
- ```
12
- submodule: description
13
-
14
- longer description of the change you have made, eventually mentioning the
15
- number of the issue that is being fixed, in the form: Fixes #someIssueNumber
16
- ```
17
- * if the PR is a **bug fix**:
18
- * the first commit in the series must be a test that shows the failure
19
- * subsequent commits will fix the bug and make the test pass
20
- * the final commit message should include the text `Fixes: #xxx` to link it to its bug report
21
- * think about stability: code has to be backwards compatible as much as possible. Always **assume your code will be run with an older version of the DB/config file**
22
- * if you want to remove a feature, **deprecate it instead**:
23
- * write an issue with your deprecation plan
24
- * output a `WARN` in the log informing that the feature is going to be removed
25
- * remove the feature in the next version
26
- * if you want to add a new feature, put it under a **feature flag**:
27
- * once the new feature has reached a minimal level of stability, do a PR for it, so it can be integrated early
28
- * expose a mechanism for enabling/disabling the feature
29
- * the new feature should be **disabled** by default. With the feature disabled, the code path should be exactly the same as before your contribution. This is a __necessary condition__ for early integration
30
- * think of the PR not as something that __you wrote__, but as something that __someone else is going to read__. The commit series in the PR should tell a novice developer the story of your thoughts when developing it
31
-
32
- ## How to write a bug report
33
-
34
- * Please be polite, we all are humans and problems can occur.
35
- * Please add as much information as possible, for example
36
- * client os(s) and version(s)
37
- * browser(s) and version(s), is the problem reproducible on different clients
38
- * special environments like firewalls or antivirus
39
- * host os and version
40
- * npm and nodejs version
41
- * Logfiles if available
42
- * steps to reproduce
43
- * what you expected to happen
44
- * what actually happened
45
- * Please format logfiles and code examples with markdown see github Markdown help below the issue textarea for more information.
46
-
47
- If you send logfiles, please set the loglevel switch DEBUG in your settings.json file:
1
+ # Contributing to ep_template_content
48
2
 
3
+ Thanks for helping improve `ep_template_content` — a plugin for [Etherpad](https://etherpad.org/). LLM/Agent contributions are explicitly welcome, provided they follow the rules below.
4
+
5
+ For shared rules that apply to all Etherpad code (linear commits, deprecation policy, feature flags, stability guarantees), please read [ether/etherpad's CONTRIBUTING.md](https://github.com/ether/etherpad/blob/develop/CONTRIBUTING.md). This document only covers what's specific to plugin work.
6
+
7
+ ## Plugin-specific rules
8
+
9
+ * **Target branch:** PRs go to `main` on this repo. Plugin repos do not use git-flow's `develop` branch.
10
+ * **Linear commits, no merge commits.** Rebase if needed.
11
+ * **Every bug fix must include a regression test in the same commit.**
12
+ * **Internationalization (i18n):** every user-facing string lives in `locales/<lang>.json` and is referenced via `data-l10n-id` in templates or `html10n.get(key)` in code. No hardcoded English in markup.
13
+ * **Accessibility (a11y):** no nested interactive elements (no `<button>` inside `<a>`); every interactive control has an accessible name; keyboard focus order matches visual order. Note that on icon-only controls you should rely on Etherpad's html10n to populate `aria-label` from the `data-l10n-id` translation — adding a hardcoded English `aria-label` blocks that and leaves the control untranslated.
14
+
15
+ ## Local development
16
+
17
+ `ep_template_content` is a plugin, so you develop it inside a checkout of [ether/etherpad](https://github.com/ether/etherpad).
18
+
19
+ ```bash
20
+ # Once: clone etherpad alongside this repo
21
+ git clone https://github.com/ether/etherpad.git
22
+ cd etherpad
23
+ pnpm install
24
+
25
+ # Install ep_template_content from your local clone
26
+ pnpm run plugins i --path ../ep_template_content
27
+
28
+ # Start the dev server (port 9001)
29
+ pnpm --filter ep_etherpad-lite run dev
49
30
  ```
50
- /* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
51
- "loglevel": "DEBUG",
31
+
32
+ Edits in `../ep_template_content/` are picked up after a server restart.
33
+
34
+ ## Tests
35
+
36
+ Tests live inside this repo and are executed by Etherpad's test harness:
37
+
38
+ * Backend (Mocha): `static/tests/backend/specs/`
39
+ * Playwright (frontend E2E): `static/tests/frontend-new/specs/`
40
+
41
+ Run them from the etherpad checkout:
42
+
43
+ ```bash
44
+ # Backend (no separate server needed, harness boots one)
45
+ pnpm --filter ep_etherpad-lite run test
46
+
47
+ # Playwright (requires `pnpm run dev` in another terminal)
48
+ pnpm --filter ep_etherpad-lite run test-ui
52
49
  ```
53
50
 
54
- The logfile location is defined in startup script or the log is directly shown in the commandline after you have started etherpad.
55
-
56
- ## General goals of Etherpad
57
- To make sure everybody is going in the same direction:
58
- * easy to install for admins and easy to use for people
59
- * easy to integrate into other apps, but also usable as standalone
60
- * lightweight and scalable
61
- * extensible, as much functionality should be extendable with plugins so changes don't have to be done in core.
62
- Also, keep it maintainable. We don't wanna end up as the monster Etherpad was!
63
-
64
- ## How to work with git?
65
- * Don't work in your master branch.
66
- * Make a new branch for every feature you're working on. (This ensures that you can work you can do lots of small, independent pull requests instead of one big one with complete different features)
67
- * Don't use the online edit function of github (this only creates ugly and not working commits!)
68
- * Try to make clean commits that are easy readable (including descriptive commit messages!)
69
- * Test before you push. Sounds easy, it isn't!
70
- * Don't check in stuff that gets generated during build or runtime
71
- * Make small pull requests that are easy to review but make sure they do add value by themselves / individually
51
+ Lint locally before pushing:
52
+
53
+ ```bash
54
+ pnpm run lint
55
+ ```
72
56
 
73
57
  ## Coding style
74
- * Do write comments. (You don't have to comment every line, but if you come up with something that's a bit complex/weird, just leave a comment. Bear in mind that you will probably leave the project at some point and that other people will read your code. Undocumented huge amounts of code are worthless!)
75
- * Never ever use tabs
76
- * Indentation: JS/CSS: 2 spaces; HTML: 4 spaces
77
- * Don't overengineer. Don't try to solve any possible problem in one step, but try to solve problems as easy as possible and improve the solution over time!
78
- * Do generalize sooner or later! (if an old solution, quickly hacked together, poses more problems than it solves today, refactor it!)
79
- * Keep it compatible. Do not introduce changes to the public API, db schema or configurations too lightly. Don't make incompatible changes without good reasons!
80
- * If you do make changes, document them! (see below)
81
- * Use protocol independent urls "//"
82
-
83
- ## Branching model / git workflow
84
- see git flow http://nvie.com/posts/a-successful-git-branching-model/
85
-
86
- ### `master` branch
87
- * the stable
88
- * This is the branch everyone should use for production stuff
89
-
90
- ### `develop`branch
91
- * everything that is READY to go into master at some point in time
92
- * This stuff is tested and ready to go out
93
-
94
- ### release branches
95
- * stuff that should go into master very soon
96
- * only bugfixes go into these (see http://nvie.com/posts/a-successful-git-branching-model/ for why)
97
- * we should not be blocking new features to develop, just because we feel that we should be releasing it to master soon. This is the situation that release branches solve/handle.
98
-
99
- ### hotfix branches
100
- * fixes for bugs in master
101
-
102
- ### feature branches (in your own repos)
103
- * these are the branches where you develop your features in
104
- * If it's ready to go out, it will be merged into develop
105
-
106
- Over the time we pull features from feature branches into the develop branch. Every month we pull from develop into master. Bugs in master get fixed in hotfix branches. These branches will get merged into master AND develop. There should never be commits in master that aren't in develop
107
-
108
- ## Documentation
109
- The docs are in the `doc/` folder in the git repository, so people can easily find the suitable docs for the current git revision.
110
-
111
- Documentation should be kept up-to-date. This means, whenever you add a new API method, add a new hook or change the database model, pack the relevant changes to the docs in the same pull request.
112
-
113
- You can build the docs e.g. produce html, using `make docs`. At some point in the future we will provide an online documentation. The current documentation in the github wiki should always reflect the state of `master` (!), since there are no docs in master, yet.
114
-
115
- ## Testing
116
- Front-end tests are found in the `tests/frontend/` folder in the repository. Run them by pointing your browser to `<yourdomainhere>/tests/frontend`.
117
-
118
- Back-end tests can be run from the `src` directory, via `npm test`.
119
-
120
- ## Things you can help with
121
- Etherpad is much more than software. So if you aren't a developer then worry not, there is still a LOT you can do! A big part of what we do is community engagement. You can help in the following ways
122
- * Triage bugs (applying labels) and confirming their existence
123
- * Testing fixes (simply applying them and seeing if it fixes your issue or not) - Some git experience required
124
- * Notifying large site admins of new releases
125
- * Writing Changelogs for releases
126
- * Creating Windows packages
127
- * Creating releases
128
- * Bumping dependencies periodically and checking they don't break anything
129
- * Write proposals for grants
130
- * Co-Author and Publish CVEs
131
- * Work with SFC to maintain legal side of project
132
- * Maintain TODO page - https://github.com/ether/etherpad-lite/wiki/TODO#IMPORTANT_TODOS
133
58
 
59
+ * JS/CSS/HTML: 2 spaces, no tabs.
60
+ * `pnpm run lint` must pass (configured via `eslint-config-etherpad`).
61
+ * Avoid breaking changes to public hooks, the line-attribute storage shape, or HTML export output. The backend export spec enforces a stable shape.
62
+
63
+ ## Bug reports
64
+
65
+ Please include:
66
+
67
+ * Etherpad version, ep_template_content version, browser + OS
68
+ * Steps to reproduce
69
+ * What you expected, what actually happened
70
+ * Server log excerpt (set `"loglevel": "DEBUG"` in `settings.json` for verbose output)
71
+
72
+ ## AI agents
73
+
74
+ If you are an LLM/agent contributor, also read [`AGENTS.md`](AGENTS.md) — it documents the file layout, helper usage, and standing rules for autonomous edits.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "Adds the ability to insert pre-defined template content into a pad.",
3
3
  "name": "ep_template_content",
4
- "version": "0.0.54",
4
+ "version": "0.0.55",
5
5
  "author": {
6
6
  "name": "John McLear",
7
7
  "email": "john@mclear.co.uk"