Skip to content

Commit 0c90033

Browse files
authored
Create Mantine UI scaffold (#4506)
* Create Mantine UI scaffold Scaffolds out a new UI based on Mantine. This is based on the Mantine/Vite template [1] and adapted to more closely match the prometheus 3.X UI. [1] https://github.com/mantinedev/vite-template/tree/30c8bb405f32cf886cf09786bbec6de2691e4ccb Signed-off-by: Joe Adams <[email protected]> * Adjust directory for GA mantine Signed-off-by: Joe Adams <[email protected]> --------- Signed-off-by: Joe Adams <[email protected]>
1 parent 0ba3c08 commit 0c90033

25 files changed

+8715
-0
lines changed

.github/workflows/ui-ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: UI CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
paths:
8+
- 'ui/**'
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
test_mantine_ui:
16+
name: Test mantine-ui
17+
runs-on: ubuntu-latest
18+
defaults:
19+
run:
20+
working-directory: ./ui/mantine-ui
21+
steps:
22+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
23+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
24+
with:
25+
node-version-file: './ui/mantine-ui/.nvmrc'
26+
cache: 'npm'
27+
cache-dependency-path: '**/package-lock.json'
28+
- name: Install dependencies
29+
run: npm install
30+
- name: Run build
31+
run: npm run build
32+
- name: Run tests
33+
run: npm test

ui/mantine-ui/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

ui/mantine-ui/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v24.3.0

ui/mantine-ui/.prettierrc.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/** @type {import("@ianvs/prettier-plugin-sort-imports").PrettierConfig} */
2+
const config = {
3+
printWidth: 100,
4+
singleQuote: true,
5+
trailingComma: "es5",
6+
plugins: ["@ianvs/prettier-plugin-sort-imports"],
7+
importOrder: [
8+
".*styles.css$",
9+
"",
10+
"dayjs",
11+
"^react$",
12+
"^next$",
13+
"^next/.*$",
14+
"<BUILTIN_MODULES>",
15+
"<THIRD_PARTY_MODULES>",
16+
"^@mantine/(.*)$",
17+
"^@mantinex/(.*)$",
18+
"^@mantine-tests/(.*)$",
19+
"^@docs/(.*)$",
20+
"^@/.*$",
21+
"^../(?!.*.css$).*$",
22+
"^./(?!.*.css$).*$",
23+
"\\.css$",
24+
],
25+
overrides: [
26+
{
27+
files: "*.mdx",
28+
options: {
29+
printWidth: 70,
30+
},
31+
},
32+
],
33+
};
34+
35+
export default config;

ui/mantine-ui/.stylelintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

ui/mantine-ui/.stylelintrc.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"extends": [
3+
"stylelint-config-standard-scss"
4+
],
5+
"rules": {
6+
"custom-property-pattern": null,
7+
"selector-class-pattern": null,
8+
"scss/no-duplicate-mixins": null,
9+
"declaration-empty-line-before": null,
10+
"declaration-block-no-redundant-longhand-properties": null,
11+
"alpha-value-notation": null,
12+
"custom-property-empty-line-before": null,
13+
"property-no-vendor-prefix": null,
14+
"color-function-notation": null,
15+
"length-zero-no-unit": null,
16+
"selector-not-notation": null,
17+
"no-descending-specificity": null,
18+
"comment-empty-line-before": null,
19+
"scss/at-mixin-pattern": null,
20+
"scss/at-rule-no-unknown": null,
21+
"value-keyword-case": null,
22+
"media-feature-range-notation": null,
23+
"selector-pseudo-class-no-unknown": [
24+
true,
25+
{
26+
"ignorePseudoClasses": [
27+
"global"
28+
]
29+
}
30+
]
31+
}
32+
}

ui/mantine-ui/eslint.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import mantine from "eslint-config-mantine";
2+
import tseslint from "typescript-eslint";
3+
4+
export default tseslint.config(
5+
...mantine,
6+
{ ignores: ["**/*.{mjs,cjs,js,d.ts,d.mts}", "./.storybook/main.ts"] },
7+
{
8+
files: ["**/*.story.tsx"],
9+
rules: { "no-console": "off" },
10+
}
11+
);

ui/mantine-ui/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
6+
<meta
7+
name="viewport"
8+
content="minimum-scale=1, initial-scale=1, width=device-width, user-scalable=no"
9+
/>
10+
<title>Alertmanager</title>
11+
</head>
12+
<body>
13+
<div id="root"></div>
14+
<script type="module" src="/src/main.tsx"></script>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)