Skip to content

Commit ec7848f

Browse files
kmer2016thibautsaillynicolaswurtzElysaSrcYohh
authored
first steps of project industrialisation (#23)
* Added engine, zap fill and speed icons in 24 and 16 pixels * ESM only, typescript only * Change version name * Revert changes about rollup-dts & types * Repair types, add OSRDGenericIconType * Correct generic icon type * ui-icons: add union of icons, remove generic type * ui-speedspacechart: init - create-react-app ui-speedspacechart - add taillwindcss using PostCSS - copy /ui-core/styles/main.css to replace /ui-speedspacechart/index.css - import main.css in index.tsx, remove import from App.tsx - edit tailwind.config.js - add IBMPlex fonts to /public - add storybook, clean /stories - clean unnecessary files * - add storybook setup for tailwind - create speedSpaceChart story - create useCanvas custom hook - create: - SpeedSpaceChart.tsx - FrontInterractivityLayer.tsx - GridLayer.tsx - CurveLayer.tsx - add draw function in drawElements.ts - copy simulation consts and types from osrd - copy sampleData from osrd * - replace GridLayer with AxisLayerX and AxisLayerY - add ticks on axis - add d3 zoom function for zoom and reset - replace speed props with full store props * ui-warping: drafts project structure * ui-warping: drafts WarpedMap code Details: - Drafts WarpedMap, based on existing code from OSRD, but without all the business specific code - Drafts first story (but cannot run it because of missing data) TODO: - Add missing features: - Allow syncing bbox - Allow refining data (ie. reloading OSRD entities) - Allow adding custom buttons (to set bbox sync mode) - Add missing data to base story * ui-warping: first rendered map Details: - Adds sample paths and OSM styles - Adds an optional timeout to DataLoader - Fixes various minor issues to get a proper first rendered map TODO: - Add missing features, detailed in previous commit * ui-warping: drafts algorithms showcase * ui-warping: allows customizing warping Details: - Makes every setting from getWarping overridable - Adds inputs for all warping settings in algorithm showcase stories * ui-warping: improves story controls, fixes displayed grid * ui-warping: fixes rendering Details: - Intersects polygons with zone instead of clipping them (this makes large areas of water for instance being properly drawn around the grid) - Fixes various issues that caused properties to not be properly set to the warped data - Fixes TransformedDataMap filters to take source-layers into account * ui-warped-map: renames warping as warped-map * review project architecture - monorepo project with sub-packages which allow us to share dep, scripts, ... - rollup configuration (remove commonjs, babel, and adding postcss) - package.json with export - remove CRA trace - adding a stroybook package that read stories across project - adding lerna for release * merge all projects * Cnh/UI core/input (#16) * ui-core: implement anatomy input ui-core: use css instead of full tailwind class ui-core: handle small input ui-core: readme v1 ui-core: implement disabled & readonly ui-core: fix height of component, use bowshadow instead of border ui-core: fix small input ui-core: fix style on focus via keyboard ui-core: use box shadow fof leading/trailing iu-core: fix blur ui-core: implement token input fix border using box shadow ui-core: add form validation refacto style refacto. use scss power to handle small version of input more clearly * ui-core: wrap token input * ui-core: password input * Fix story book and styles * ui-core: export Input, TokenInput and PasswordInput --------- Co-authored-by: Benoit Simard <[email protected]> * osrd-ui: normalize eslint and prettier conf * osrd-ui: revert eslint config (#19) * github action to deploy osr-project to npm (#20) * ui-core: optimize rollup config for storybook hotreload * osrd-ui: build and check code (#22) * osrd-ui: build and check code * fix prettier error * osrd-ui: ignore prettier error from component generated by ui-icons * osrd-ui: enable hot reload only when we are in development --------- Co-authored-by: thibautsailly <[email protected]> Co-authored-by: Nicolas Wurtz <[email protected]> Co-authored-by: Nicolas Wurtz <[email protected]> Co-authored-by: Élysæ <[email protected]> Co-authored-by: Yohh <[email protected]> Co-authored-by: Alexis Jacomy <[email protected]> Co-authored-by: Benoit Simard <[email protected]> Co-authored-by: Mathieu Richard <[email protected]>
1 parent d36d830 commit ec7848f

File tree

121 files changed

+88387
-21962
lines changed

Some content is hidden

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

121 files changed

+88387
-21962
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.eslintrc

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint"],
5+
"ignorePatterns": ["*.css"],
6+
"extends": [
7+
"eslint:recommended", // ESLint recommended rules
8+
"plugin:react/recommended", // React recommended rules
9+
"plugin:@typescript-eslint/recommended", // TypeScript recommended rules
10+
"plugin:@typescript-eslint/eslint-recommended", // ESLint overrides for TypeScript
11+
"prettier", // Prettier rules
12+
"plugin:prettier/recommended", // Prettier plugin integration
13+
"plugin:react-hooks/recommended", // Recommended rules for React hooks
14+
"plugin:storybook/recommended", // Recommended rules for Storybook
15+
],
16+
"rules": {
17+
"react/prop-types": "off",
18+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
19+
},
20+
"settings": {
21+
"react": {
22+
"version": "detect",
23+
},
24+
},
25+
}

.github/workflows/icons-optimize.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
on:
1+
on:
22
# This workflow will be laucnhed manually and will trigger a new commit
33
# on the branc that is specified.
44
workflow_dispatch:
@@ -12,7 +12,7 @@ jobs:
1212

1313
- uses: actions/setup-python@v4
1414
with:
15-
python-version: '3.10'
15+
python-version: '3.10'
1616
cache: 'pip'
1717
- run: pip install -r .github/helpers/ui-icons/requirements.txt
1818
- run: |

.github/workflows/icons-publish.yml

-25
This file was deleted.

.github/workflows/osrd-ui-build.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Build osrd-ui
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v2
12+
with:
13+
node-version: '18'
14+
registry-url: 'https://registry.npmjs.org/'
15+
- run: |
16+
npm ci
17+
npm run build

.github/workflows/osrd-ui-publish.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish @osrd-project on Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: '18'
16+
registry-url: 'https://registry.npmjs.org/'
17+
- run: |
18+
npm ci
19+
npm run build
20+
VERSION=${GITHUB_REF/refs\/tags\//}
21+
lerna version $VERSION --no-private --no-git-tag-version --yes
22+
lerna publish
23+
env:
24+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
dist/
33
node_modules/
44
*.tgz
5+
storybook-static
56

67
# Direnv
78
.envrc

.prettierrc.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"arrowParens": "always",
5+
"proseWrap": "always",
6+
"trailingComma": "es5"
7+
}

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ Icons, fonts, colors, components and all user interface items for OSRD project.
44

55
## TODO
66

7-
We should write a README to explain the goal of the `osrd-ui` repository and the design system as the whole.
7+
We should write a README to explain the goal of the `osrd-ui` repository and the design system as
8+
the whole.
89

910
We should also explain how it is related to the `osrd-design` repository.
1011

1112
## Credits
1213

1314
### ui-icons
14-
15-
Inspired and taken from Primer/Octicons (https://github.com/primer/octicons). Distributed under the MIT license.

flake.lock

+2-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lerna.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3+
"version": "0.1.0",
4+
"private": false,
5+
"push": false,
6+
"includeMergedTags": true
7+
}

0 commit comments

Comments
 (0)