Skip to content

Commit

Permalink
Merge branch 'main' into jz/resurrect-triptych-react-app
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaddox5 committed May 6, 2024
2 parents 0a52af3 + f6232cf commit 4f271d6
Show file tree
Hide file tree
Showing 48 changed files with 3,720 additions and 775 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ jobs:
- working-directory: ./assets
run: npm run format:check

js-lint:
name: Frontend Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- working-directory: ./assets
run: npm run lint:errors

js-types:
name: Frontend Types
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
elixir 1.15.7-otp-26
erlang 26.2
nodejs 16.20.2
nodejs 18.20.2
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN mix do local.hex --force, local.rebar --force
RUN mix do deps.get --only prod

# next, build the frontend assets within a Node.JS container
FROM node:16 as assets-builder
FROM node:18 as assets-builder

WORKDIR /root
ADD . .
Expand Down
1 change: 1 addition & 0 deletions assets/css/bus_shelter_v2.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
@import "v2/multi_screen_page";

@import "v2/simulation_common";
@import "v2/lcd_common/simulation";
@import "v2/bus_shelter/simulation";

body {
Expand Down
3 changes: 3 additions & 0 deletions assets/css/busway_v2.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
@import "v2/busway/departures_no_data";
@import "v2/lcd_common/departures_no_data";

@import "v2/simulation_common";
@import "v2/lcd_common/simulation";

body {
margin: 0px;
}
Expand Down
36 changes: 0 additions & 36 deletions assets/css/v2/bus_shelter/simulation.scss
Original file line number Diff line number Diff line change
@@ -1,40 +1,4 @@
.simulation-screen-scrolling-container {
scrollbar-color: #607180 #2e3f4d;

&::-webkit-scrollbar {
width: 12px;
}
&::-webkit-scrollbar-thumb {
background-color: #607180;
border-radius: 12px;
border: 2px solid #2e3f4d;
}
&::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
border-radius: 12px;
background-color: #2e3f4d;
}
}

.simulation-screen-scrolling-container {
display: flex;
overflow-y: hidden;
overflow-x: auto;
padding-bottom: 20px;

.simulation__full-page {
height: 344px;
width: 193.5px;
margin-right: 24px;
z-index: 999;
box-shadow: 0px 0px 32px 0px #00000040;

& > * {
transform-origin: top left;
transform: scale(17.92%);
}
}

.simulation__flex-zone {
background: #2e3f4d;
display: flex;
Expand Down
36 changes: 36 additions & 0 deletions assets/css/v2/lcd_common/simulation.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.simulation-screen-scrolling-container {
display: flex;
overflow-y: hidden;
overflow-x: auto;
padding-bottom: 20px;
scrollbar-color: #607180 #2e3f4d;

&::-webkit-scrollbar {
width: 12px;
}

&::-webkit-scrollbar-thumb {
background-color: #607180;
border-radius: 12px;
border: 2px solid #2e3f4d;
}

&::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
border-radius: 12px;
background-color: #2e3f4d;
}

.simulation__full-page {
height: 344px;
width: 193.5px;
margin-right: 24px;
z-index: 999;
box-shadow: 0px 0px 32px 0px #00000040;

& > * {
transform-origin: top left;
transform: scale(17.92%);
}
}
}
35 changes: 35 additions & 0 deletions assets/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
import eslintConfigPrettier from "eslint-config-prettier";

export default [
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReactConfig,
eslintConfigPrettier,
{
settings: { react: { version: "detect" } },
rules: {
"no-empty": ["error", { allowEmptyCatch: true }],
"react/display-name": "warn",
"react/prop-types": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": [
// https://typescript-eslint.io/rules/no-unused-vars/
"error",
{
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
},
},
];
Loading

0 comments on commit 4f271d6

Please sign in to comment.