ep_set_title_on_pad 0.7.13 → 0.7.15
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/.github/workflows/backend-tests.yml +2 -2
- package/.github/workflows/codeql.yml +3 -3
- package/.github/workflows/frontend-tests.yml +2 -2
- package/.github/workflows/lint.yml +39 -0
- package/.github/workflows/npmpublish.yml +12 -8
- package/.github/workflows/test-and-release.yml +4 -0
- package/package.json +5 -5
- package/pnpm-workspace.yaml +10 -0
- package/static/tests/frontend-new/specs/title.spec.ts +20 -0
- package/templates/title.ejs +20 -15
|
@@ -26,11 +26,11 @@ jobs:
|
|
|
26
26
|
with:
|
|
27
27
|
repository: ether/etherpad-lite
|
|
28
28
|
path: etherpad-lite
|
|
29
|
-
- uses: actions/setup-node@
|
|
29
|
+
- uses: actions/setup-node@v7
|
|
30
30
|
name: Install Node.js
|
|
31
31
|
with:
|
|
32
32
|
node-version: 25
|
|
33
|
-
- uses: pnpm/action-setup@v6
|
|
33
|
+
- uses: pnpm/action-setup@v6.1.0
|
|
34
34
|
name: Install pnpm
|
|
35
35
|
with:
|
|
36
36
|
package_json_file: ./etherpad-lite/package.json
|
|
@@ -27,15 +27,15 @@ jobs:
|
|
|
27
27
|
uses: actions/checkout@v7
|
|
28
28
|
|
|
29
29
|
- name: Initialize CodeQL
|
|
30
|
-
uses: github/codeql-action/init@v4
|
|
30
|
+
uses: github/codeql-action/init@v4.38.1
|
|
31
31
|
with:
|
|
32
32
|
languages: ${{ matrix.language }}
|
|
33
33
|
queries: +security-and-quality
|
|
34
34
|
|
|
35
35
|
- name: Autobuild
|
|
36
|
-
uses: github/codeql-action/autobuild@v4
|
|
36
|
+
uses: github/codeql-action/autobuild@v4.38.1
|
|
37
37
|
|
|
38
38
|
- name: Perform CodeQL Analysis
|
|
39
|
-
uses: github/codeql-action/analyze@v4
|
|
39
|
+
uses: github/codeql-action/analyze@v4.38.1
|
|
40
40
|
with:
|
|
41
41
|
category: "/language:${{ matrix.language }}"
|
|
@@ -16,11 +16,11 @@ jobs:
|
|
|
16
16
|
with:
|
|
17
17
|
repository: ether/etherpad-lite
|
|
18
18
|
path: etherpad-lite
|
|
19
|
-
- uses: actions/setup-node@
|
|
19
|
+
- uses: actions/setup-node@v7
|
|
20
20
|
name: Install Node.js
|
|
21
21
|
with:
|
|
22
22
|
node-version: 25
|
|
23
|
-
- uses: pnpm/action-setup@v6
|
|
23
|
+
- uses: pnpm/action-setup@v6.1.0
|
|
24
24
|
name: Install pnpm
|
|
25
25
|
with:
|
|
26
26
|
package_json_file: ./etherpad-lite/package.json
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
lint:
|
|
8
|
+
name: ESLint
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
# `eslint .` executes .eslintrc.cjs and every installed ESLint plugin, so
|
|
11
|
+
# don't hand it the caller's contents:write / id-token:write token.
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
steps:
|
|
15
|
+
- name: Check out plugin repository
|
|
16
|
+
uses: actions/checkout@v7
|
|
17
|
+
- uses: actions/setup-node@v7
|
|
18
|
+
name: Install Node.js
|
|
19
|
+
with:
|
|
20
|
+
node-version: 25
|
|
21
|
+
- uses: pnpm/action-setup@v6.1.0
|
|
22
|
+
name: Install pnpm
|
|
23
|
+
with:
|
|
24
|
+
version: 10
|
|
25
|
+
run_install: false
|
|
26
|
+
- name: Get pnpm store directory
|
|
27
|
+
shell: bash
|
|
28
|
+
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
29
|
+
- uses: actions/cache@v6
|
|
30
|
+
name: Setup pnpm cache
|
|
31
|
+
with:
|
|
32
|
+
path: ${{ env.STORE_PATH }}
|
|
33
|
+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
34
|
+
restore-keys: |
|
|
35
|
+
${{ runner.os }}-pnpm-store-
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: pnpm install --ignore-scripts
|
|
38
|
+
- name: Run ESLint
|
|
39
|
+
run: pnpm run lint
|
|
@@ -18,20 +18,24 @@ jobs:
|
|
|
18
18
|
contents: write # for the atomic version-bump push (branch + tag)
|
|
19
19
|
id-token: write # for npm OIDC trusted publishing
|
|
20
20
|
steps:
|
|
21
|
-
- uses: actions/setup-node@
|
|
21
|
+
- uses: actions/setup-node@v7
|
|
22
22
|
with:
|
|
23
|
-
# OIDC trusted publishing needs npm >= 11.5.1
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
|
|
23
|
+
# OIDC trusted publishing needs npm >= 11.5.1. Node 24 is an LTS
|
|
24
|
+
# line that every npm 11.x and 12.x supports; Node 25 is not —
|
|
25
|
+
# npm 12 requires ^22.22.2 || ^24.15.0 || >=26.0.0, so on Node 25
|
|
26
|
+
# the upgrade step below died with EBADENGINE and no plugin could
|
|
27
|
+
# publish.
|
|
28
|
+
node-version: 24
|
|
27
29
|
registry-url: https://registry.npmjs.org/
|
|
30
|
+
# Pinned to a range rather than @latest: the next npm major dropping
|
|
31
|
+
# this Node line would silently break publishing fleet-wide again.
|
|
28
32
|
- name: Upgrade npm to >=11.5.1 (required for trusted publishing)
|
|
29
|
-
run: npm install -g npm
|
|
33
|
+
run: npm install -g npm@^11.5.1
|
|
30
34
|
- name: Check out Etherpad core
|
|
31
35
|
uses: actions/checkout@v7
|
|
32
36
|
with:
|
|
33
37
|
repository: ether/etherpad-lite
|
|
34
|
-
- uses: pnpm/action-setup@v6
|
|
38
|
+
- uses: pnpm/action-setup@v6.1.0
|
|
35
39
|
name: Install pnpm
|
|
36
40
|
with:
|
|
37
41
|
run_install: false
|
|
@@ -73,7 +77,7 @@ jobs:
|
|
|
73
77
|
# `pnpm version patch` bumps package.json, makes a commit, and creates
|
|
74
78
|
# a `v<new-version>` tag. Capture the new tag name from package.json
|
|
75
79
|
# rather than parsing pnpm's output, which has historically varied.
|
|
76
|
-
# Bump the patch component directly with Node. pnpm/action-setup@v6
|
|
80
|
+
# Bump the patch component directly with Node. pnpm/action-setup@v6.0.10
|
|
77
81
|
# sometimes installs pnpm 11 pre-releases even when version: 10.x is
|
|
78
82
|
# requested (pnpm/action-setup#225); those pre-releases either skip
|
|
79
83
|
# the git commit/tag or reject --no-git-tag-version as unknown.
|
|
@@ -14,6 +14,9 @@ permissions:
|
|
|
14
14
|
id-token: write
|
|
15
15
|
|
|
16
16
|
jobs:
|
|
17
|
+
lint:
|
|
18
|
+
uses: ./.github/workflows/lint.yml
|
|
19
|
+
secrets: inherit
|
|
17
20
|
backend:
|
|
18
21
|
uses: ./.github/workflows/backend-tests.yml
|
|
19
22
|
secrets: inherit
|
|
@@ -23,6 +26,7 @@ jobs:
|
|
|
23
26
|
release:
|
|
24
27
|
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }}
|
|
25
28
|
needs:
|
|
29
|
+
- lint
|
|
26
30
|
- backend
|
|
27
31
|
- frontend
|
|
28
32
|
permissions:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ep_set_title_on_pad",
|
|
3
3
|
"description": "Set the title on a pad in Etherpad, also includes real time updates to the UI",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.15",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "johnyma22 (John McLear) <john@mclear.co.uk>",
|
|
7
7
|
"keywords": [
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"plugin"
|
|
11
11
|
],
|
|
12
12
|
"engines": {
|
|
13
|
-
"node": ">=
|
|
13
|
+
"node": ">=22.0.0"
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://github.com/ether/ep_set_title_on_pad#readme",
|
|
16
16
|
"repository": {
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"url": "https://etherpad.org/"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"ep_plugin_helpers": "^0.6.
|
|
28
|
+
"ep_plugin_helpers": "^0.6.8"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"eslint": "^8.57.1",
|
|
32
|
-
"eslint-config-etherpad": "^
|
|
33
|
-
"typescript": "
|
|
32
|
+
"eslint-config-etherpad": "^5.0.0",
|
|
33
|
+
"typescript": "~6.0.3"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"lint": "eslint .",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# js-yaml and brace-expansion arrive only as transitive dev dependencies (via
|
|
2
|
+
# eslint and minimatch@3), so `pnpm update` cannot move them. The selectors are
|
|
3
|
+
# scoped to the affected major line: an unbounded range would drag minimatch@3
|
|
4
|
+
# onto brace-expansion 5.x and eslint onto js-yaml 5.x.
|
|
5
|
+
#
|
|
6
|
+
# pnpm 11 no longer reads `pnpm.overrides` from package.json — these must live
|
|
7
|
+
# here or the lockfile and the install disagree (ERR_PNPM_LOCKFILE_CONFIG_MISMATCH).
|
|
8
|
+
overrides:
|
|
9
|
+
js-yaml@4: '^4.3.2'
|
|
10
|
+
brace-expansion@1: '^1.1.16'
|
|
@@ -13,4 +13,24 @@ test.describe('Set Title On Pad', () => {
|
|
|
13
13
|
|
|
14
14
|
await expect(page.locator('#pad_title > #title > h1 > a')).toHaveText('JohnMcLear');
|
|
15
15
|
});
|
|
16
|
+
|
|
17
|
+
// Regression guard for #155: the bar was once squeezed to 16px tall with
|
|
18
|
+
// 11px text to keep a since-removed core auto-scroll assertion green, which
|
|
19
|
+
// rendered the title smaller than the pad's own body copy.
|
|
20
|
+
test('title bar is rendered at a readable size', async ({page}) => {
|
|
21
|
+
const metrics = await page.evaluate(() => {
|
|
22
|
+
const bar = document.querySelector('#pad_title') as HTMLElement;
|
|
23
|
+
const heading = document.querySelector('#pad_title #title h1') as HTMLElement;
|
|
24
|
+
return {
|
|
25
|
+
barHeight: bar.getBoundingClientRect().height,
|
|
26
|
+
titleFontSize: parseFloat(getComputedStyle(heading).fontSize),
|
|
27
|
+
// Core sets `html { font-size: 15px }`; the title must not end up
|
|
28
|
+
// smaller than the editor's own base text.
|
|
29
|
+
rootFontSize: parseFloat(getComputedStyle(document.documentElement).fontSize),
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
expect(metrics.titleFontSize).toBeGreaterThanOrEqual(metrics.rootFontSize);
|
|
34
|
+
expect(metrics.barHeight).toBeGreaterThanOrEqual(metrics.rootFontSize * 2);
|
|
35
|
+
});
|
|
16
36
|
});
|
package/templates/title.ejs
CHANGED
|
@@ -6,30 +6,34 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<style type="text/css">
|
|
9
|
-
/*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
/* Sizes are expressed in rem so the bar tracks etherpad's base font size
|
|
10
|
+
(`html { font-size: 15px }` in core's pad.css) instead of hard-coding
|
|
11
|
+
pixel values that no longer match the skin.
|
|
12
|
+
|
|
13
|
+
History: this bar was squeezed down to 16px tall / 11px text to keep
|
|
14
|
+
etherpad's `enter.spec.ts: enter is always visible after event` green —
|
|
15
|
+
that test measured the last line against the *browser* viewport, so any
|
|
16
|
+
chrome above the editor iframe failed it. Core dropped that assertion as
|
|
17
|
+
inherently fragile (ether/etherpad#7845), so the bar no longer has to be
|
|
18
|
+
unreadably small. See ether/ep_set_title_on_pad#155. */
|
|
13
19
|
#pad_title {
|
|
14
20
|
flex-direction: row;
|
|
15
21
|
align-items: center;
|
|
16
22
|
border-bottom: 1px solid #ccc;
|
|
17
23
|
margin: 0 !important;
|
|
18
|
-
padding: 0 10px;
|
|
19
|
-
height:
|
|
24
|
+
padding: 0.2rem 10px;
|
|
25
|
+
min-height: 2.2rem;
|
|
20
26
|
box-sizing: border-box;
|
|
21
|
-
line-height: 15px;
|
|
22
27
|
}
|
|
23
28
|
#input_title{
|
|
24
29
|
display:none;
|
|
25
30
|
flex: 1 auto;
|
|
26
|
-
padding: 0 8px !important;
|
|
27
|
-
height:
|
|
31
|
+
padding: 0.2rem 8px !important;
|
|
32
|
+
height: 1.8rem;
|
|
28
33
|
box-sizing: border-box;
|
|
29
|
-
font-size:
|
|
34
|
+
font-size: 1rem;
|
|
30
35
|
}
|
|
31
36
|
#title{
|
|
32
|
-
line-height: 15px;
|
|
33
37
|
max-width: calc(100% - 30px);
|
|
34
38
|
white-space: nowrap;
|
|
35
39
|
overflow: hidden;
|
|
@@ -41,8 +45,8 @@
|
|
|
41
45
|
#title h1{
|
|
42
46
|
margin: 0;
|
|
43
47
|
padding: 0;
|
|
44
|
-
font-size:
|
|
45
|
-
line-height:
|
|
48
|
+
font-size: 1.1rem;
|
|
49
|
+
line-height: 1.5;
|
|
46
50
|
font-weight: 600;
|
|
47
51
|
}
|
|
48
52
|
#edit_title{
|
|
@@ -50,13 +54,14 @@
|
|
|
50
54
|
margin-left: 10px;
|
|
51
55
|
cursor:pointer;
|
|
52
56
|
display:none;
|
|
53
|
-
|
|
57
|
+
font-size: 1rem;
|
|
58
|
+
line-height: 1;
|
|
54
59
|
}
|
|
55
60
|
#save_title{
|
|
56
61
|
display:none;
|
|
57
62
|
cursor:pointer;
|
|
58
63
|
margin-left:8px;
|
|
59
|
-
line-height:
|
|
64
|
+
line-height: 1;
|
|
60
65
|
}
|
|
61
66
|
#save_title button{
|
|
62
67
|
margin-right: 0 !important;
|