ep_file_menu_toolbar 0.0.3 → 0.2.45

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/.eslintignore ADDED
@@ -0,0 +1 @@
1
+ static/js/lib/*
package/.eslintrc.cjs ADDED
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ // This is a workaround for https://github.com/eslint/eslint/issues/3458
4
+ require('eslint-config-etherpad/patch/modern-module-resolution');
5
+
6
+ module.exports = {
7
+ root: true,
8
+ extends: 'etherpad/plugin',
9
+ };
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "daily"
7
+ - package-ecosystem: "npm"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "daily"
11
+ versioning-strategy: "increase"
@@ -0,0 +1,30 @@
1
+ name: Dependabot Automerge
2
+ permissions:
3
+ contents: write
4
+ pull-requests: write
5
+ on:
6
+ workflow_run:
7
+ workflows:
8
+ - Node.js Package
9
+ types:
10
+ - completed
11
+
12
+ jobs:
13
+ automerge:
14
+ if: >
15
+ github.event.workflow_run.conclusion == 'success' &&
16
+ github.event.workflow_run.event == 'push' &&
17
+ github.event.workflow_run.actor.login == 'dependabot[bot]'
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - name: Checkout
21
+ uses: actions/checkout@v6
22
+
23
+ - name: Automerge
24
+ uses: "pascalgn/automerge-action@v0.16.4"
25
+ env:
26
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27
+ MERGE_METHOD: squash
28
+ MERGE_LABELS: ""
29
+ MERGE_RETRY_SLEEP: "100000"
30
+
@@ -0,0 +1,71 @@
1
+ name: Backend Tests
2
+
3
+ # any branch is useful for testing before a PR is submitted
4
+ on:
5
+ workflow_call:
6
+
7
+ jobs:
8
+ withplugins:
9
+ # run on pushes to any branch
10
+ # run on PRs from external forks
11
+ if: |
12
+ (github.event_name != 'pull_request')
13
+ || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
14
+ name: with Plugins
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ -
18
+ name: Install libreoffice
19
+ uses: awalsh128/cache-apt-pkgs-action@v1.6.0
20
+ with:
21
+ packages: libreoffice libreoffice-pdfimport
22
+ version: 1.0
23
+ -
24
+ name: Install etherpad core
25
+ uses: actions/checkout@v6
26
+ with:
27
+ repository: ether/etherpad-lite
28
+ path: etherpad-lite
29
+ - uses: pnpm/action-setup@v6
30
+ name: Install pnpm
31
+ with:
32
+ version: 10
33
+ run_install: false
34
+ - name: Get pnpm store directory
35
+ shell: bash
36
+ run: |
37
+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
38
+ - uses: actions/cache@v4
39
+ name: Setup pnpm cache
40
+ with:
41
+ path: ${{ env.STORE_PATH }}
42
+ key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43
+ restore-keys: |
44
+ ${{ runner.os }}-pnpm-store-
45
+ -
46
+ name: Checkout plugin repository
47
+ uses: actions/checkout@v6
48
+ with:
49
+ path: plugin
50
+ - name: Remove tests
51
+ working-directory: ./etherpad-lite
52
+ run: rm -rf ./src/tests/backend/specs
53
+ -
54
+ name: Install Etherpad core dependencies
55
+ working-directory: ./etherpad-lite
56
+ run: bin/installDeps.sh
57
+ - name: Install plugin
58
+ working-directory: ./etherpad-lite
59
+ run: |
60
+ pnpm run plugins i --path ../../plugin
61
+ -
62
+ name: Run the backend tests
63
+ working-directory: ./etherpad-lite/src
64
+ run: |
65
+ shopt -s globstar
66
+ res=$(find ./plugin_packages -path "*/static/tests/backend/specs/*" 2>/dev/null | wc -l)
67
+ if [ $res -eq 0 ]; then
68
+ echo "No backend tests found"
69
+ else
70
+ npx cross-env NODE_ENV=production mocha --import=tsx --timeout 120000 --recursive node_modules/ep_*/static/tests/backend/specs/**
71
+ fi
@@ -0,0 +1,94 @@
1
+ # Publicly credit Sauce Labs because they generously support open source
2
+ # projects.
3
+ name: Frontend Tests
4
+
5
+ on:
6
+ workflow_call:
7
+
8
+ jobs:
9
+ test-frontend:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ -
14
+ name: Check out Etherpad core
15
+ uses: actions/checkout@v6
16
+ with:
17
+ repository: ether/etherpad-lite
18
+ - uses: pnpm/action-setup@v6
19
+ name: Install pnpm
20
+ with:
21
+ version: 10
22
+ run_install: false
23
+ - name: Get pnpm store directory
24
+ shell: bash
25
+ run: |
26
+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
27
+ - uses: actions/cache@v4
28
+ name: Setup pnpm cache
29
+ with:
30
+ path: ${{ env.STORE_PATH }}
31
+ key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
32
+ restore-keys: |
33
+ ${{ runner.os }}-pnpm-store-
34
+ -
35
+ name: Check out the plugin
36
+ uses: actions/checkout@v6
37
+ with:
38
+ path: ./node_modules/__tmp
39
+ -
40
+ name: export GIT_HASH to env
41
+ id: environment
42
+ run: |
43
+ cd ./node_modules/__tmp
44
+ echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
45
+ -
46
+ name: Determine plugin name
47
+ id: plugin_name
48
+ run: |
49
+ cd ./node_modules/__tmp
50
+ npx -c 'printf %s\\n "::set-output name=plugin_name::${npm_package_name}"'
51
+ -
52
+ name: Rename plugin directory
53
+ env:
54
+ PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
55
+ run: |
56
+ mv ./node_modules/__tmp ./node_modules/"${PLUGIN_NAME}"
57
+ -
58
+ name: Install plugin dependencies
59
+ env:
60
+ PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
61
+ run: |
62
+ cd ./node_modules/"${PLUGIN_NAME}"
63
+ pnpm i
64
+ # Etherpad core dependencies must be installed after installing the
65
+ # plugin's dependencies, otherwise npm will try to hoist common
66
+ # dependencies by removing them from src/node_modules and installing them
67
+ # in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
68
+ # to be buggy, because it sometimes removes dependencies from
69
+ # src/node_modules but fails to add them to the top-level node_modules.
70
+ # Even if npm correctly hoists the dependencies, the hoisting seems to
71
+ # confuse tools such as `npm outdated`, `npm update`, and some ESLint
72
+ # rules.
73
+ -
74
+ name: Install Etherpad core dependencies
75
+ run: bin/installDeps.sh
76
+ - name: Create settings.json
77
+ run: cp ./src/tests/settings.json settings.json
78
+ - name: Run the frontend tests
79
+ shell: bash
80
+ run: |
81
+ pnpm run dev &
82
+ connected=false
83
+ can_connect() {
84
+ curl -sSfo /dev/null http://localhost:9001/ || return 1
85
+ connected=true
86
+ }
87
+ now() { date +%s; }
88
+ start=$(now)
89
+ while [ $(($(now) - $start)) -le 15 ] && ! can_connect; do
90
+ sleep 1
91
+ done
92
+ cd src
93
+ pnpm exec playwright install chromium --with-deps
94
+ pnpm run test-ui --project=chromium
@@ -0,0 +1,107 @@
1
+ # This workflow will run tests using node and then publish a package to the npm registry when a release is created
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3
+ #
4
+ # Publishing uses npm Trusted Publishing (OIDC) — no NPM_TOKEN secret is
5
+ # required. Each package must have a trusted publisher configured on npmjs.com
6
+ # pointing at this workflow file. See:
7
+ # https://docs.npmjs.com/trusted-publishers
8
+
9
+ name: Node.js Package
10
+
11
+ on:
12
+ workflow_call:
13
+
14
+ jobs:
15
+ publish-npm:
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ contents: write # for the atomic version-bump push (branch + tag)
19
+ id-token: write # for npm OIDC trusted publishing
20
+ steps:
21
+ - uses: actions/setup-node@v6
22
+ with:
23
+ # OIDC trusted publishing needs npm >= 11.5.1, which requires
24
+ # Node >= 20.17.0. setup-node's `20` resolves to the latest
25
+ # 20.x, which satisfies that.
26
+ node-version: 20
27
+ registry-url: https://registry.npmjs.org/
28
+ - name: Upgrade npm to >=11.5.1 (required for trusted publishing)
29
+ run: npm install -g npm@latest
30
+ - name: Check out Etherpad core
31
+ uses: actions/checkout@v6
32
+ with:
33
+ repository: ether/etherpad-lite
34
+ - uses: pnpm/action-setup@v6
35
+ name: Install pnpm
36
+ with:
37
+ version: 10
38
+ run_install: false
39
+ - name: Get pnpm store directory
40
+ shell: bash
41
+ run: |
42
+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
43
+ - uses: actions/cache@v5
44
+ name: Setup pnpm cache
45
+ with:
46
+ path: ${{ env.STORE_PATH }}
47
+ key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
48
+ restore-keys: |
49
+ ${{ runner.os }}-pnpm-store-
50
+ -
51
+ uses: actions/checkout@v6
52
+ with:
53
+ fetch-depth: 0
54
+ -
55
+ name: Bump version (patch)
56
+ run: |
57
+ LATEST_TAG=$(git describe --tags --abbrev=0) || exit 1
58
+ NEW_COMMITS=$(git rev-list --count "${LATEST_TAG}"..) || exit 1
59
+ [ "${NEW_COMMITS}" -gt 0 ] || exit 0
60
+ git config user.name 'github-actions[bot]'
61
+ git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
62
+ pnpm i --frozen-lockfile
63
+ # `pnpm version patch` bumps package.json, makes a commit, and creates
64
+ # a `v<new-version>` tag. Capture the new tag name from package.json
65
+ # rather than parsing pnpm's output, which has historically varied.
66
+ # Bump the patch component directly with Node. pnpm/action-setup@v6
67
+ # sometimes installs pnpm 11 pre-releases even when version: 10.x is
68
+ # requested (pnpm/action-setup#225); those pre-releases either skip
69
+ # the git commit/tag or reject --no-git-tag-version as unknown.
70
+ # Doing the bump in Node sidesteps both failure modes.
71
+ NEW_VERSION=$(node -e "const fs=require('fs');const p=require('./package.json');const v=p.version.split('.');v[2]=String(Number(v[2])+1);p.version=v.join('.');fs.writeFileSync('./package.json',JSON.stringify(p,null,2)+'\n');console.log(p.version);")
72
+ NEW_TAG="v${NEW_VERSION}"
73
+ git add package.json
74
+ git commit -m "${NEW_TAG}"
75
+ git tag -a "${NEW_TAG}" -m "${NEW_TAG}"
76
+ # CRITICAL: use --atomic so the branch update and the tag update
77
+ # succeed (or fail) as a single transaction on the server. The old
78
+ # `git push --follow-tags` was non-atomic per ref: if a concurrent
79
+ # publish run won the race, the branch fast-forward would be rejected
80
+ # but the tag push would still land — leaving a dangling tag with no
81
+ # matching commit on the branch. Subsequent runs would then forever
82
+ # try to bump to the same already-existing tag and fail with
83
+ # `tag 'vN+1' already exists`. With --atomic, a rejected branch push
84
+ # rejects the tag push too, and the next workflow tick can retry
85
+ # cleanly against the up-to-date refs.
86
+ git push --atomic origin "${GITHUB_REF_NAME}" "${NEW_TAG}"
87
+ # This is required if the package has a prepare script that uses something
88
+ # in dependencies or devDependencies.
89
+ -
90
+ run: pnpm i
91
+ # `npm publish` must come after `git push` otherwise there is a race
92
+ # condition: If two PRs are merged back-to-back then master/main will be
93
+ # updated with the commits from the second PR before the first PR's
94
+ # workflow has a chance to push the commit generated by `npm version
95
+ # patch`. This causes the first PR's `git push` step to fail after the
96
+ # package has already been published, which in turn will cause all future
97
+ # workflow runs to fail because they will all attempt to use the same
98
+ # already-used version number. By running `npm publish` after `git push`,
99
+ # back-to-back merges will cause the first merge's workflow to fail but
100
+ # the second's will succeed.
101
+ #
102
+ # Use `npm publish` directly (not `pnpm publish`) because OIDC trusted
103
+ # publishing requires npm CLI >= 11.5.1 and `pnpm publish` shells out to
104
+ # whichever `npm` is on PATH; calling `npm` directly avoids any shim
105
+ # ambiguity.
106
+ - name: Publish to npm via OIDC
107
+ run: npm publish --provenance --access public
@@ -0,0 +1,26 @@
1
+ name: Node.js Package
2
+ on: [push]
3
+
4
+ # id-token: write must be granted here so the reusable npmpublish workflow
5
+ # can request an OIDC token for npm trusted publishing.
6
+ permissions:
7
+ contents: write
8
+ id-token: write
9
+
10
+ jobs:
11
+ backend:
12
+ uses: ./.github/workflows/backend-tests.yml
13
+ secrets: inherit
14
+ frontend:
15
+ uses: ./.github/workflows/frontend-tests.yml
16
+ secrets: inherit
17
+ release:
18
+ if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }}
19
+ needs:
20
+ - backend
21
+ - frontend
22
+ permissions:
23
+ contents: write # for the version bump push
24
+ id-token: write # for npm OIDC trusted publishing
25
+ uses: ./.github/workflows/npmpublish.yml
26
+ secrets: inherit
package/.travis.yml ADDED
@@ -0,0 +1,69 @@
1
+ language: node_js
2
+
3
+ node_js:
4
+ - "lts/*"
5
+
6
+ cache: false
7
+
8
+ before_install:
9
+ - sudo add-apt-repository -y ppa:libreoffice/ppa
10
+ - sudo apt-get update
11
+ - sudo apt-get -y install libreoffice
12
+ - sudo apt-get -y install libreoffice-pdfimport
13
+
14
+ services:
15
+ - docker
16
+
17
+ install:
18
+ - "bin/installDeps.sh"
19
+ - "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
20
+
21
+ before_script:
22
+ - "tests/frontend/travis/sauce_tunnel.sh"
23
+
24
+ script:
25
+ - "tests/frontend/travis/runner.sh"
26
+
27
+ env:
28
+ global:
29
+ - secure: "WMGxFkOeTTlhWB+ChMucRtIqVmMbwzYdNHuHQjKCcj8HBEPdZLfCuK/kf4rG\nVLcLQiIsyllqzNhBGVHG1nyqWr0/LTm8JRqSCDDVIhpyzp9KpCJQQJG2Uwjk\n6/HIJJh/wbxsEdLNV2crYU/EiVO3A4Bq0YTHUlbhUqG3mSCr5Ec="
30
+ - secure: "gejXUAHYscbR6Bodw35XexpToqWkv2ifeECsbeEmjaLkYzXmUUNWJGknKSu7\nEUsSfQV8w+hxApr1Z+jNqk9aX3K1I4btL3cwk2trnNI8XRAvu1c1Iv60eerI\nkE82Rsd5lwUaMEh+/HoL8ztFCZamVndoNgX7HWp5J/NRZZMmh4g="
31
+
32
+ jobs:
33
+ include:
34
+ - name: "Run the Backend tests"
35
+ install:
36
+ - "npm install"
37
+ - "mkdir ep_file_menu_toolbar"
38
+ - "mv !(ep_file_menu_toolbar) ep_file_menu_toolbar"
39
+ - "git clone https://github.com/ether/etherpad-lite.git etherpad"
40
+ - "cd etherpad"
41
+ - "mkdir node_modules"
42
+ - "mv ../ep_file_menu_toolbar node_modules/ep_aa_file_menu_toolbar"
43
+ - "bin/installDeps.sh"
44
+ - "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
45
+ - "cd src && npm install && cd -"
46
+ script:
47
+ - "tests/frontend/travis/runnerBackend.sh"
48
+ - name: "Test the Frontend"
49
+ install:
50
+ - "npm install"
51
+ - "mkdir ep_file_menu_toolbar"
52
+ - "mv !(ep_file_menu_toolbar) ep_file_menu_toolbar"
53
+ - "git clone https://github.com/ether/etherpad-lite.git etherpad"
54
+ - "cd etherpad"
55
+ - "mkdir node_modules"
56
+ - "mv ../ep_file_menu_toolbar node_modules/ep_aa_file_menu_toolbar"
57
+ - "bin/installDeps.sh"
58
+ - "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
59
+ script:
60
+ - "tests/frontend/travis/runner.sh"
61
+
62
+ notifications:
63
+ irc:
64
+ channels:
65
+ - "irc.freenode.org#etherpad-lite-dev"
66
+
67
+ ##ETHERPAD_TRAVIS_V=999
68
+ ## Travis configuration automatically created using bin/plugins/updateAllPluginsScript.sh
69
+ ## Manual patch to move to correct npm package of ep_aa.....
@@ -0,0 +1,133 @@
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:
48
+
49
+ ```
50
+ /* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
51
+ "loglevel": "DEBUG",
52
+ ```
53
+
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
72
+
73
+ ## 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
+
package/LICENSE.md ADDED
@@ -0,0 +1,14 @@
1
+ Copyright 2020 John McLear
2
+
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
package/README.md CHANGED
@@ -1,11 +1,17 @@
1
+ ![Demo](demo.gif) [![Backend Tests Status](https://github.com/ether/ep_file_menu_toolbar/actions/workflows/test-and-release.yml/badge.svg)](https://github.com/ether/ep_file_menu_toolbar/actions/workflows/test-and-release.yml)
2
+
1
3
  # A simple to use and responsive File menu / toolbar
2
4
 
3
5
  ![Screenshot](https://i.imgur.com/QDiux10.jpg "Screen shot of Etherpad File Menu Toolbar")
4
6
 
5
7
  ## Installation
6
- Install using /admin/plugins or npm install ep_file_menu_toolbar
8
+ Install using /admin/plugins
9
+ OR
10
+ ``git clone git@github.com:JohnMcLear/ep_file_menu_toolbar.git ep_aa_file_menu_toolbar``
7
11
 
8
12
  ## TODO
9
13
  * i18n support
10
14
  * Test against weird wrap/pad scrolling edge cases
11
15
  * Clean refactor <-- see .ejs file!
16
+
17
+
package/demo.gif ADDED
Binary file
package/demo.png ADDED
Binary file
package/eejs.js CHANGED
@@ -1,13 +1,20 @@
1
- var eejs = require('ep_etherpad-lite/node/eejs/');
1
+ 'use strict';
2
2
 
3
- exports.eejsBlock_styles = function(hook_name, args, cb){
4
- args.content = args.content + "<style type='text/css'>"+eejs.require("ep_file_menu_toolbar/static/js/lib/jquery-css-dropdown-plugin-master/dropdown-menu.css", {}, module) + "</style>";
5
- return cb();
6
- }
7
-
8
- exports.eejsBlock_body = function (hook_name, args, cb)
9
- {
10
- args.content = eejs.require('ep_file_menu_toolbar/templates/toolbar.ejs', {settings : false}) + args.content;
11
- }
3
+ const eejs = require('ep_etherpad-lite/node/eejs/');
12
4
 
5
+ exports.eejsBlock_styles = (hookName, args, cb) => {
6
+ const css = eejs.require(
7
+ 'ep_aa_file_menu_toolbar/static/js/lib/jquery-css-dropdown-plugin-master/dropdown-menu.css',
8
+ {}, module,
9
+ );
10
+ args.content = `${args.content}
11
+ <style type='text/css'>${css}</style>`;
12
+ cb();
13
+ };
13
14
 
15
+ exports.eejsBlock_body = (hookName, args, cb) => {
16
+ args.content = eejs.require('ep_aa_file_menu_toolbar/templates/toolbar.ejs', {
17
+ settings: false,
18
+ }) + args.content;
19
+ cb();
20
+ };
package/ep.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "parts": [
3
3
  {
4
- "name": "file_menu_toolbar",
4
+ "name": "aa_file_menu_toolbar",
5
5
  "client_hooks": {
6
- "postAceInit": "ep_file_menu_toolbar/static/js/index:documentReady"
6
+ "postAceInit": "ep_aa_file_menu_toolbar/static/js/index:documentReady"
7
7
  },
8
8
  "hooks": {
9
- "eejsBlock_body":"ep_file_menu_toolbar/eejs",
10
- "clientVars":"ep_file_menu_toolbar/index:clientVars",
11
- "eejsBlock_styles":"ep_file_menu_toolbar/eejs"
9
+ "eejsBlock_body":"ep_aa_file_menu_toolbar/eejs",
10
+ "eejsBlock_styles":"ep_aa_file_menu_toolbar/eejs"
12
11
  }
13
12
  }
14
13
  ]