From b6fb7dff13e23e55d753beaf565f2246f9eecd22 Mon Sep 17 00:00:00 2001 From: awwpotato <153149335+awwpotato@users.noreply.github.com> Date: Mon, 4 Nov 2024 15:47:25 -0800 Subject: [PATCH 1/6] format on push/pull request --- .github/workflows/format.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..5620938 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,21 @@ +name: Format + +on: + push: + pull_request: + +jobs: + format: + runs-on: ubuntu-latest + name: Format Files + steps: + - uses: actions/checkout@v3 + - uses: oven-sh/setup-bun@v2 + - name: Prettier + run: bun run format + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: stefanzweifel/git-auto-commit-action@v4 + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + with: + commit_message: "style: format files" From a39d199d73649e7c8d1e3238b5ec3a8791c23550 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Mon, 4 Nov 2024 15:48:33 -0800 Subject: [PATCH 2/6] fix: bun install :3 --- .github/workflows/format.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 5620938..130c1b1 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -11,11 +11,12 @@ jobs: steps: - uses: actions/checkout@v3 - uses: oven-sh/setup-bun@v2 + - run: bun install - name: Prettier - run: bun run format + run: bun run format ./src env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} - uses: stefanzweifel/git-auto-commit-action@v4 if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} with: - commit_message: "style: format files" + commit_message: 'style: format files' From 7640acc25be13bf6e0467fd281d5af9befd8bf92 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Mon, 4 Nov 2024 23:59:44 +0000 Subject: [PATCH 3/6] style: format files --- .github/workflows/format.yml | 34 +++++++++++++-------------- README.md | 1 + bun.lockb | Bin 135231 -> 135231 bytes postcss.config.js | 10 ++++---- src/app.html | 20 ++++++++-------- src/lib/components/Action.svelte | 12 +++++++--- src/lib/components/Timeline.svelte | 2 +- src/lib/types.ts | 24 +++++++++---------- src/routes/+layout.svelte | 8 +++---- src/routes/+page.svelte | 8 ++----- src/routes/scout/+page.svelte | 8 ++++--- tailwind.config.js | 36 ++++++++++++++--------------- 12 files changed, 84 insertions(+), 79 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 130c1b1..79e544f 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,22 +1,22 @@ name: Format on: - push: - pull_request: + push: + pull_request: jobs: - format: - runs-on: ubuntu-latest - name: Format Files - steps: - - uses: actions/checkout@v3 - - uses: oven-sh/setup-bun@v2 - - run: bun install - - name: Prettier - run: bun run format ./src - env: - GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} - - uses: stefanzweifel/git-auto-commit-action@v4 - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - with: - commit_message: 'style: format files' + format: + runs-on: ubuntu-latest + name: Format Files + steps: + - uses: actions/checkout@v3 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - name: Prettier + run: bun run format ./src + env: + GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} + - uses: stefanzweifel/git-auto-commit-action@v4 + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + with: + commit_message: 'style: format files' diff --git a/README.md b/README.md index 3620165..337d398 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # inflatedchickens ## usage + ```bash # install dependencies bun i diff --git a/bun.lockb b/bun.lockb index 1cffc2ef16fac1d58fa2c713a32841f0f8f7049d..1e6848d8cadde3a7c1e13459388e0f145ed6555e 100755 GIT binary patch delta 79 zcmdnLfMfpxj)pCa_tO~-r$0z%lr%GDU;rWp1qOzO6KBr7k_w2^<6w-l&@(jBGhzq^ Z%18ob(r(&s3e~lE3YXcgpTQ`w0szx~7SsR$ delta 79 zcmdnLfMfpxj)pCa_tO~-rawq$lr%G9U@&H2U{GLSXgG1^+$*VoI6V%=I14>PLp=kA aV4#d7P$uoB{iaY|i>Gjz?fMyv0xJO0gBHvH diff --git a/postcss.config.js b/postcss.config.js index 2e7af2b..0f77216 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,6 @@ export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/src/app.html b/src/app.html index 165a387..00b6bae 100644 --- a/src/app.html +++ b/src/app.html @@ -1,12 +1,12 @@ - + - - - - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ diff --git a/src/lib/components/Action.svelte b/src/lib/components/Action.svelte index 647d543..53dcd92 100644 --- a/src/lib/components/Action.svelte +++ b/src/lib/components/Action.svelte @@ -1,11 +1,17 @@ - diff --git a/src/lib/components/Timeline.svelte b/src/lib/components/Timeline.svelte index 820141d..9d6700a 100644 --- a/src/lib/components/Timeline.svelte +++ b/src/lib/components/Timeline.svelte @@ -2,7 +2,7 @@ import type { ActionData } from '$lib/types'; import Action from './Action.svelte'; - let { actions = $bindable() }: { actions: ActionData[] } = $props() + let { actions = $bindable() }: { actions: ActionData[] } = $props();
diff --git a/src/lib/types.ts b/src/lib/types.ts index 3b0d357..712d52b 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -1,19 +1,19 @@ export enum actionType { - IntakeTote = 'Intake Tote', - EjectTote = 'Eject Tote', - IntakeBalloon = 'Intake Balloon', - ScoreLow = 'Score Low', - ScoreExternalTote = 'Score External Tote', - ScoreInternalTote = 'Score Internal Tote', - ScoreAnotherRobotsTote = 'Score Another Robots Tote' + IntakeTote = 'Intake Tote', + EjectTote = 'Eject Tote', + IntakeBalloon = 'Intake Balloon', + ScoreLow = 'Score Low', + ScoreExternalTote = 'Score External Tote', + ScoreInternalTote = 'Score Internal Tote', + ScoreAnotherRobotsTote = 'Score Another Robots Tote' } export enum actionResult { - success = 'success', - fail = 'fail' + success = 'success', + fail = 'fail' } export type ActionData = { - type: actionType; - result: actionResult; -} + type: actionType; + result: actionResult; +}; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index b5cccfa..8ee9618 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,12 +1,12 @@ +{@render children()} + - -{@render children()} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 28b1357..78fc900 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,8 +1,4 @@
-

- hiiii :3 -

- - scout - +

hiiii :3

+ scout
diff --git a/src/routes/scout/+page.svelte b/src/routes/scout/+page.svelte index e6b4fb4..2de844f 100644 --- a/src/routes/scout/+page.svelte +++ b/src/routes/scout/+page.svelte @@ -13,8 +13,10 @@
- + - - + +
diff --git a/tailwind.config.js b/tailwind.config.js index d8fb534..b96a0a2 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,20 +1,20 @@ /** @type {import('tailwindcss').Config} */ export default { - content: ['./src/**/*.{html,js,svelte,ts}'], - theme: { - colors: { - "navbar_black": "#1c1c1c", - "outline_gray": "#c2c2c2", - "cresc_green": "#00d586", - "bg_gray": "#2c2c2c", - "slack_purple": "#4A154B", - "robot_blue": "#0083E6", - "robot_red": "#ED1C24", - "fail_red": "#EE3C42", - "btn_grey": "#5C5C5C", - "text_white": "#ffffff" - }, - extend: {}, - }, - plugins: [], -} + content: ['./src/**/*.{html,js,svelte,ts}'], + theme: { + colors: { + navbar_black: '#1c1c1c', + outline_gray: '#c2c2c2', + cresc_green: '#00d586', + bg_gray: '#2c2c2c', + slack_purple: '#4A154B', + robot_blue: '#0083E6', + robot_red: '#ED1C24', + fail_red: '#EE3C42', + btn_grey: '#5C5C5C', + text_white: '#ffffff' + }, + extend: {} + }, + plugins: [] +}; From 3d87c93610d6660d5f584dfaaae18cb0851c7001 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Mon, 4 Nov 2024 16:02:27 -0800 Subject: [PATCH 4/6] fix pretter formating --- .editorconfig | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a882442 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 From 9e5ea52b81d4b8d0dbf7614ab6341ed8c4f314f1 Mon Sep 17 00:00:00 2001 From: "Nate L." <146988904+NateLydem@users.noreply.github.com> Date: Tue, 5 Nov 2024 00:04:56 +0000 Subject: [PATCH 5/6] moved actions to top of timeline (#2) --- src/lib/components/Timeline.svelte | 9 +++++---- src/routes/scout/+page.svelte | 14 ++++++-------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/lib/components/Timeline.svelte b/src/lib/components/Timeline.svelte index 9d6700a..b9821a8 100644 --- a/src/lib/components/Timeline.svelte +++ b/src/lib/components/Timeline.svelte @@ -2,15 +2,16 @@ import type { ActionData } from '$lib/types'; import Action from './Action.svelte'; - let { actions = $bindable() }: { actions: ActionData[] } = $props(); + let { actions = $bindable() }: { actions: ActionData[] } = $props() + let latestActions: ActionData[] = $derived(actions.toReversed().slice(0, 5))
- {#each actions as _, i} + {#each latestActions as _, i} { - actions.splice(i, 1); + actions.splice(actions.indexOf(latestActions[i]), 1); }} /> {/each} diff --git a/src/routes/scout/+page.svelte b/src/routes/scout/+page.svelte index 2de844f..cec9c99 100644 --- a/src/routes/scout/+page.svelte +++ b/src/routes/scout/+page.svelte @@ -4,19 +4,17 @@ function addAction() { //everything here is for testing, as there is no system for this yet - latestActions.push({ type: actionType.ScoreAnotherRobotsTote, result: actionResult.success }); - latestActions.push({ type: actionType.EjectTote, result: actionResult.fail }); - latestActions.push({ type: actionType.IntakeTote, result: actionResult.success }); + actions.push({ type: actionType.ScoreAnotherRobotsTote, result: actionResult.success }); + actions.push({ type: actionType.EjectTote, result: actionResult.fail }); + actions.push({ type: actionType.IntakeTote, result: actionResult.success }); } - let latestActions: ActionData[] = $state([]); + let actions: ActionData[] = $state([]);
- + - +
From 783123e843acea9b1cf13342de7759439f46ad52 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Tue, 5 Nov 2024 00:06:56 +0000 Subject: [PATCH 6/6] style: format files --- src/lib/components/Timeline.svelte | 4 ++-- src/routes/+page.svelte | 4 +++- src/routes/scout/+page.svelte | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/lib/components/Timeline.svelte b/src/lib/components/Timeline.svelte index b9821a8..bb6bece 100644 --- a/src/lib/components/Timeline.svelte +++ b/src/lib/components/Timeline.svelte @@ -2,8 +2,8 @@ import type { ActionData } from '$lib/types'; import Action from './Action.svelte'; - let { actions = $bindable() }: { actions: ActionData[] } = $props() - let latestActions: ActionData[] = $derived(actions.toReversed().slice(0, 5)) + let { actions = $bindable() }: { actions: ActionData[] } = $props(); + let latestActions: ActionData[] = $derived(actions.toReversed().slice(0, 5));
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 78fc900..aefc4d7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,4 +1,6 @@

hiiii :3

- scout + + scout +
diff --git a/src/routes/scout/+page.svelte b/src/routes/scout/+page.svelte index cec9c99..1980012 100644 --- a/src/routes/scout/+page.svelte +++ b/src/routes/scout/+page.svelte @@ -13,8 +13,10 @@
- + - +