Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init app #187

Merged
merged 51 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e8c66af
basic scaffold
vincerubinetti Feb 16, 2024
d89370a
basic components
vincerubinetti Feb 16, 2024
c05c119
add basic state and player
vincerubinetti Feb 16, 2024
ceab720
basic state control
vincerubinetti Feb 16, 2024
e874927
touchup select and checkbox
vincerubinetti Feb 16, 2024
7824e8a
add basic data loading from github
vincerubinetti Feb 16, 2024
86257c4
tweaks, fixes, blocker
vincerubinetti Feb 16, 2024
29b4c30
renames, add title and desc editors
vincerubinetti Feb 17, 2024
652573b
homepage
vincerubinetti Feb 17, 2024
e7d570a
fix checkbox
vincerubinetti Feb 17, 2024
54abd8f
add data pre-processing
vincerubinetti Feb 18, 2024
2d53cc0
add some gh actions
vincerubinetti Feb 18, 2024
345ce83
incorp review comments
vincerubinetti Feb 20, 2024
303793a
fixes
vincerubinetti Feb 20, 2024
58a61e7
Merge remote-tracking branch 'origin/main' into app
vincerubinetti Feb 20, 2024
c601bf4
fixes
vincerubinetti Feb 20, 2024
df99b55
Add initial average characters per second data for each language
3b1b Feb 21, 2024
5650db7
Change base url (#179)
3b1b Feb 21, 2024
dbd796b
add legacy translations, avg char per sec, tweaks
vincerubinetti Feb 22, 2024
cb6dc9e
fixes, tweaks, refactor
vincerubinetti Feb 26, 2024
a697f16
fixes
vincerubinetti Feb 26, 2024
853fee4
basic submittal
vincerubinetti Feb 27, 2024
8932980
update actions
vincerubinetti Feb 27, 2024
9ae53aa
fix gh-actions
vincerubinetti Feb 27, 2024
59ddc7d
move lock alert to end of data loader
vincerubinetti Feb 27, 2024
f03f59f
Update README
3b1b Feb 27, 2024
b64b317
Grammar fixes in README
3b1b Feb 27, 2024
0bc4c6b
Update app/src/data/data.ts
vincerubinetti Feb 27, 2024
49094e9
Update app/src/data/data.ts
vincerubinetti Feb 27, 2024
5cb4adf
Update app/src/pages/home/Completion.tsx
vincerubinetti Feb 27, 2024
d0aadca
Update app/src/components/Badge.tsx
vincerubinetti Feb 27, 2024
2e08a31
lint
vincerubinetti Feb 27, 2024
c17a65d
Change cloud end point to 3b1b ones
3b1b Feb 27, 2024
8fe1d0e
Remove check for existing branch
3b1b Feb 27, 2024
342da7c
Preserve video orders
3b1b Feb 27, 2024
9caa09a
Merge branch 'main' into app
3b1b Feb 27, 2024
89e8a6b
Merge branch 'app' of https://github.com/3b1b/captions into app
3b1b Feb 27, 2024
d7c4648
Remove commended out check for existing branch
3b1b Feb 27, 2024
2861b7a
Abstract out maxCharsAllowed
3b1b Feb 27, 2024
877d772
Update convert, revert and type _Entry to reflect full key structure
3b1b Feb 27, 2024
17de32f
Switch to use start and end times in sentence_translation files
3b1b Feb 27, 2024
71f1c77
Don't use startingOriginal in translationMax
3b1b Feb 27, 2024
d617247
Trying out lower multiplicative buff, longer additive one.
3b1b Feb 27, 2024
ecdbfc3
review comments, lint
vincerubinetti Feb 27, 2024
9a197ee
add router loading status
vincerubinetti Feb 28, 2024
0ba7e9b
remove loader fallback
vincerubinetti Feb 28, 2024
40d3aab
arrow func to regular
vincerubinetti Feb 28, 2024
562a725
try fix
vincerubinetti Feb 28, 2024
5ac76ff
Update README
3b1b Feb 28, 2024
9adf3c5
Merge branch 'app' of https://github.com/3b1b/captions into app
3b1b Feb 28, 2024
b7631ae
fix bug
vincerubinetti Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Pull Request Labeler"

on:
- pull_request_target
- pull_request_target

jobs:
labeler:
Expand All @@ -9,4 +10,4 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
- uses: actions/labeler@v5
113 changes: 113 additions & 0 deletions .github/workflows/test-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: Test app

on:
pull_request:
paths:
- "app/**"

env:
CACHE_PATH: |
app/node_modules

defaults:
run:
working-directory: ./app

jobs:
# build cache for rest of jobs
install-cache:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v1

- if: runner.debug == '1'
uses: mxschmitt/action-tmate@v3

- name: Install packages
run: bun install

- name: Define cache key
id: define-key
run: echo "key=${{ hashFiles('app/bun.lockb') }}" >> $GITHUB_OUTPUT

- name: Store cache
uses: actions/cache@v4
with:
path: ${{ env.CACHE_PATH }}
key: ${{ steps.define-key.outputs.key }}

outputs:
cache-key: ${{ steps.define-key.outputs.key }}

# test that app can build without issues
test-build:
runs-on: ubuntu-latest
needs: install-cache
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v1

- name: Restore cache
uses: actions/cache@v4
with:
path: ${{ env.CACHE_PATH }}
key: ${{ needs.install-cache.outputs.cache-key }}

- if: runner.debug == '1'
uses: mxschmitt/action-tmate@v3

- name: Run test
run: bun run build

# test that app has no typescript errors
test-types:
runs-on: ubuntu-latest
needs: install-cache
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v1

- name: Restore cache
uses: actions/cache@v4
with:
path: ${{ env.CACHE_PATH }}
key: ${{ needs.install-cache.outputs.cache-key }}

- if: runner.debug == '1'
uses: mxschmitt/action-tmate@v3

- name: Run test
run: bun run test:types

# test that app is properly formatted and linted
test-lint:
runs-on: ubuntu-latest
needs: install-cache
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v1

- name: Restore cache
uses: actions/cache@v4
with:
path: ${{ env.CACHE_PATH }}
key: ${{ needs.install-cache.outputs.cache-key }}

- if: runner.debug == '1'
uses: mxschmitt/action-tmate@v3

- name: Run test
run: bun run test:lint
33 changes: 33 additions & 0 deletions .github/workflows/update-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Update app data

on:
pull_request:
workflow_dispatch:

defaults:
run:
working-directory: ./app

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v1

- if: runner.debug == '1'
uses: mxschmitt/action-tmate@v3

- name: Install packages
run: bun install

- name: Run update
run: bun run update

- name: Commit updated data
uses: stefanzweifel/git-auto-commit-action@v5
vincerubinetti marked this conversation as resolved.
Show resolved Hide resolved
with:
commit_message: "Update data"
3 changes: 3 additions & 0 deletions app/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VITE_TITLE=3Blue1Brown Translations
VITE_DESCRIPTION=Community contributed translations for 3Blue1Brown content.
VITE_URL=http://translation.3blue1brown.com/
25 changes: 25 additions & 0 deletions app/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
17 changes: 17 additions & 0 deletions app/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"root": true,
"env": { "browser": true, "es2020": true },
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended"
],
"ignorePatterns": ["dist"],
"parser": "@typescript-eslint/parser",
"plugins": ["react-refresh", "prettier"],
"rules": {
"prettier/prettier": "warn",
"@typescript-eslint/no-unused-vars": "warn"
}
}
3 changes: 3 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
.DS_Store
2 changes: 2 additions & 0 deletions app/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
16 changes: 16 additions & 0 deletions app/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"plugins": [
"@ianvs/prettier-plugin-sort-imports",
"prettier-plugin-css-order"
],
"importOrder": [
"^react",
"^[a-zA-Z]",
"^@[a-zA-Z]",
"^@/",
"^/",
"^./",
"^../"
],
"cssDeclarationSorterOrder": "smacss"
}
23 changes: 23 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Web app frontend

This project was scaffolded using Vite, and has the following key features:

- React 18
- TypeScript, for static type checking
- ESLint, for code quality
- Prettier, for code formatting

## Requirements

- [Bun](https://bun.sh/)

## Commands

| Command | Description |
| ----------------- | ------------------------------------------------- |
| `bun install` | Install packages |
| `bun run dev` | Start local dev server with hot-reloading |
| `bun run build` | Build production version of app |
| `bun run preview` | Serve built version of app (must run build first) |
| `bun run lint` | Fix linting and formatting |
| `bun run test` | Run tests |
Binary file added app/bun.lockb
Binary file not shown.
Loading