Skip to content

Commit 37e7f54

Browse files
authored
docs: update README files and add LICENSE (#348)
* chore(license): add ELv2 license * docs(README): update all README files
1 parent 91b3ba4 commit 37e7f54

File tree

40 files changed

+745
-872
lines changed

40 files changed

+745
-872
lines changed

LICENSE

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
Elastic License 2.0
2+
3+
URL: <https://www.elastic.co/licensing/elastic-license>
4+
5+
## Acceptance
6+
7+
By using the software, you agree to all of the terms and conditions below.
8+
9+
## Copyright License
10+
11+
The licensor grants you a non-exclusive, royalty-free, worldwide,
12+
non-sublicensable, non-transferable license to use, copy, distribute, make
13+
available, and prepare derivative works of the software, in each case subject to
14+
the limitations and conditions below.
15+
16+
## Limitations
17+
18+
You may not provide the software to third parties as a hosted or managed
19+
service, where the service provides users with access to any substantial set of
20+
the features or functionality of the software.
21+
22+
You may not move, change, disable, or circumvent the license key functionality
23+
in the software, and you may not remove or obscure any functionality in the
24+
software that is protected by the license key.
25+
26+
You may not alter, remove, or obscure any licensing, copyright, or other notices
27+
of the licensor in the software. Any use of the licensor’s trademarks is subject
28+
to applicable law.
29+
30+
## Patents
31+
32+
The licensor grants you a license, under any patent claims the licensor can
33+
license, or becomes able to license, to make, have made, use, sell, offer for
34+
sale, import and have imported the software, in each case subject to the
35+
limitations and conditions in this license. This license does not cover any
36+
patent claims that you cause to be infringed by modifications or additions to
37+
the software. If you or your company make any written claim that the software
38+
infringes or contributes to infringement of any patent, your patent license for
39+
the software granted under these terms ends immediately. If your company makes
40+
such a claim, your patent license ends immediately for work on behalf of your
41+
company.
42+
43+
## Notices
44+
45+
You must ensure that anyone who gets a copy of any part of the software from you
46+
also gets a copy of these terms.
47+
48+
If you modify the software, you must include in any modified copies of the
49+
software prominent notices stating that you have modified the software.
50+
51+
## No Other Rights
52+
53+
These terms do not imply any licenses other than those expressly granted in
54+
these terms.
55+
56+
## Termination
57+
58+
If you use the software in violation of these terms, such use is not licensed,
59+
and your licenses will automatically terminate. If the licensor provides you
60+
with a notice of your violation, and you cease all violation of this license no
61+
later than 30 days after you receive that notice, your licenses will be
62+
reinstated retroactively. However, if you violate these terms after such
63+
reinstatement, any additional violation of these terms will cause your licenses
64+
to terminate automatically and permanently.
65+
66+
## No Liability
67+
68+
_As far as the law allows, the software comes as is, without any warranty or
69+
condition, and the licensor will not be liable to you for any damages arising
70+
out of these terms or the use or nature of the software, under any kind of
71+
legal claim._
72+
73+
## Definitions
74+
75+
The **licensor** is the entity offering these terms, and the **software** is the
76+
software the licensor makes available under these terms, including any portion
77+
of it.
78+
79+
**you** refers to the individual or entity agreeing to these terms.
80+
81+
**your company** is any legal entity, sole proprietorship, or other kind of
82+
organization that you work for, plus all organizations that have control over,
83+
are under the control of, or are under common control with that
84+
organization. **control** means ownership of substantially all the assets of an
85+
entity, or the power to direct its management and policies by vote, contract, or
86+
otherwise. Control can be direct or indirect.
87+
88+
**your licenses** are all the licenses granted to you for the software under
89+
these terms.
90+
91+
**use** means anything you do with the software requiring one of your licenses.
92+
93+
**trademark** means trademarks, service marks, and similar rights.

README.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ This is the frontend marble monorepo. We use `pnpm` to handle dependancies.
66

77
This README is a global README for the monorepo. Each package may have its own README. You can find them in the `packages/*/README.md` files.
88

9-
### Install pnpm
9+
### Installations
10+
11+
#### Install pnpm
1012

1113
```bash
1214
brew install pnpm
@@ -20,19 +22,19 @@ To enable shell autocompletion (works for bash, zsh and fish), run:
2022
pnpm install-completion
2123
```
2224

23-
### Install dependancies
25+
#### Install dependancies
2426

2527
```bash
2628
pnpm install
2729
```
2830

29-
#### (VSCode) Install recommended VSCode extensions
31+
##### (VSCode) Install recommended VSCode extensions
3032

3133
There is a recommended extensions list in the `.vscode/extensions.json` file.
3234

3335
All required configuration settings are already included inside the `.vscode/settings.json` file.
3436

35-
### Work in a package
37+
### Launch
3638

3739
Each packages are located in the `packages` folder. To work in a package, you can use the `--filter` option of `pnpm` to trigger the dedicated scripts present in each `packages/*/package.json`. Exemple to start the app builder in dev mode:
3840

@@ -41,15 +43,16 @@ Each packages are located in the `packages` folder. To work in a package, you ca
4143
pnpm --filter app-builder run dev
4244
```
4345

44-
#### (VSCode) Use launch configuration
46+
> We use `pnpm` monorepo capabilities. More informations :
47+
>
48+
> - [filtering](https://pnpm.io/filtering)
49+
> - [workspace](https://pnpm.io/workspaces)
4550
46-
When available, you can use VSCode launch configuration to run the package scripts. You can find them in the `.vscode/launch.json` file.
47-
48-
### Some usefull commands
51+
#### Some usefull commands
4952

5053
```bash
5154
# Start the builder app in dev mode
52-
pnpm --filter app-builder run dev --debug
55+
pnpm --filter app-builder run dev
5356

5457
# Generate the marble-api client
5558
pnpm --filter marble-api run generate-api
@@ -61,7 +64,13 @@ pnpm --filter ui-design-system run storybook
6164
pnpm --filter ui-icons run generate-icons
6265
```
6366

64-
### How to check the code locally like the CI
67+
#### (VSCode) Use launch configuration
68+
69+
When available, you can use VSCode launch configuration to run the package scripts. You can find them in the `.vscode/launch.json` file.
70+
71+
### Developpement
72+
73+
#### How to check the code locally like the CI
6574

6675
```bash
6776
pnpm run -r type-check && pnpm run -r lint && pnpm run format:check

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
},
1313
"devDependencies": {
1414
"@vitejs/plugin-react": "4.2.1",
15-
"@vitest/coverage-v8": "^1.1.3",
16-
"@vitest/ui": "1.1.3",
15+
"@vitest/coverage-v8": "^1.2.1",
16+
"@vitest/ui": "1.2.1",
1717
"prettier": "^3.1.1",
1818
"prettier-plugin-tailwindcss": "^0.5.11",
1919
"react-refresh": "^0.14.0",
2020
"typescript": "5.3.3",
21-
"vite-tsconfig-paths": "^4.2.3",
22-
"vitest": "1.1.3"
21+
"vite-tsconfig-paths": "^4.3.1",
22+
"vitest": "1.2.1"
2323
}
2424
}

packages/app-builder/README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# App builder
22

3-
This is the app builder package.
3+
This is the app builder package, it contains the main application code.
44

55
## Getting started
66

@@ -23,13 +23,12 @@ The application is built using the Remix framework. You can find the documentati
2323
```bash
2424
# Start the builder app in dev mode
2525
pnpm --filter app-builder run dev
26-
27-
# Start the builder app in dev mode with debug
28-
pnpm --filter app-builder run dev --debug
2926
```
3027

3128
#### Add a new route
3229

30+
The app uses the [flat routes convention](https://github.com/kiliman/remix-flat-routes?tab=readme-ov-file#remix-v2-flat-routes-convention) to define routes. You can find the routes in `src/routes/`.
31+
3332
When adding a new route you need to run :
3433

3534
```bash

packages/app-builder/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@types/react": "18.2.48",
2828
"@types/react-dom": "18.2.18",
2929
"@types/swagger-ui-react": "^4.18.3",
30-
"eslint-plugin-tailwindcss": "^3.13.1",
30+
"eslint-plugin-tailwindcss": "^3.14.0",
3131
"jsdom": "23.2.0",
3232
"ora": "^8.0.1",
3333
"postcss": "^8.4.33",

packages/app-builder/src/components/Cases/CaseRightPanel.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const CaseRightPanelContent = () => {
8989
const { t } = useTranslation(casesI18n);
9090
return (
9191
<RightPanel.Content className="max-w-md">
92-
<ScrollArea.Root className="flex h-full w-full flex-col gap-4 p-4 lg:gap-6 lg:p-6">
92+
<ScrollArea.Root className="flex size-full flex-col gap-4 p-4 lg:gap-6 lg:p-6">
9393
<RightPanel.Title>
9494
<span className="w-full first-letter:capitalize">
9595
{t('cases:case.new_case')}

packages/app-builder/src/components/Decisions/DecisionRightPanel.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function DecisionRightPanelContent() {
9696

9797
return (
9898
<RightPanel.Content className="max-w-md">
99-
<ScrollArea.Root className="flex h-full w-full flex-col gap-4 p-4 lg:gap-6 lg:p-6">
99+
<ScrollArea.Root className="flex size-full flex-col gap-4 p-4 lg:gap-6 lg:p-6">
100100
<RightPanel.Title>
101101
<span className="w-full first-letter:capitalize">
102102
{t('decisions:add_to_case')}

packages/app-builder/src/components/Ping/CornerPing.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import clsx from 'clsx';
44
import { Ping } from './Ping';
55

66
const corner_ping = cva(
7-
'border-grey-00 absolute box-content h-[6px] w-[6px] border-2 text-red-100',
7+
'border-grey-00 absolute box-content size-[6px] border-2 text-red-100',
88
{
99
variants: {
1010
position: {

packages/app-builder/src/components/Ping/Ping.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export function Ping({ className }: { className?: string }) {
1414
className,
1515
)}
1616
>
17-
<span className="animate-ping-slow absolute inline-flex h-full w-full rounded-full bg-current opacity-75"></span>
18-
<span className="relative inline-flex h-full w-full rounded-full bg-current"></span>
17+
<span className="animate-ping-slow absolute inline-flex size-full rounded-full bg-current opacity-75"></span>
18+
<span className="relative inline-flex size-full rounded-full bg-current"></span>
1919
</span>
2020
);
2121
}

packages/app-builder/src/components/RightPanel.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function createRightPanel(name: string) {
2727
}: RightPanelRootProps) {
2828
const value = { open, onClose };
2929
return (
30-
<div className={clsx('relative flex h-full w-full', className)}>
30+
<div className={clsx('relative flex size-full', className)}>
3131
<Provider value={value}>
3232
<Dialog.Root
3333
modal={false}
@@ -55,7 +55,7 @@ export function createRightPanel(name: string) {
5555
onClose();
5656
}
5757
}}
58-
className={clsx('flex h-full w-full', className)}
58+
className={clsx('flex size-full', className)}
5959
aria-hidden="true"
6060
>
6161
{children}

packages/app-builder/src/components/Scenario/AstBuilder/AstBuilderNode/Default.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function Default({
3030
displayErrors ? getBorderColor(editorNodeViewModel) : 'grey-10'
3131
}
3232
className={clsx(
33-
'bg-grey-02 border-grey-02 flex h-fit min-h-[40px] w-fit min-w-[40px] items-center justify-between rounded border px-2 outline-none',
33+
'bg-grey-02 border-grey-02 flex size-fit min-h-[40px] min-w-[40px] items-center justify-between rounded border px-2 outline-none',
3434
// Border color variants
3535
'data-[border-color=grey-10]:border-grey-10',
3636
'data-[border-color=red-100]:border-red-100',

packages/app-builder/src/components/Scenario/AstBuilder/AstBuilderNode/Operand/OperandEditor/OperandTrigger.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const OperandTrigger = forwardRef<
2525
data-border-color={borderColor}
2626
className={clsx(
2727
'group',
28-
'h-fit min-h-[40px] w-fit min-w-[40px] rounded border px-2 outline-none',
28+
'size-fit min-h-[40px] min-w-[40px] rounded border px-2 outline-none',
2929
'radix-state-open:border-purple-100 radix-state-open:bg-purple-05',
3030
// Border color variants
3131
'enabled:radix-state-closed:data-[border-color=grey-10]:border-grey-10 enabled:radix-state-closed:data-[border-color=grey-10]:focus:border-purple-100',

packages/app-builder/src/components/Scenario/AstBuilder/AstBuilderNode/Operand/OperandLabel.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const OperandLabel = ({
7777
aria-label={ariaLabel}
7878
className={clsx(
7979
'text-s text-grey-100 group flex flex-row items-center justify-between gap-2 font-normal transition-colors',
80-
'h-fit min-h-[40px] w-fit min-w-[40px] rounded px-2',
80+
'size-fit min-h-[40px] min-w-[40px] rounded px-2',
8181
variant === 'edit' && 'bg-grey-00 group-radix-state-open:bg-purple-05',
8282
variant === 'view' && 'bg-grey-02',
8383
)}

packages/app-builder/src/components/Scenario/AstBuilder/AstBuilderNode/Operand/OperandTooltip.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function TypeInfos({
137137
key={tKey}
138138
className="inline-flex items-center gap-[2px] text-xs font-normal text-purple-50"
139139
>
140-
{icon ? <Icon icon={icon} className="h-3 w-3" /> : null}
140+
{icon ? <Icon icon={icon} className="size-3" /> : null}
141141
{t(tKey, { count: 1 })}
142142
</span>
143143
);

packages/app-builder/src/components/Scenario/AstBuilder/RemoveButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const RemoveButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
88
return (
99
<button
1010
className={clsx(
11-
'h-fit w-fit rounded-sm border p-1 text-xs transition-colors duration-200 ease-in-out',
11+
'size-fit rounded-sm border p-1 text-xs transition-colors duration-200 ease-in-out',
1212
'bg-grey-00 text-grey-25 border-grey-10',
1313
'hover:text-grey-00 hover:border-red-100 hover:bg-red-100',
1414
'active:bg-red-110 active:border-red-110',

packages/app-builder/src/components/Scenario/AstBuilder/RootAstBuilderNode/AddLogicalOperatorButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const AddLogicalOperatorButton = React.forwardRef<
1515
return (
1616
<button
1717
className={clsx(
18-
' flex h-fit w-fit flex-row items-center justify-center gap-1 rounded border-none px-4 py-2 outline-none',
18+
' flex size-fit flex-row items-center justify-center gap-1 rounded border-none px-4 py-2 outline-none',
1919
'text-grey-25 disabled:text-grey-50 text-xs font-semibold hover:text-purple-100',
2020
'hover:bg-purple-10 active:bg-grey-10 bg-grey-00 disabled:bg-grey-00 focus:border-purple-100',
2121
className,

packages/app-builder/src/components/Scenario/AstBuilder/RootAstBuilderNode/RootAnd.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export function RootAnd({
9393
return (
9494
<>
9595
<div className="text-s grid grid-cols-[8px_16px_max-content_1fr_max-content]">
96-
<div className="text-s bg-grey-02 col-span-4 flex h-fit min-h-[40px] w-fit min-w-[40px] flex-wrap items-center justify-center gap-1 rounded p-2 font-semibold text-purple-100">
96+
<div className="text-s bg-grey-02 col-span-4 flex size-fit min-h-[40px] min-w-[40px] flex-wrap items-center justify-center gap-1 rounded p-2 font-semibold text-purple-100">
9797
{builder.input.triggerObjectTable.name}
9898
</div>
9999
{rootAndViewModel.children.map((child, childIndex) => {

packages/app-builder/src/root.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ export function ErrorBoundary() {
125125
<Links />
126126
</head>
127127
<body className="selection:text-grey-00 h-screen w-full overflow-hidden antialiased selection:bg-purple-100">
128-
<div className="from-purple-10 to-grey-02 flex h-full w-full flex-col items-center bg-gradient-to-r">
129-
<div className="flex h-full w-full flex-col items-center bg-[url('/img/login_background.svg')] bg-no-repeat">
128+
<div className="from-purple-10 to-grey-02 flex size-full flex-col items-center bg-gradient-to-r">
129+
<div className="flex size-full flex-col items-center bg-[url('/img/login_background.svg')] bg-no-repeat">
130130
<div className="flex h-full max-h-80 flex-col justify-center">
131131
<Link to={getRoute('/sign-in')}>
132132
<Logo

packages/app-builder/src/routes/_auth+/_layout.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export default function AuthLayout() {
1212
const { t } = useTranslation(handle.i18n);
1313

1414
return (
15-
<div className="flex h-full w-full justify-center bg-gradient-to-r from-[#0b0a51] to-[#160524]">
16-
<div className="flex h-full w-full max-w-screen-xl flex-row justify-center gap-20 md:p-20">
15+
<div className="flex size-full justify-center bg-gradient-to-r from-[#0b0a51] to-[#160524]">
16+
<div className="flex size-full max-w-screen-xl flex-row justify-center gap-20 md:p-20">
1717
<div className="hidden flex-col justify-center gap-6 py-6 md:flex">
1818
<div className="flex h-fit flex-col justify-end gap-6">
1919
<h1 className="text-grey-00 text-balance text-[30px] font-medium leading-tight lg:text-[44px]">
@@ -36,15 +36,15 @@ export default function AuthLayout() {
3636
direction={1}
3737
autoplay
3838
renderer="svg"
39-
className="h-full w-full"
39+
className="size-full"
4040
/>
4141
</div>
4242
</div>
4343
<div className="flex w-full max-w-96 flex-col items-center justify-center">
4444
<div className="bg-grey-00 flex h-fit w-full flex-col items-center rounded-lg p-5 text-center sm:p-10">
4545
<Logo
4646
logo="logo-standard"
47-
className="text-grey-100 mb-6 h-full max-h-20 w-full max-w-60"
47+
className="text-grey-100 mb-6 size-full max-h-20 max-w-60"
4848
preserveAspectRatio="xMinYMid meet"
4949
aria-labelledby="marble"
5050
/>

packages/app-builder/src/routes/_builder+/_layout.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default function Builder() {
8181
<Logo
8282
logo="logo"
8383
aria-labelledby="marble logo"
84-
className="size-6 shrink-0 transition-all group-aria-expanded/nav:h-12 group-aria-expanded/nav:w-12"
84+
className="size-6 shrink-0 transition-all group-aria-expanded/nav:size-12"
8585
/>
8686
<Logo
8787
logo="marble"

packages/app-builder/src/routes/_builder+/scenarios+/$scenarioId+/i+/$iterationId+/_edit-view+/rules.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default function Rules() {
7575
<span className="flex items-center gap-2">
7676
<span className="flex w-2 items-center justify-center">
7777
{hasErrors ? (
78-
<Ping className="relative box-content h-[6px] w-[6px] border border-transparent text-red-100" />
78+
<Ping className="relative box-content size-[6px] border border-transparent text-red-100" />
7979
) : null}
8080
</span>
8181
<span>{getValue<string>()}</span>

packages/eslint-config/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# eslint-config
2+
3+
This is configs for [ESLint](https://eslint.org/) that provides a set of opinionated defaults that we use at Marble.

0 commit comments

Comments
 (0)