-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'codeforboston:main' into main
- Loading branch information
Showing
92 changed files
with
6,623 additions
and
4,056 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ on: | |
push: | ||
branches: | ||
- main | ||
# - dev | ||
- gha-deployment | ||
- dev | ||
pull_request: {} | ||
|
||
env: | ||
|
@@ -24,7 +25,7 @@ permissions: | |
jobs: | ||
lint: | ||
name: ⬣ ESLint | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v3 | ||
|
@@ -50,7 +51,7 @@ jobs: | |
|
||
typecheck: | ||
name: ʦ TypeScript | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v3 | ||
|
@@ -73,7 +74,7 @@ jobs: | |
|
||
vitest: | ||
name: ⚡ Vitest pyodide.test.ts | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v3 | ||
|
@@ -100,7 +101,7 @@ jobs: | |
# playwright tests work great but slight jank/inconsistency passing, and not used yet, so disabling for now | ||
# playwright: | ||
# name: 🎭 Playwright | ||
# runs-on: ubuntu-latest | ||
# runs-on: ubuntu-22.04 | ||
# timeout-minutes: 60 | ||
# steps: | ||
# - name: ⬇️ Checkout repo | ||
|
@@ -155,46 +156,46 @@ jobs: | |
# path: playwright-report/ | ||
# retention-days: 30 | ||
|
||
# deploy: | ||
# name: 🚀 Deploy | ||
# runs-on: ubuntu-latest | ||
# needs: [lint, typecheck, vitest, playwright] | ||
# # only build/deploy main branch on pushes | ||
# if: | ||
# ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && | ||
# github.event_name == 'push' }} | ||
deploy: | ||
name: 🚀 Deploy | ||
runs-on: ubuntu-latest | ||
needs: [lint, typecheck, vitest] #, playwright] | ||
# only build/deploy main branch on pushes | ||
if: | ||
${{ (github.ref == 'refs/heads/gha-deployment' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && | ||
github.event_name == 'push' }} | ||
|
||
# steps: | ||
# - name: ⬇️ Checkout repo | ||
# uses: actions/checkout@v3 | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
# - name: 👀 Read app name | ||
# uses: SebRollen/[email protected] | ||
# id: app_name | ||
# with: | ||
# file: 'fly.toml' | ||
# field: 'app' | ||
|
||
# # move Dockerfile to root | ||
# - name: 🚚 Move Dockerfile | ||
# run: | | ||
# mv ./other/Dockerfile ./Dockerfile | ||
# mv ./other/.dockerignore ./.dockerignore | ||
|
||
# - name: 🎈 Setup Fly | ||
# uses: superfly/flyctl-actions/[email protected] | ||
|
||
# - name: 🚀 Deploy Staging | ||
# if: ${{ github.ref == 'refs/heads/dev' }} | ||
# run: | ||
# flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | ||
# --app ${{ steps.app_name.outputs.value }}-staging | ||
# env: | ||
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
|
||
# - name: 🚀 Deploy Production | ||
# if: ${{ github.ref == 'refs/heads/main' }} | ||
# run: | ||
# flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | ||
# env: | ||
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
- name: 👀 Read app name | ||
uses: SebRollen/[email protected] | ||
id: app_name | ||
with: | ||
file: '${{ env.working-directory }}/fly.toml' | ||
field: 'app' | ||
|
||
# move Dockerfile to root | ||
- name: 🚚 Move Dockerfile | ||
run: | | ||
mv ./other/Dockerfile ./Dockerfile | ||
mv ./other/.dockerignore ./.dockerignore | ||
- name: 🎈 Setup Fly | ||
uses: superfly/flyctl-actions/[email protected] | ||
|
||
- name: 🚀 Deploy Staging | ||
if: ${{ github.ref == 'refs/heads/dev' }} | ||
run: | ||
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | ||
--app ${{ steps.app_name.outputs.value }}-staging | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
|
||
- name: 🚀 Deploy Production | ||
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/gha-deployment' }} | ||
run: | ||
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"recommendations": [ | ||
"bradlc.vscode-tailwindcss", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"prisma.prisma", | ||
"qwtel.sqlite-viewer", | ||
"yoavbls.pretty-ts-errors", | ||
"github.vscode-github-actions" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { useNavigation } from '@remix-run/react' | ||
import { useEffect, useRef, useState } from 'react' | ||
import { useSpinDelay } from 'spin-delay' | ||
import { cn } from '#app/utils/misc.tsx' | ||
import { Icon } from './ui/icon.tsx' | ||
|
||
function EpicProgress() { | ||
const transition = useNavigation() | ||
const busy = transition.state !== 'idle' | ||
const delayedPending = useSpinDelay(busy, { | ||
delay: 600, | ||
minDuration: 400, | ||
}) | ||
const ref = useRef<HTMLDivElement>(null) | ||
const [animationComplete, setAnimationComplete] = useState(true) | ||
|
||
useEffect(() => { | ||
if (!ref.current) return | ||
if (delayedPending) setAnimationComplete(false) | ||
|
||
const animationPromises = ref.current | ||
.getAnimations() | ||
.map(({ finished }) => finished) | ||
|
||
Promise.allSettled(animationPromises).then(() => { | ||
if (!delayedPending) setAnimationComplete(true) | ||
}) | ||
}, [delayedPending]) | ||
|
||
return ( | ||
<div | ||
role="progressbar" | ||
aria-hidden={delayedPending ? undefined : true} | ||
aria-valuetext={delayedPending ? 'Loading' : undefined} | ||
className="fixed inset-x-0 left-0 top-0 z-50 h-[0.20rem] animate-pulse" | ||
> | ||
<div | ||
ref={ref} | ||
className={cn( | ||
'h-full w-0 bg-foreground duration-500 ease-in-out', | ||
transition.state === 'idle' && | ||
(animationComplete | ||
? 'transition-none' | ||
: 'w-full opacity-0 transition-all'), | ||
delayedPending && transition.state === 'submitting' && 'w-5/12', | ||
delayedPending && transition.state === 'loading' && 'w-8/12', | ||
)} | ||
/> | ||
{delayedPending && ( | ||
<div className="absolute flex items-center justify-center"> | ||
<Icon | ||
name="update" | ||
size="md" | ||
className="m-1 animate-spin text-foreground" | ||
aria-hidden | ||
/> | ||
</div> | ||
)} | ||
</div> | ||
) | ||
} | ||
|
||
export { EpicProgress } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.