Skip to content

Commit de03711

Browse files
committed
Merge branch 'main' into v14/bugfix/export-multi-url-and-align-element-name
2 parents 0ea60af + 7ce4168 commit de03711

File tree

928 files changed

+32500
-24627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

928 files changed

+32500
-24627
lines changed

.eslintignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 105 deletions
This file was deleted.

.github/README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ The development environment is the default environment and is used when running
2929

3030
### Run against a local Umbraco instance
3131

32-
> **Note**
33-
> Make sure you have followed the [Authentication guide](https://github.com/umbraco/Umbraco.CMS.Backoffice/blob/main/docs/authentication.md) before continuing.
34-
3532
If you have a local Umbraco instance running, you can use the development environment to run against it by overriding the API URL and bypassing the mock-service-worker in the frontend client.
3633

3734
Create a `.env.local` file and set the following variables:
@@ -41,14 +38,37 @@ VITE_UMBRACO_API_URL=https://localhost:44339 # This will be the URL to your Umbr
4138
VITE_UMBRACO_USE_MSW=off # Indicate that you want all API calls to bypass MSW (mock-service-worker)
4239
```
4340

41+
Open this file in an editor: `src/Umbraco.Web.UI/appsettings.Development.json` and add this to the `Umbraco:CMS:Security` section to override the backoffice host:
42+
43+
```json
44+
"Umbraco": {
45+
"CMS": {
46+
"Security":{
47+
"BackOfficeHost": "http://localhost:5173",
48+
"AuthorizeCallbackPathName": "/oauth_complete",
49+
"AuthorizeCallbackLogoutPathName": "/logout",
50+
"AuthorizeCallbackErrorPathName": "/error",
51+
},
52+
},
53+
}
54+
```
55+
56+
Now start the vite server: `npm run dev:server` in your backoffice folder and open the http://localhost:5173 URL in your browser.
57+
4458
### Storybook
4559

4660
Storybook is also being built and deployed automatically on the Main branch, including a preview URL on each pull request. See it in action on this [Azure Static Web App](https://ambitious-stone-0033b3603.1.azurestaticapps.net/).
4761

62+
You can test the Storybook locally by running `npm run storybook`. This will start the Storybook server and open a browser window with the Storybook UI.
63+
64+
Storybook is an excellent tool to test out UI components in isolation and to document them. It is also a great way to test the responsiveness and accessibility of the components.
65+
4866
## Contributing
4967

50-
We accept contributions to this project. However be aware that we are mainly working on a private backlog, so not everyone will be immediately obvious. If you want to get started on contributing, please read the [contribute space](https://github.com/umbraco/Umbraco.CMS.Backoffice/contribute) where you will be able to find the guidelines on how to contribute as well as a list of good first issues.
68+
We accept contributions to this project. However be aware that we are mainly working on a private backlog, so not everything will be immediately obvious. If you want to get started on contributing, please read the [contributing guidelines](./CONTRIBUTING.md).
69+
70+
A list of issues can be found on the [Umbraco-CMS Issue Tracker](https://github.com/umbraco/Umbraco-CMS/issues). Many of them are marked as `community/up-for-grabs` which means they are up for grabs for anyone to work on.
5171

5272
## Documentation
5373

54-
The documentation can be found on [Umbraco Docs](https://docs.umbraco.com/umbraco-backoffice/). The documentation is a work in progress.
74+
The documentation can be found on [Umbraco Docs](https://docs.umbraco.com/umbraco-cms).

.github/workflows/build_test.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,30 @@ env:
2525
jobs:
2626
build:
2727
runs-on: ubuntu-latest
28-
29-
strategy:
30-
matrix:
31-
node-version: [20]
32-
3328
steps:
3429
- uses: actions/checkout@v4
35-
- name: Use Node.js ${{ matrix.node-version }}
30+
- name: Use Node.js
3631
uses: actions/setup-node@v4
3732
with:
38-
node-version: ${{ matrix.node-version }}
39-
cache: 'npm'
33+
node-version-file: .nvmrc
34+
cache: npm
35+
cache-dependency-path: ./package-lock.json
4036
- run: npm ci --no-audit --no-fund --prefer-offline
4137
- run: npm run lint:errors
42-
- run: npm run build
38+
- run: npm run build:for:cms
4339
- run: npm run generate:jsonschema:dist
40+
41+
test:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
- name: Use Node.js
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version-file: .nvmrc
49+
cache: npm
50+
cache-dependency-path: ./package-lock.json
51+
- run: npm ci --no-audit --no-fund --prefer-offline
4452
- run: npx playwright install --with-deps
4553
- run: npm test
4654
- name: Upload Code Coverage reports
@@ -50,13 +58,3 @@ jobs:
5058
name: code-coverage
5159
path: coverage/
5260
retention-days: 30
53-
# Commented out since it is outdated and is quite spammy
54-
# - name: Report code coverage
55-
# uses: zgosalvez/github-actions-report-lcov@v2
56-
# if: always()
57-
# continue-on-error: true
58-
# with:
59-
# coverage-files: coverage/lcov.info
60-
# artifact-name: code-coverage-report
61-
# github-token: ${{ secrets.GITHUB_TOKEN }}
62-
# working-directory: ./

.github/workflows/devskim.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.9
1+
20

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# Ignore auto-generated backend-api files
22
src/external/backend-api/src
3+
src/packages/core/icon-registry/icons.ts
4+
src/packages/core/icon-registry/icons

devops/eslint/rules/exported-string-constant-naming.cjs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
1+
/** @type {import('eslint').Rule.RuleModule}*/
12
module.exports = {
23
meta: {
34
type: 'problem',
45
docs: {
56
description:
67
'Ensure all exported string constants should be in uppercase with words separated by underscores and prefixed with UMB_',
78
},
9+
schema: [
10+
{
11+
type: 'object',
12+
properties: {
13+
excludedFileNames: {
14+
type: 'array',
15+
items: {
16+
type: 'string',
17+
},
18+
},
19+
},
20+
additionalProperties: false,
21+
},
22+
],
823
},
924
create: function (context) {
1025
const excludedFileNames = context.options[0]?.excludedFileNames || [];
1126
return {
1227
ExportNamedDeclaration(node) {
13-
const fileName = context.getFilename();
28+
const fileName = context.filename;
1429

1530
if (excludedFileNames.some((excludedFileName) => fileName.includes(excludedFileName))) {
1631
// Skip the rule check for files in the excluded list

devops/icons/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { readFileSync, writeFile, mkdir } from 'fs';
1+
import { readFileSync, writeFile, mkdir, rmSync } from 'fs';
22
import * as globModule from 'tiny-glob';
33
import * as pathModule from 'path';
44

@@ -15,6 +15,9 @@ const lucideSvgDirectory = 'node_modules/lucide-static/icons';
1515
const simpleIconsSvgDirectory = 'node_modules/simple-icons/icons';
1616

1717
const run = async () => {
18+
// Empty output directory:
19+
rmSync(iconsOutputDirectory, { recursive: true });
20+
1821
var icons = await collectDictionaryIcons();
1922
icons = await collectDiskIcons(icons);
2023
writeIconsToDisk(icons);
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { defineConfig } from '@hey-api/openapi-ts';
2+
3+
export default defineConfig({
4+
client: 'fetch',
5+
input: 'https://raw.githubusercontent.com/umbraco/Umbraco-CMS/v14/dev/src/Umbraco.Cms.Api.Management/OpenApi.json',
6+
output: {
7+
path: 'src/external/backend-api/src',
8+
format: 'prettier',
9+
lint: 'eslint',
10+
},
11+
schemas: false,
12+
services: {
13+
asClass: true,
14+
},
15+
types: {
16+
enums: 'typescript',
17+
},
18+
});

0 commit comments

Comments
 (0)