From dbbe006fd3c34a813d0ab01eecc2f43e335a9755 Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Sat, 2 May 2026 01:02:05 -0500 Subject: [PATCH 1/4] Check website format in CI (#2454) Add a command to lint the website to package.json, and update the workflow. Updates docs for linting as well. --------- Co-authored-by: Jade Turner --- .github/workflows/website.yml | 15 +++++++++++---- docs/source/docs/contributing/linting.md | 8 +++++++- website/package.json | 4 +++- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index e91edab79..d1e40b947 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -37,6 +37,9 @@ jobs: format-check: name: Check Formatting + defaults: + run: + working-directory: website runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 @@ -52,7 +55,11 @@ jobs: cache-dependency-path: website/pnpm-lock.yaml - name: Install Packages run: pnpm i --frozen-lockfile - working-directory: website - - name: Run Formatting Check - run: pnpm prettier -c . - working-directory: website + - run: | + set +e + pnpm run format-ci + exit_code=$? + if test "$exit_code" -ne "0"; then + echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html" + fi + exit $exit_code diff --git a/docs/source/docs/contributing/linting.md b/docs/source/docs/contributing/linting.md index 690113c68..8f8327370 100644 --- a/docs/source/docs/contributing/linting.md +++ b/docs/source/docs/contributing/linting.md @@ -34,10 +34,16 @@ To install *doc8*, the python tool we use to lint our documentation, run `pipx i To lint the documentation, run `doc8 docs` from the root level of the docs. +## Website + +### Formatting the website + +To format the website, run `pnpm -C website run format`. + ## Alias The following [alias](https://www.computerworld.com/article/1373210/how-to-use-aliases-in-linux-shell-commands.html) can be added to your shell config, which will allow you to lint the entirety of the PhotonVision project by running `pvLint`. The alias will work on Linux, macOS, Git Bash on Windows, and WSL. ```sh -alias pvLint='wpiformat -v && ./gradlew spotlessApply && pnpm -C photon-client lint && pnpm -C photon-client format && doc8 docs' +alias pvLint='wpiformat -v && ./gradlew spotlessApply && pnpm -C photon-client lint && pnpm -C photon-client format && doc8 docs && pnpm -C website format' ``` diff --git a/website/package.json b/website/package.json index 5bd26d8bb..a7d574b96 100644 --- a/website/package.json +++ b/website/package.json @@ -6,7 +6,9 @@ "scripts": { "dev": "vite", "build": "tsc && vite-ssg build", - "preview": "vite preview" + "preview": "vite preview", + "format": "prettier --write src/", + "format-ci": "prettier --check src/" }, "devDependencies": { "@toolwind/anchors": "^1.0.10", From 439f5fcd91bde178e045af8f747a4c89dd938232 Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Sat, 2 May 2026 01:47:32 -0500 Subject: [PATCH 2/4] Add presentation from CMP to website (#2453) --- website/src/App.vue | 73 ++++++------------ website/src/components/PresentationCard.vue | 63 +++++++++++++++ .../src/components/PresentationCarousel.vue | 77 +++++++++++++++++++ 3 files changed, 162 insertions(+), 51 deletions(-) create mode 100644 website/src/components/PresentationCard.vue create mode 100644 website/src/components/PresentationCarousel.vue diff --git a/website/src/App.vue b/website/src/App.vue index 8c08f8ca8..34cddc505 100644 --- a/website/src/App.vue +++ b/website/src/App.vue @@ -1,6 +1,7 @@