Skip to content

Commit 48f55ed

Browse files
authored
Merge pull request #345 from owncloud/update_docs
Update the web-extension docs
2 parents 69e7e0a + 5bec8f1 commit 48f55ed

2 files changed

Lines changed: 62 additions & 4 deletions

File tree

docs/RELEASE_WORKFLOW.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,13 @@ packages/web-app-unzip/package.json
6060

6161
**Apps in this Repository:**
6262

63+
- `packages/web-app-advanced-search/`
6364
- `packages/web-app-cast/`
6465
- `packages/web-app-draw-io/`
6566
- `packages/web-app-external-sites/`
6667
- `packages/web-app-importer/`
6768
- `packages/web-app-json-viewer/`
69+
- `packages/web-app-photo-addon/`
6870
- `packages/web-app-progress-bars/`
6971
- `packages/web-app-unzip/`
7072

@@ -103,11 +105,13 @@ Create one tag per app that was bumped, all pointing to the **same** merge commi
103105

104106
```bash
105107
# Create tags for each app (use the version you set in step 2)
108+
git tag advanced-search-v0.2.0 2524913
106109
git tag cast-v0.3.3 2524913
107110
git tag draw-io-v0.3.3 2524913
108111
git tag external-sites-v0.3.3 2524913
109112
git tag importer-v0.3.2 2524913
110113
git tag json-viewer-v0.3.3 2524913
114+
git tag photo-addon-v0.2.0 2524913
111115
git tag progress-bars-v0.3.3 2524913
112116
git tag unzip-v0.4.3 2524913
113117
```
@@ -123,11 +127,13 @@ git push origin --tags
123127
If CI does not trigger for all tags, re-push each tag **individually** to ensure Drone CI webhooks trigger properly:
124128

125129
```bash
130+
git push origin --delete advanced-search-v0.2.0 && git push origin advanced-search-v0.2.0
126131
git push origin --delete cast-v0.3.3 && git push origin cast-v0.3.3
127132
git push origin --delete draw-io-v0.3.3 && git push origin draw-io-v0.3.3
128133
git push origin --delete external-sites-v0.3.3 && git push origin external-sites-v0.3.3
129134
git push origin --delete importer-v0.3.2 && git push origin importer-v0.3.2
130135
git push origin --delete json-viewer-v0.3.3 && git push origin json-viewer-v0.3.3
136+
git push origin --delete photo-addon-v0.2.0 && git push origin photo-addon-v0.2.0
131137
git push origin --delete progress-bars-v0.3.3 && git push origin progress-bars-v0.3.3
132138
git push origin --delete unzip-v0.4.3 && git push origin unzip-v0.4.3
133139
```

docs/starting_guide.md

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This guide helps you to create new extensions. It highlights important prerequis
77
* [General Information](#general-information)
88
* [Environmental Prerequisites](#environmental-prerequisites)
99
* [Web-Extension Prerequisites](#web-extension-prerequisites)
10+
* [The Design System](#the-design-system)
1011
* [Linting and Typescript Checks](#linting-and-typescript-checks)
1112
* [Testing the App](#testing-the-app)
1213
* [ocis_full Deployment Example](#ocis_full-deployment-example)
@@ -34,7 +35,7 @@ If the local branch becomes corrupted and needs to be reset, resynced or rebased
3435

3536
```bash
3637
git checkout main
37-
git pull --rebase origin/main
38+
git pull --rebase origin main
3839
git checkout <your-local-branch>
3940
git reset --hard origin/main
4041
git merge <remote-branch>
@@ -52,22 +53,73 @@ New web-extensions must be placed inside the `packages` folder and be prefixed w
5253

5354
- Add the new web-extension to the `APPS` variable in the `.drone.star` file.
5455
- Add the `dist` folder of the web-extension to the list of volume mounts in the `docker-compose.yml` file in the `ocis` service section.
55-
- If the web-extension requires additional external docker images, they must be added to the `docker-compose.yml` file.
56+
- If the web-extension requires additional external docker images, they must be added to the `docker-compose.yml` file for testing.
5657
- Add any changes to content security policies, if required, to `dev/docker/csp.yaml`.
5758
- Follow the structure of files and folders of other web-extensions.
5859
- Provide a README file for the web-extension.
59-
- Use the actual stable tag of web In the `dependencies` and `devDependencies` section of the `package.json` file.\
60+
- Use the actual stable tag of web In the `dependencies` and `devDependencies` section of the `package.json` file, for details see below.\
6061
This tag must be updated on new ocis production releases, see the [RELEASE_WORKFLOW](./RELEASE_WORKFLOW.md) documentation.
6162
- Post creating the `package.json` file or on changes, run from the repo-root `pnpm install`.\
6263
To avoid rare issues, delete the `pnpm-lock.json` file before running `pnpm install`.
6364
- If texts are printed to the webUI:
6465
- Texts must be translatable. Use `l10n` and `gettext` to do so.
6566
- Use other web-extensions as template for the `l10n` folder.
66-
- On merge, the resource to translate is available on [Transifex](https://app.transifex.com/owncloud-org/owncloud-web/translate/#de).\
67+
- On merge, the resource to translate or changes to source strings are available on [Transifex](https://app.transifex.com/owncloud-org/owncloud-web/translate/#de).\
6768
Note that an account is required and you need to be promoted as translator for defined languages, otherwise, you will not see the data.
69+
- Note that translations made will be downloaded and committed via an automated nightly sync. Changes are available with the next app-release.
6870
- Web provides themes (light and dark). Check that the web-extension supports the themes.
6971
- Provide tests
7072

73+
Template **package.json** file for the web-app:
74+
75+
- These sections and their dependencies are required at minimum. Replace variables and versions updates accordingly.
76+
```json
77+
{
78+
"name": "<extension name>",
79+
"version": "x.y.z",
80+
"private": true,
81+
"description": "<place description here",
82+
"license": "AGPL-3.0",
83+
"type": "module",
84+
"scripts": {
85+
"build": "pnpm vite build",
86+
"build:w": "pnpm vite build --watch --mode development",
87+
"check:types": "vue-tsc --noEmit",
88+
"test:unit": "NODE_OPTIONS=--unhandled-rejections=throw vitest"
89+
},
90+
"dependencies": {
91+
"@ownclouders/web-client": "^12.3.1",
92+
"@ownclouders/web-pkg": "^12.3.1"
93+
},
94+
"devDependencies": {
95+
"@ownclouders/extension-sdk": "^12.3.1",
96+
"@ownclouders/web-test-helpers": "^12.3.1",
97+
"vue": "^3.4.21",
98+
"vue3-gettext": "^2.4.0"
99+
}
100+
}
101+
```
102+
103+
- You can find more details on the respective dependencies here:
104+
- [web-client](https://github.com/owncloud/web/tree/master/packages/web-client)
105+
- [web-pkg](https://github.com/owncloud/web/tree/master/packages/web-pkg)
106+
- [extension-sdk](https://github.com/owncloud/web/tree/master/packages/extension-sdk)
107+
- [web-test-helpers](https://github.com/owncloud/web/tree/master/packages/web-test-helpers)
108+
- [design-system](https://github.com/owncloud/web/tree/master/packages/design-system)\
109+
The design-system is added via the `web-pkg` dependency automatically.\
110+
The provided link includes further information and documentation.
111+
112+
## The Design System
113+
114+
Web provides a design system that makes it easy to reuse and configure the provided designs, such as icons, bottons etc. You must use the design system and can only use your e.g. own SVG icons if there is absolutely no matching one. Otherwise, the PR will not be approved!
115+
116+
Example:
117+
```vue
118+
<oc-icon name="pencil" size="small" fill-type="line" />
119+
```
120+
121+
For a list of available icons see [src/assets/icons](https://github.com/owncloud/web/tree/master/packages/design-system/src/assets/icons). Please note that due to the size of the list, you may need to view it via a browser on a local clone.
122+
71123
## Linting and Typescript Checks
72124

73125
During a CI run, a linter and typecheck are initiated. No other tests will be started if these do not pass.

0 commit comments

Comments
 (0)