From b0164363701a1e02d8aed858fd9432ce30c63724 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Wed, 21 Feb 2024 20:50:40 -0800 Subject: [PATCH 01/49] Add pa11y-ci for accesibility linting --- .github/workflows/ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9bbd36c0c..fafa0486f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -239,3 +239,57 @@ jobs: BUILD_DIR: . BUILD_ONLY: true TOKEN: fake-secret + + pa11y: + runs-on: ubuntu-latest + needs: [super-linter, test-code-examples, lint-tools, check-hide-lines, generate-assets, generate-errors, generate-wasm-examples, generate-community] + + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: generated-assets + path: content/assets + + - uses: actions/download-artifact@v4 + with: + name: generated-errors + path: content/learn/errors + + - uses: actions/download-artifact@v4 + with: + name: generated-wasm-examples + path: content/examples + + - uses: actions/download-artifact@v4 + with: + name: generated-wasm-examples-webgpu + path: content/examples-webgpu + + - uses: actions/download-artifact@v4 + with: + name: generated-community + path: content/community/people + + - name: Install NPM + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install Google Chrome + id: setup-chrome + uses: browser-actions/setup-chrome@v1 + with: + chrome-version: stable + + - name: Install Pa11y-CI + runs: npm install pa11y-ci + + - name: Create Pa11y-CI Config + uses: finnp/create-file-action@master + env: + FILE_NAME: ".pa11yci" + FILE_DATA: "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"${{ steps.setup-chrome.outputs.chrome-path }} \"\n }\n }\n}" + + - name: Run Pa11y-CI + runs: zola serve & npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml From 0ada9bd632d89428549443e1f31260721848acd9 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Wed, 21 Feb 2024 20:58:14 -0800 Subject: [PATCH 02/49] Fix typo in ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fafa0486f1..7418b868be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -283,7 +283,7 @@ jobs: chrome-version: stable - name: Install Pa11y-CI - runs: npm install pa11y-ci + run: npm install pa11y-ci - name: Create Pa11y-CI Config uses: finnp/create-file-action@master @@ -292,4 +292,4 @@ jobs: FILE_DATA: "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"${{ steps.setup-chrome.outputs.chrome-path }} \"\n }\n }\n}" - name: Run Pa11y-CI - runs: zola serve & npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml + run: zola serve & npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml From fd574b3e74f8e3570ada7f1e83be092e2fd54ebe Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Wed, 21 Feb 2024 21:13:52 -0800 Subject: [PATCH 03/49] Add installing zola to ci.yml --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7418b868be..6849276094 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -282,6 +282,11 @@ jobs: with: chrome-version: stable + - name: Install Zola + uses: taiki-e/install-action@v2 + with: + tool: zola@0.18.0 + - name: Install Pa11y-CI run: npm install pa11y-ci From 4f1a3c7984471bcc635d0a6e373c1498f0092114 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Wed, 21 Feb 2024 21:29:42 -0800 Subject: [PATCH 04/49] Try to make Zola run in background --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6849276094..d5ace0a61f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -296,5 +296,8 @@ jobs: FILE_NAME: ".pa11yci" FILE_DATA: "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"${{ steps.setup-chrome.outputs.chrome-path }} \"\n }\n }\n}" + - name: Serve Zola + run: zola serve & + - name: Run Pa11y-CI - run: zola serve & npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml + run: npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml From 64a60ba32d69c0f955dfa7039d864bbf7974cbea Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Wed, 21 Feb 2024 21:52:52 -0800 Subject: [PATCH 05/49] Try to make Zola run in background, again --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5ace0a61f..3c714de8e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -296,8 +296,9 @@ jobs: FILE_NAME: ".pa11yci" FILE_DATA: "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"${{ steps.setup-chrome.outputs.chrome-path }} \"\n }\n }\n}" - - name: Serve Zola - run: zola serve & - - name: Run Pa11y-CI - run: npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml + run: | + zola serve & + ping 127.0.0.1 -n 6 > nul + netstat -o -n -a | findstr 1111 + npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml From 6afe97aed9db33d8a75b6183bf5c61c425f8f02c Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Wed, 21 Feb 2024 22:10:25 -0800 Subject: [PATCH 06/49] Try to make this work --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c714de8e8..58f916234f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -298,7 +298,4 @@ jobs: - name: Run Pa11y-CI run: | - zola serve & - ping 127.0.0.1 -n 6 > nul - netstat -o -n -a | findstr 1111 - npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml + zola serve & ping 127.0.0.1 -n 6 > nul & npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml From 0eea1068ab7bbbed313d1878d9136beac62c75e2 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Wed, 21 Feb 2024 22:27:43 -0800 Subject: [PATCH 07/49] Try to make this work, again --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58f916234f..b905537063 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -287,15 +287,14 @@ jobs: with: tool: zola@0.18.0 - - name: Install Pa11y-CI - run: npm install pa11y-ci + - name: Install Pa11y-CI and Wait-on + run: npm install pa11y-ci wait-on - name: Create Pa11y-CI Config uses: finnp/create-file-action@master env: FILE_NAME: ".pa11yci" FILE_DATA: "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"${{ steps.setup-chrome.outputs.chrome-path }} \"\n }\n }\n}" - - name: Run Pa11y-CI - run: | - zola serve & ping 127.0.0.1 -n 6 > nul & npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml + run: zola serve & npx wait-on http://127.0.0.1:1111 && npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml + From dafbcba7b5f63d03530a9a22486c2d2b471980ca Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Wed, 21 Feb 2024 23:56:46 -0800 Subject: [PATCH 08/49] Run puppeteer install.js in ci.yml --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b905537063..55a1da2c68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -288,13 +288,16 @@ jobs: tool: zola@0.18.0 - name: Install Pa11y-CI and Wait-on - run: npm install pa11y-ci wait-on + run: | + npm install pa11y-ci wait-on + node node_modules/puppeteer/install.js - name: Create Pa11y-CI Config uses: finnp/create-file-action@master env: FILE_NAME: ".pa11yci" FILE_DATA: "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"${{ steps.setup-chrome.outputs.chrome-path }} \"\n }\n }\n}" + - name: Run Pa11y-CI run: zola serve & npx wait-on http://127.0.0.1:1111 && npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml From bff0dbbc6c76e4306f0146ddb4bf28b117f81cef Mon Sep 17 00:00:00 2001 From: TrialDragon <31419708+TrialDragon@users.noreply.github.com> Date: Thu, 22 Feb 2024 00:15:11 -0800 Subject: [PATCH 09/49] Update .github/workflows/ci.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- .github/workflows/ci.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55a1da2c68..48a1051b25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -292,12 +292,9 @@ jobs: npm install pa11y-ci wait-on node node_modules/puppeteer/install.js - - name: Create Pa11y-CI Config - uses: finnp/create-file-action@master - env: - FILE_NAME: ".pa11yci" - FILE_DATA: "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"${{ steps.setup-chrome.outputs.chrome-path }} \"\n }\n }\n}" - - name: Run Pa11y-CI - run: zola serve & npx wait-on http://127.0.0.1:1111 && npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml - + run: | + echo "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"${{ steps.setup-chrome.outputs.chrome-path }} \"\n }\n }\n}" > .pa11yci + zola serve & + npx wait-on http://127.0.0.1:1111 + npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml From f43de9579a45ccd0465c34c4481420836a18765d Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Thu, 22 Feb 2024 00:16:06 -0800 Subject: [PATCH 10/49] Change name of pa11y-ci job to more appropriate accessibility-linting --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48a1051b25..2da6483022 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -240,7 +240,7 @@ jobs: BUILD_ONLY: true TOKEN: fake-secret - pa11y: + accessibility-linting: runs-on: ubuntu-latest needs: [super-linter, test-code-examples, lint-tools, check-hide-lines, generate-assets, generate-errors, generate-wasm-examples, generate-community] From b86b3eecf3e4e2d482ecd487cac3674cadcf8c24 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Thu, 22 Feb 2024 00:32:00 -0800 Subject: [PATCH 11/49] Enable echo to recognize backslashes --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2da6483022..1b500df502 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -294,7 +294,7 @@ jobs: - name: Run Pa11y-CI run: | - echo "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"${{ steps.setup-chrome.outputs.chrome-path }} \"\n }\n }\n}" > .pa11yci + echo -e "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"${{ steps.setup-chrome.outputs.chrome-path }} \"\n }\n }\n}" > .pa11yci zola serve & npx wait-on http://127.0.0.1:1111 npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml From 704b5375f5cbbb4dae9f069d93259925760239a1 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Thu, 22 Feb 2024 11:18:57 -0800 Subject: [PATCH 12/49] Switch chromium installation to apt --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b500df502..b765292f2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -277,10 +277,10 @@ jobs: node-version: 18 - name: Install Google Chrome - id: setup-chrome - uses: browser-actions/setup-chrome@v1 - with: - chrome-version: stable + run: | + sudo apt-get install -y chromium + which chromium-browser + chromium-browser --version - name: Install Zola uses: taiki-e/install-action@v2 @@ -294,7 +294,7 @@ jobs: - name: Run Pa11y-CI run: | - echo -e "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"${{ steps.setup-chrome.outputs.chrome-path }} \"\n }\n }\n}" > .pa11yci + echo -e "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"/usr/bin/chromium-browser\"\n }\n }\n}" > .pa11yci zola serve & npx wait-on http://127.0.0.1:1111 npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml From fd6de525cc2f6ee697eb3312c111fa0ac928015f Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Thu, 22 Feb 2024 11:21:11 -0800 Subject: [PATCH 13/49] Fix package name typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b765292f2d..49fcbf5458 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -278,7 +278,7 @@ jobs: - name: Install Google Chrome run: | - sudo apt-get install -y chromium + sudo apt-get install -y chromium-browser which chromium-browser chromium-browser --version From 026011884705bd9cbd83da0228e1f00a9bc7e199 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Thu, 22 Feb 2024 15:07:23 -0800 Subject: [PATCH 14/49] Remove generated files dependency --- .github/workflows/ci.yml | 96 ++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49fcbf5458..358ef3ca89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,6 +66,43 @@ jobs: - name: Check clippy run: cargo clippy --workspace -- -Dwarnings + accessibility-linting: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Create Dummy Generated Pages + run: echo "TODO" + + - name: Install NPM + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install Google Chrome + run: | + sudo apt-get install -y chromium-browser + which chromium-browser + chromium-browser --version + + - name: Install Zola + uses: taiki-e/install-action@v2 + with: + tool: zola@0.18.0 + + - name: Install Pa11y-CI and Wait-on + run: | + npm install pa11y-ci wait-on + node node_modules/puppeteer/install.js + + - name: Run Pa11y-CI + run: | + echo -e "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"/usr/bin/chromium-browser\"\n }\n }\n}" > .pa11yci + zola serve & + npx wait-on http://127.0.0.1:1111 + npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml + generate-assets: needs: [super-linter, test-code-examples, lint-tools, check-hide-lines] runs-on: ubuntu-latest @@ -239,62 +276,3 @@ jobs: BUILD_DIR: . BUILD_ONLY: true TOKEN: fake-secret - - accessibility-linting: - runs-on: ubuntu-latest - needs: [super-linter, test-code-examples, lint-tools, check-hide-lines, generate-assets, generate-errors, generate-wasm-examples, generate-community] - - steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - with: - name: generated-assets - path: content/assets - - - uses: actions/download-artifact@v4 - with: - name: generated-errors - path: content/learn/errors - - - uses: actions/download-artifact@v4 - with: - name: generated-wasm-examples - path: content/examples - - - uses: actions/download-artifact@v4 - with: - name: generated-wasm-examples-webgpu - path: content/examples-webgpu - - - uses: actions/download-artifact@v4 - with: - name: generated-community - path: content/community/people - - - name: Install NPM - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install Google Chrome - run: | - sudo apt-get install -y chromium-browser - which chromium-browser - chromium-browser --version - - - name: Install Zola - uses: taiki-e/install-action@v2 - with: - tool: zola@0.18.0 - - - name: Install Pa11y-CI and Wait-on - run: | - npm install pa11y-ci wait-on - node node_modules/puppeteer/install.js - - - name: Run Pa11y-CI - run: | - echo -e "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"/usr/bin/chromium-browser\"\n }\n }\n}" > .pa11yci - zola serve & - npx wait-on http://127.0.0.1:1111 - npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml From e5aaed0d6f2db29b43ba4a70e29066f457b65523 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 13:52:15 -0800 Subject: [PATCH 15/49] Add assets placeholder --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 358ef3ca89..a48cd9af69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,11 @@ jobs: - uses: actions/checkout@v4 - name: Create Dummy Generated Pages - run: echo "TODO" + run: | + mkdir content/assets content/assets/placeholder + echo -e "+++\ntitle = \"Bevy Assets\"\ntemplate = \"assets.html\"\n+++\n" > content/assets/_index.md + echo -e "+++\ntitle = \"placeholder\"\n+++" > content/assets/placeholder/_index.md + echo -e "+++\ntitle = \"Example\"\ndescription = \"Example post of assets section of site.\"\n[extra]\nlink = \"https://example.com\"\nlicenses = [\"Example License\"]\nbevy_versions = [\"x.y.x\"]\n+++" > content/assets/placeholder/example.md - name: Install NPM uses: actions/setup-node@v4 From 134c9a3aa8966cfab3f531097487cf165321fda0 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 14:54:33 -0800 Subject: [PATCH 16/49] Add examples placeholder Only did the webgl2 examples since other than backend tech they're the same front end. --- .github/workflows/ci.yml | 176 ++++++++++++++++++++++++++------------- 1 file changed, 118 insertions(+), 58 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2552c5b098..f467a36f2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,10 +74,70 @@ jobs: - name: Create Dummy Generated Pages run: | + echo "Assets" mkdir content/assets content/assets/placeholder echo -e "+++\ntitle = \"Bevy Assets\"\ntemplate = \"assets.html\"\n+++\n" > content/assets/_index.md - echo -e "+++\ntitle = \"placeholder\"\n+++" > content/assets/placeholder/_index.md - echo -e "+++\ntitle = \"Example\"\ndescription = \"Example post of assets section of site.\"\n[extra]\nlink = \"https://example.com\"\nlicenses = [\"Example License\"]\nbevy_versions = [\"x.y.x\"]\n+++" > content/assets/placeholder/example.md + echo -e "+++\ntitle = \"placeholder\"\n+++\n" > content/assets/placeholder/_index.md + echo -e "+++\ntitle = \"Example\"\ndescription = \"Example post of assets section of site.\"\n[extra]\nlink = \"https://example.com\"\nlicenses = [\"Example License\"]\nbevy_versions = [\"x.y.x\"]\n+++\n" > content/assets/placeholder/example.md + echo "Examples" + mkdir content/examples mkdir content/examples/math mkdir content/examples/2d_rendering/2d-shapes + echo -e "+++\ntitle = \"Bevy Examples in WebGL2\"\ntemplate = \"examples.html\"\nsort_by = \"weight\"\n[extra]\nheader_message = \"Examples (WebGL2)\"\n+++\n" > content/examples/_index.md + echo -e "+++\ntitle = \"2D Rendering\"\nsort_by = \"weight\"\nweight = 15\n+++\n" > content/examples/2d_rendering/_index.md + echo -e "+++\ntitle = \"2D Shapes\"\ntemplate = \"example.html\"\nweight = 0\ndescription = \"Renders simple 2D primitive shapes like circles and polygons\"\n[extra]\ntechnical_name = \"2d-shapes\"\nlink = \"/examples/2d_rendering/2d-shapes\"\nimage = \"../static/screenshots/2d_rendering/2d_shapes.png\"\ncode_path = \"content/examples/2d_rendering/2d-shapes/2d_shapes.rs\"\ngithub_code_path = \"examples/2d/2d_shapes.rs\"\nheader_message = \"examples (WebGL2)\"\n+++\n" > content/examples/2d_rendering/2d_shapes/index.md + echo "//! Shows how to render simple primitive shapes with a single color. + + use bevy::{ + prelude::*, + sprite::{MaterialMesh2dBundle, Mesh2dHandle}, + }; + + fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_systems(Startup, setup) + .run(); + } + + const X_EXTENT: f32 = 600.; + + fn setup( + mut commands: Commands, + mut meshes: ResMut>, + mut materials: ResMut>, + ) { + commands.spawn(Camera2dBundle::default()); + + let shapes = [ + Mesh2dHandle(meshes.add(Circle { radius: 50.0 })), + Mesh2dHandle(meshes.add(Ellipse::new(25.0, 50.0))), + Mesh2dHandle(meshes.add(Capsule2d::new(25.0, 50.0))), + Mesh2dHandle(meshes.add(Rectangle::new(50.0, 100.0))), + Mesh2dHandle(meshes.add(RegularPolygon::new(50.0, 6))), + Mesh2dHandle(meshes.add(Triangle2d::new( + Vec2::Y * 50.0, + Vec2::new(-50.0, -50.0), + Vec2::new(50.0, -50.0), + ))), + ]; + let num_shapes = shapes.len(); + + for (i, shape) in shapes.into_iter().enumerate() { + // Distribute colors evenly across the rainbow. + let color = Color::hsl(360. * i as f32 / num_shapes as f32, 0.95, 0.7); + + commands.spawn(MaterialMesh2dBundle { + mesh: shape, + material: materials.add(color), + transform: Transform::from_xyz( + // Distribute shapes from -X_EXTENT to +X_EXTENT. + -X_EXTENT / 2. + i as f32 / (num_shapes - 1) as f32 * X_EXTENT, + 0.0, + 0.0, + ), + ..default() + }); + } + }" > content/examples/2d_rendering/2d_shapes/2d_shapes.rs - name: Install NPM uses: actions/setup-node@v4 @@ -110,62 +170,62 @@ jobs: typos: runs-on: ubuntu-latest timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - name: Check for typos - uses: crate-ci/typos@v1.18.2 - - name: Typos info - if: failure() - run: | - echo 'To fix typos, please run `typos -w`' - echo 'To check for a diff, run `typos`' - echo 'You can find typos here: https://crates.io/crates/typos' - echo 'if you use VSCode, you can also install `Typos Spell Checker' - echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode' - - generate-assets: - needs: [super-linter, test-code-examples, lint-tools, check-hide-lines] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/cache@v4 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - generate-assets/target/ - key: ${{ runner.os }}-generate-assets-${{ hashFiles('generate-assets/Cargo.toml') }} - - - name: Get cache key - id: cache-key - run: echo "key=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT - - - name: Get crates.io datadump from cache - uses: actions/cache@v4 - with: - path: generate-assets/data - key: ${{ runner.os }}-${{ steps.cache-key.outputs.key }} - - - name: "Build Bevy Assets" - run: > - cd generate-assets && - export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} && - ./generate_assets.sh - - - uses: actions/upload-artifact@v4 - with: - name: generated-assets - path: content/assets - retention-days: 1 - - generate-errors: - needs: [super-linter, test-code-examples, lint-tools, check-hide-lines] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 + - name: Check for typos + uses: crate-ci/typos@v1.18.2 + - name: Typos info + if: failure() + run: | + echo 'To fix typos, please run `typos -w`' + echo 'To check for a diff, run `typos`' + echo 'You can find typos here: https://crates.io/crates/typos' + echo 'if you use VSCode, you can also install `Typos Spell Checker' + echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode' + +generate-assets: + needs: [super-linter, test-code-examples, lint-tools, check-hide-lines] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + generate-assets/target/ + key: ${{ runner.os }}-generate-assets-${{ hashFiles('generate-assets/Cargo.toml') }} + + - name: Get cache key + id: cache-key + run: echo "key=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Get crates.io datadump from cache + uses: actions/cache@v4 + with: + path: generate-assets/data + key: ${{ runner.os }}-${{ steps.cache-key.outputs.key }} + + - name: "Build Bevy Assets" + run: > + cd generate-assets && + export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} && + ./generate_assets.sh + + - uses: actions/upload-artifact@v4 + with: + name: generated-assets + path: content/assets + retention-days: 1 + +generate-errors: + needs: [super-linter, test-code-examples, lint-tools, check-hide-lines] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - uses: actions/cache@v4 with: From 81b9fcf84b67405fe10e693cf6c593f0d4be5b7d Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 16:22:37 -0800 Subject: [PATCH 17/49] Fix indentation --- .github/workflows/ci.yml | 64 ++++------------------------------------ 1 file changed, 5 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f467a36f2f..4425234190 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,60 +84,6 @@ jobs: echo -e "+++\ntitle = \"Bevy Examples in WebGL2\"\ntemplate = \"examples.html\"\nsort_by = \"weight\"\n[extra]\nheader_message = \"Examples (WebGL2)\"\n+++\n" > content/examples/_index.md echo -e "+++\ntitle = \"2D Rendering\"\nsort_by = \"weight\"\nweight = 15\n+++\n" > content/examples/2d_rendering/_index.md echo -e "+++\ntitle = \"2D Shapes\"\ntemplate = \"example.html\"\nweight = 0\ndescription = \"Renders simple 2D primitive shapes like circles and polygons\"\n[extra]\ntechnical_name = \"2d-shapes\"\nlink = \"/examples/2d_rendering/2d-shapes\"\nimage = \"../static/screenshots/2d_rendering/2d_shapes.png\"\ncode_path = \"content/examples/2d_rendering/2d-shapes/2d_shapes.rs\"\ngithub_code_path = \"examples/2d/2d_shapes.rs\"\nheader_message = \"examples (WebGL2)\"\n+++\n" > content/examples/2d_rendering/2d_shapes/index.md - echo "//! Shows how to render simple primitive shapes with a single color. - - use bevy::{ - prelude::*, - sprite::{MaterialMesh2dBundle, Mesh2dHandle}, - }; - - fn main() { - App::new() - .add_plugins(DefaultPlugins) - .add_systems(Startup, setup) - .run(); - } - - const X_EXTENT: f32 = 600.; - - fn setup( - mut commands: Commands, - mut meshes: ResMut>, - mut materials: ResMut>, - ) { - commands.spawn(Camera2dBundle::default()); - - let shapes = [ - Mesh2dHandle(meshes.add(Circle { radius: 50.0 })), - Mesh2dHandle(meshes.add(Ellipse::new(25.0, 50.0))), - Mesh2dHandle(meshes.add(Capsule2d::new(25.0, 50.0))), - Mesh2dHandle(meshes.add(Rectangle::new(50.0, 100.0))), - Mesh2dHandle(meshes.add(RegularPolygon::new(50.0, 6))), - Mesh2dHandle(meshes.add(Triangle2d::new( - Vec2::Y * 50.0, - Vec2::new(-50.0, -50.0), - Vec2::new(50.0, -50.0), - ))), - ]; - let num_shapes = shapes.len(); - - for (i, shape) in shapes.into_iter().enumerate() { - // Distribute colors evenly across the rainbow. - let color = Color::hsl(360. * i as f32 / num_shapes as f32, 0.95, 0.7); - - commands.spawn(MaterialMesh2dBundle { - mesh: shape, - material: materials.add(color), - transform: Transform::from_xyz( - // Distribute shapes from -X_EXTENT to +X_EXTENT. - -X_EXTENT / 2. + i as f32 / (num_shapes - 1) as f32 * X_EXTENT, - 0.0, - 0.0, - ), - ..default() - }); - } - }" > content/examples/2d_rendering/2d_shapes/2d_shapes.rs - name: Install NPM uses: actions/setup-node@v4 @@ -221,11 +167,11 @@ generate-assets: path: content/assets retention-days: 1 -generate-errors: - needs: [super-linter, test-code-examples, lint-tools, check-hide-lines] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + generate-errors: + needs: [super-linter, test-code-examples, lint-tools, check-hide-lines] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - uses: actions/cache@v4 with: From 41efe5dc436ccdd1f412cb51a78ad17a8c246cb1 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 16:24:01 -0800 Subject: [PATCH 18/49] Fix typos indentation --- .github/workflows/ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4425234190..220dabc79c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,18 +116,18 @@ jobs: typos: runs-on: ubuntu-latest timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - name: Check for typos - uses: crate-ci/typos@v1.18.2 - - name: Typos info - if: failure() - run: | - echo 'To fix typos, please run `typos -w`' - echo 'To check for a diff, run `typos`' - echo 'You can find typos here: https://crates.io/crates/typos' - echo 'if you use VSCode, you can also install `Typos Spell Checker' - echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode' + steps: + - uses: actions/checkout@v4 + - name: Check for typos + uses: crate-ci/typos@v1.18.2 + - name: Typos info + if: failure() + run: | + echo 'To fix typos, please run `typos -w`' + echo 'To check for a diff, run `typos`' + echo 'You can find typos here: https://crates.io/crates/typos' + echo 'if you use VSCode, you can also install `Typos Spell Checker' + echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode' generate-assets: needs: [super-linter, test-code-examples, lint-tools, check-hide-lines] From fee9f0604fd54cb8e8a69a5b16b4b49089e68aaf Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 16:25:47 -0800 Subject: [PATCH 19/49] Fix assets indentation --- .github/workflows/ci.yml | 74 ++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 220dabc79c..bf8562c3e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,43 +129,43 @@ jobs: echo 'if you use VSCode, you can also install `Typos Spell Checker' echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode' -generate-assets: - needs: [super-linter, test-code-examples, lint-tools, check-hide-lines] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/cache@v4 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - generate-assets/target/ - key: ${{ runner.os }}-generate-assets-${{ hashFiles('generate-assets/Cargo.toml') }} - - - name: Get cache key - id: cache-key - run: echo "key=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT - - - name: Get crates.io datadump from cache - uses: actions/cache@v4 - with: - path: generate-assets/data - key: ${{ runner.os }}-${{ steps.cache-key.outputs.key }} - - - name: "Build Bevy Assets" - run: > - cd generate-assets && - export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} && - ./generate_assets.sh - - - uses: actions/upload-artifact@v4 - with: - name: generated-assets - path: content/assets - retention-days: 1 + generate-assets: + needs: [super-linter, test-code-examples, lint-tools, check-hide-lines] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + generate-assets/target/ + key: ${{ runner.os }}-generate-assets-${{ hashFiles('generate-assets/Cargo.toml') }} + + - name: Get cache key + id: cache-key + run: echo "key=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Get crates.io datadump from cache + uses: actions/cache@v4 + with: + path: generate-assets/data + key: ${{ runner.os }}-${{ steps.cache-key.outputs.key }} + + - name: "Build Bevy Assets" + run: > + cd generate-assets && + export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} && + ./generate_assets.sh + + - uses: actions/upload-artifact@v4 + with: + name: generated-assets + path: content/assets + retention-days: 1 generate-errors: needs: [super-linter, test-code-examples, lint-tools, check-hide-lines] From 3c1fd85c65e84eb678a2d63e5bf352fa482234b0 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 16:30:06 -0800 Subject: [PATCH 20/49] Fix mkdir in example dummy pages --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf8562c3e1..bd5842c98e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,7 +80,7 @@ jobs: echo -e "+++\ntitle = \"placeholder\"\n+++\n" > content/assets/placeholder/_index.md echo -e "+++\ntitle = \"Example\"\ndescription = \"Example post of assets section of site.\"\n[extra]\nlink = \"https://example.com\"\nlicenses = [\"Example License\"]\nbevy_versions = [\"x.y.x\"]\n+++\n" > content/assets/placeholder/example.md echo "Examples" - mkdir content/examples mkdir content/examples/math mkdir content/examples/2d_rendering/2d-shapes + mkdir content/examples content/examples/2d_rendering content/examples/2d_rendering/2d-shapes echo -e "+++\ntitle = \"Bevy Examples in WebGL2\"\ntemplate = \"examples.html\"\nsort_by = \"weight\"\n[extra]\nheader_message = \"Examples (WebGL2)\"\n+++\n" > content/examples/_index.md echo -e "+++\ntitle = \"2D Rendering\"\nsort_by = \"weight\"\nweight = 15\n+++\n" > content/examples/2d_rendering/_index.md echo -e "+++\ntitle = \"2D Shapes\"\ntemplate = \"example.html\"\nweight = 0\ndescription = \"Renders simple 2D primitive shapes like circles and polygons\"\n[extra]\ntechnical_name = \"2d-shapes\"\nlink = \"/examples/2d_rendering/2d-shapes\"\nimage = \"../static/screenshots/2d_rendering/2d_shapes.png\"\ncode_path = \"content/examples/2d_rendering/2d-shapes/2d_shapes.rs\"\ngithub_code_path = \"examples/2d/2d_shapes.rs\"\nheader_message = \"examples (WebGL2)\"\n+++\n" > content/examples/2d_rendering/2d_shapes/index.md From a5c35b45e0cdb3b8fbbcd7410731e9050c48cba5 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 16:36:37 -0800 Subject: [PATCH 21/49] Fix directory name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd5842c98e..561347721e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,7 +80,7 @@ jobs: echo -e "+++\ntitle = \"placeholder\"\n+++\n" > content/assets/placeholder/_index.md echo -e "+++\ntitle = \"Example\"\ndescription = \"Example post of assets section of site.\"\n[extra]\nlink = \"https://example.com\"\nlicenses = [\"Example License\"]\nbevy_versions = [\"x.y.x\"]\n+++\n" > content/assets/placeholder/example.md echo "Examples" - mkdir content/examples content/examples/2d_rendering content/examples/2d_rendering/2d-shapes + mkdir content/examples content/examples/2d_rendering content/examples/2d_rendering/2d_shapes echo -e "+++\ntitle = \"Bevy Examples in WebGL2\"\ntemplate = \"examples.html\"\nsort_by = \"weight\"\n[extra]\nheader_message = \"Examples (WebGL2)\"\n+++\n" > content/examples/_index.md echo -e "+++\ntitle = \"2D Rendering\"\nsort_by = \"weight\"\nweight = 15\n+++\n" > content/examples/2d_rendering/_index.md echo -e "+++\ntitle = \"2D Shapes\"\ntemplate = \"example.html\"\nweight = 0\ndescription = \"Renders simple 2D primitive shapes like circles and polygons\"\n[extra]\ntechnical_name = \"2d-shapes\"\nlink = \"/examples/2d_rendering/2d-shapes\"\nimage = \"../static/screenshots/2d_rendering/2d_shapes.png\"\ncode_path = \"content/examples/2d_rendering/2d-shapes/2d_shapes.rs\"\ngithub_code_path = \"examples/2d/2d_shapes.rs\"\nheader_message = \"examples (WebGL2)\"\n+++\n" > content/examples/2d_rendering/2d_shapes/index.md From 97b0ba46df1f29192071ea0b34dcdc30618207e6 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 16:41:40 -0800 Subject: [PATCH 22/49] Restore dummy example code --- .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 561347721e..635b5ca044 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,6 +84,53 @@ jobs: echo -e "+++\ntitle = \"Bevy Examples in WebGL2\"\ntemplate = \"examples.html\"\nsort_by = \"weight\"\n[extra]\nheader_message = \"Examples (WebGL2)\"\n+++\n" > content/examples/_index.md echo -e "+++\ntitle = \"2D Rendering\"\nsort_by = \"weight\"\nweight = 15\n+++\n" > content/examples/2d_rendering/_index.md echo -e "+++\ntitle = \"2D Shapes\"\ntemplate = \"example.html\"\nweight = 0\ndescription = \"Renders simple 2D primitive shapes like circles and polygons\"\n[extra]\ntechnical_name = \"2d-shapes\"\nlink = \"/examples/2d_rendering/2d-shapes\"\nimage = \"../static/screenshots/2d_rendering/2d_shapes.png\"\ncode_path = \"content/examples/2d_rendering/2d-shapes/2d_shapes.rs\"\ngithub_code_path = \"examples/2d/2d_shapes.rs\"\nheader_message = \"examples (WebGL2)\"\n+++\n" > content/examples/2d_rendering/2d_shapes/index.md + echo "//! Shows how to render simple primitive shapes with a single color. + use bevy::{ + prelude::*, + sprite::{MaterialMesh2dBundle, Mesh2dHandle}, + }; + fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_systems(Startup, setup) + .run(); + } + const X_EXTENT: f32 = 600.; + fn setup( + mut commands: Commands, + mut meshes: ResMut>, + mut materials: ResMut>, + ) { + commands.spawn(Camera2dBundle::default()); + let shapes = [ + Mesh2dHandle(meshes.add(Circle { radius: 50.0 })), + Mesh2dHandle(meshes.add(Ellipse::new(25.0, 50.0))), + Mesh2dHandle(meshes.add(Capsule2d::new(25.0, 50.0))), + Mesh2dHandle(meshes.add(Rectangle::new(50.0, 100.0))), + Mesh2dHandle(meshes.add(RegularPolygon::new(50.0, 6))), + Mesh2dHandle(meshes.add(Triangle2d::new( + Vec2::Y * 50.0, + Vec2::new(-50.0, -50.0), + Vec2::new(50.0, -50.0), + ))), + ]; + let num_shapes = shapes.len(); + for (i, shape) in shapes.into_iter().enumerate() { + // Distribute colors evenly across the rainbow. + let color = Color::hsl(360. * i as f32 / num_shapes as f32, 0.95, 0.7); + commands.spawn(MaterialMesh2dBundle { + mesh: shape, + material: materials.add(color), + transform: Transform::from_xyz( + // Distribute shapes from -X_EXTENT to +X_EXTENT. + -X_EXTENT / 2. + i as f32 / (num_shapes - 1) as f32 * X_EXTENT, + 0.0, + 0.0, + ), + ..default() + }); + } + }" > content/examples/2d_rendering/2d_shapes/2d_shapes.rs - name: Install NPM uses: actions/setup-node@v4 From 3b1d260dbf06e652d9dab4496df54871dac92ac9 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 20:33:24 -0800 Subject: [PATCH 23/49] Fix the typo This better work --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 635b5ca044..b51b51078c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,10 +80,10 @@ jobs: echo -e "+++\ntitle = \"placeholder\"\n+++\n" > content/assets/placeholder/_index.md echo -e "+++\ntitle = \"Example\"\ndescription = \"Example post of assets section of site.\"\n[extra]\nlink = \"https://example.com\"\nlicenses = [\"Example License\"]\nbevy_versions = [\"x.y.x\"]\n+++\n" > content/assets/placeholder/example.md echo "Examples" - mkdir content/examples content/examples/2d_rendering content/examples/2d_rendering/2d_shapes + mkdir content/examples content/examples/2d_rendering content/examples/2d_rendering/2d-shapes echo -e "+++\ntitle = \"Bevy Examples in WebGL2\"\ntemplate = \"examples.html\"\nsort_by = \"weight\"\n[extra]\nheader_message = \"Examples (WebGL2)\"\n+++\n" > content/examples/_index.md echo -e "+++\ntitle = \"2D Rendering\"\nsort_by = \"weight\"\nweight = 15\n+++\n" > content/examples/2d_rendering/_index.md - echo -e "+++\ntitle = \"2D Shapes\"\ntemplate = \"example.html\"\nweight = 0\ndescription = \"Renders simple 2D primitive shapes like circles and polygons\"\n[extra]\ntechnical_name = \"2d-shapes\"\nlink = \"/examples/2d_rendering/2d-shapes\"\nimage = \"../static/screenshots/2d_rendering/2d_shapes.png\"\ncode_path = \"content/examples/2d_rendering/2d-shapes/2d_shapes.rs\"\ngithub_code_path = \"examples/2d/2d_shapes.rs\"\nheader_message = \"examples (WebGL2)\"\n+++\n" > content/examples/2d_rendering/2d_shapes/index.md + echo -e "+++\ntitle = \"2D Shapes\"\ntemplate = \"example.html\"\nweight = 0\ndescription = \"Renders simple 2D primitive shapes like circles and polygons\"\n[extra]\ntechnical_name = \"2d-shapes\"\nlink = \"/examples/2d_rendering/2d-shapes\"\nimage = \"../static/screenshots/2d_rendering/2d_shapes.png\"\ncode_path = \"content/examples/2d_rendering/2d-shapes/2d_shapes.rs\"\ngithub_code_path = \"examples/2d/2d_shapes.rs\"\nheader_message = \"examples (WebGL2)\"\n+++\n" > content/examples/2d_rendering/2d-shapes/index.md echo "//! Shows how to render simple primitive shapes with a single color. use bevy::{ prelude::*, @@ -130,7 +130,7 @@ jobs: ..default() }); } - }" > content/examples/2d_rendering/2d_shapes/2d_shapes.rs + }" > content/examples/2d_rendering/2d-shapes/2d_shapes.rs - name: Install NPM uses: actions/setup-node@v4 From 44f801b21a777fb26f23ca69db047a35bf694671 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 21:00:36 -0800 Subject: [PATCH 24/49] Add community dummy pages --- .github/workflows/ci.yml | 100 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b51b51078c..4cbe736c12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,6 +131,106 @@ jobs: }); } }" > content/examples/2d_rendering/2d-shapes/2d_shapes.rs + echo "Community" + mkdir content/community/donate content/community/people content/community/people/'community members' content/community/people/'the bevy organization' + echo "Donation Page" + echo -e "+++ + title = \"Supporting Bevy Development\" + sort_by = \"weight\" + template = \"donate.html\" + weight = 1 + + [extra] + header_message = \"Supporting Bevy\" + sort_order_reversed = false + + +++ + " > content/community/donate/_index.md + echo -e "+++ + title = \"Test Person\" + weight = 0 + + [extra] + profile_picture = \" + bio = \"Test person.\" + discord = \"test#9999\" + discord_userid = \"000000000000000000\" + github = \"invalid\" + mastodon_user = \"invalid\" + mastodon_instance = \"doesnt.exist\" + twitter = \"nothing\" + itch_io = \"nada\" + roles = [\"Non-existent\"] + + +++ + " > content/community/donate/test.md + echo "People Page" + echo -e "+++ + title = \"People\" + sort_by = \"weight\" + template = \"people.html\" + weight = 0 + + [extra] + header_message = \"People\" + sort_order_reversed = false + + +++ + " > content/community/people/_index.md + echo -e "+++ + title = \"Community Members\" + sort_by = \"weight\" + weight = 2 + + [extra] + sort_order_reversed = false + + +++ + " > content/community/people/'community members'/_index.md + echo -e "+++ + title = \"Test Person\" + weight = 0 + + [extra] + profile_picture = \"\" + sponsor = \"nothing\" + bio = \"I am a small youtuber, attempted game dev and avid doc reader. I'm happy to help wherever and whenever I can.\" + discord = \"test\" + discord_userid = \"000000000000000000\" + github = \"test\" + itch_io = \"test\" + website = \"https://example.com\" + + +++ + " > content/community/people/'community members'/test.md + echo -e "+++ + title = \"The Bevy Organization\" + sort_by = \"weight\" + weight = 1 + + [extra] + sort_order_reversed = false + + +++ + " > content/community/people/'the bevy organization'/_index.md + echo -e "+++ + title = \"Test Person\" + weight = 0 + + [extra] + profile_picture = \" + bio = \"Test person.\" + discord = \"test#9999\" + discord_userid = \"000000000000000000\" + github = \"invalid\" + mastodon_user = \"invalid\" + mastodon_instance = \"doesnt.exist\" + twitter = \"nothing\" + itch_io = \"nada\" + roles = [\"Non-existent\"] + + +++ + " > content/community/people/'the bevy organization'/test.md - name: Install NPM uses: actions/setup-node@v4 From 78fd2a04b64d31af6cd7487c6af5a184188bd0f5 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 21:04:01 -0800 Subject: [PATCH 25/49] Fix missing quote mark --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4cbe736c12..1ea6c547c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,7 +151,7 @@ jobs: weight = 0 [extra] - profile_picture = \" + profile_picture = \"\" bio = \"Test person.\" discord = \"test#9999\" discord_userid = \"000000000000000000\" @@ -218,7 +218,7 @@ jobs: weight = 0 [extra] - profile_picture = \" + profile_picture = \"\" bio = \"Test person.\" discord = \"test#9999\" discord_userid = \"000000000000000000\" From 73cad26b96b05890115081402ef512faaac7a23a Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 21:13:02 -0800 Subject: [PATCH 26/49] Add sponsor link to donate dummy page --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ea6c547c0..4a94778438 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,6 +152,7 @@ jobs: [extra] profile_picture = \"\" + sponsor = \"nothing\" bio = \"Test person.\" discord = \"test#9999\" discord_userid = \"000000000000000000\" From f4c228dd4c000c7d1f12c7083b443bf19820bb81 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 21:37:04 -0800 Subject: [PATCH 27/49] Add dummy errors page --- .github/workflows/ci.yml | 110 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a94778438..e8edf3c55c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -232,6 +232,116 @@ jobs: +++ " > content/community/people/'the bevy organization'/test.md + echo "Errors" + mkdir content/learn/errors + echo -e "+++ + title = \"Errors\"" + sort_by = \"weight\"" + template = \"errors.html\"" + weight = 0 + + [extra] + header_message = \"Errors\"" + sort_order_reversed = false + + +++ + " > content/learn/errors/_index.md + echo -e "+++ + title = \"B0001\"" + weight = 0 + + +++ + + + To keep [Rust rules on references](https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#the-rules-of-references) (either one mutable reference or any number of immutable references) on a component, it is not possible to have two queries on the same component when one requests mutable access to it in the same system. + + Erroneous code example: + + ```rust + use bevy::prelude::*; + + #[derive(Component)] + struct Player; + + #[derive(Component)] + struct Enemy; + + fn move_enemies_to_player( + mut enemies: Query<&mut Transform, With>, + player: Query<&Transform, With>, + ) { + // ... + } + + fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_systems(Update, move_enemies_to_player) + .run(); + } + ``` + + This will panic, as it's not possible to have both a mutable and an immutable query on `Transform` at the same time. + + You have two solutions: + + Solution #1: use disjoint queries using [`Without`](https://docs.rs/bevy/*/bevy/ecs/query/struct.Without.html) + + As a `Player` entity won't be an `Enemy` at the same time, those two queries will actually never target the same entity. This can be encoded in the query filter with [`Without`](https://docs.rs/bevy/*/bevy/ecs/query/struct.Without.html): + + ```rust + use bevy::prelude::*; + + #[derive(Component)] + struct Player; + + #[derive(Component)] + struct Enemy; + + fn move_enemies_to_player( + mut enemies: Query<&mut Transform, With>, + player: Query<&Transform, (With, Without)>, + ) { + // ... + } + + fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_systems(Update, move_enemies_to_player) + .run(); + } + ``` + + Solution #2: use a `ParamSet` + + A `ParamSet` will let you have conflicting queries as a parameter, but you will still be responsible for not using them at the same time in your system. + + ```rust + use bevy::prelude::*; + + #[derive(Component)] + struct Player; + + #[derive(Component)] + struct Enemy; + + fn move_enemies_to_player( + mut transforms: ParamSet<( + Query<&mut Transform, With>, + Query<&Transform, With>, + )>, + ) { + // ... + } + + fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_systems(Update, move_enemies_to_player) + .run(); + } + " > content/learn/errors/test_error.md - name: Install NPM uses: actions/setup-node@v4 From f7e5a77c9d0aab2adafd71ce3be5d2ed0f694a86 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 21:38:50 -0800 Subject: [PATCH 28/49] Fix typo --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8edf3c55c..b338a14b1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -235,19 +235,19 @@ jobs: echo "Errors" mkdir content/learn/errors echo -e "+++ - title = \"Errors\"" - sort_by = \"weight\"" - template = \"errors.html\"" + title = \"Errors\" + sort_by = \"weight\" + template = \"errors.html\" weight = 0 [extra] - header_message = \"Errors\"" + header_message = \"Errors\" sort_order_reversed = false +++ " > content/learn/errors/_index.md echo -e "+++ - title = \"B0001\"" + title = \"B0001\" weight = 0 +++ From ba4b7577d3ab3d13db6811e100a68d68db5447f9 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 21:41:16 -0800 Subject: [PATCH 29/49] Add missing back ticks --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b338a14b1e..422f674a67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -195,7 +195,7 @@ jobs: [extra] profile_picture = \"\" sponsor = \"nothing\" - bio = \"I am a small youtuber, attempted game dev and avid doc reader. I'm happy to help wherever and whenever I can.\" + bio = \"I am a small youtuber, attempted game dev and avid doc reader. I\'m happy to help wherever and whenever I can.\" discord = \"test\" discord_userid = \"000000000000000000\" github = \"test\" @@ -281,13 +281,13 @@ jobs: } ``` - This will panic, as it's not possible to have both a mutable and an immutable query on `Transform` at the same time. + This will panic, as it\'s not possible to have both a mutable and an immutable query on `Transform` at the same time. You have two solutions: Solution #1: use disjoint queries using [`Without`](https://docs.rs/bevy/*/bevy/ecs/query/struct.Without.html) - As a `Player` entity won't be an `Enemy` at the same time, those two queries will actually never target the same entity. This can be encoded in the query filter with [`Without`](https://docs.rs/bevy/*/bevy/ecs/query/struct.Without.html): + As a `Player` entity won\'t be an `Enemy` at the same time, those two queries will actually never target the same entity. This can be encoded in the query filter with [`Without`](https://docs.rs/bevy/*/bevy/ecs/query/struct.Without.html): ```rust use bevy::prelude::*; @@ -341,6 +341,7 @@ jobs: .add_systems(Update, move_enemies_to_player) .run(); } + ``` " > content/learn/errors/test_error.md - name: Install NPM From 3b355bb20c1b3f538bbbc693315006974995b5ff Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Mon, 26 Feb 2024 21:46:08 -0800 Subject: [PATCH 30/49] Cleanup some of the dummy files --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 422f674a67..8ccadffba6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -195,7 +195,7 @@ jobs: [extra] profile_picture = \"\" sponsor = \"nothing\" - bio = \"I am a small youtuber, attempted game dev and avid doc reader. I\'m happy to help wherever and whenever I can.\" + bio = \"Tester\" discord = \"test\" discord_userid = \"000000000000000000\" github = \"test\" @@ -281,13 +281,13 @@ jobs: } ``` - This will panic, as it\'s not possible to have both a mutable and an immutable query on `Transform` at the same time. + This will panic, as it's not possible to have both a mutable and an immutable query on `Transform` at the same time. You have two solutions: Solution #1: use disjoint queries using [`Without`](https://docs.rs/bevy/*/bevy/ecs/query/struct.Without.html) - As a `Player` entity won\'t be an `Enemy` at the same time, those two queries will actually never target the same entity. This can be encoded in the query filter with [`Without`](https://docs.rs/bevy/*/bevy/ecs/query/struct.Without.html): + As a `Player` entity won't be an `Enemy` at the same time, those two queries will actually never target the same entity. This can be encoded in the query filter with [`Without`](https://docs.rs/bevy/*/bevy/ecs/query/struct.Without.html): ```rust use bevy::prelude::*; From aa5545ea26400a475cfcba087e2099cbfc0ee60d Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 13:03:00 -0800 Subject: [PATCH 31/49] Make assets page accessible --- templates/assets.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/assets.html b/templates/assets.html index d408f4ba68..1e01190425 100644 --- a/templates/assets.html +++ b/templates/assets.html @@ -10,10 +10,11 @@ + placeholder="Search (ie: 0.11 MIT)" + aria-label="Search (ie: 0.11 MIT)" />
- + From 57b28b049a49c9c149956fc3e36baa9b9f4d0191 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 13:20:40 -0800 Subject: [PATCH 32/49] Fix conflicting id issue in dummy pages --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4071e67bd9..412a49d078 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -213,7 +213,7 @@ jobs: +++ " > content/community/people/'the bevy organization'/_index.md echo -e "+++ - title = \"Test Person\" + title = \"Test Member\" weight = 0 [extra] From 202afb1e64dfecb40326073ec335678185165ec5 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 13:32:56 -0800 Subject: [PATCH 33/49] Exclude github from accessibility linting --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 412a49d078..f34ff5aebc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -368,7 +368,7 @@ jobs: echo -e "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"/usr/bin/chromium-browser\"\n }\n }\n}" > .pa11yci zola serve & npx wait-on http://127.0.0.1:1111 - npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml + npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml --sitemap-exclude https://github.com/bevyengine/bevy/discussions?discussions_q=label%3AFAQ+sort%3Atop typos: runs-on: ubuntu-latest From 1fc2ebe7a9dfce50a861392aff9c97302f13e6a3 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 13:45:16 -0800 Subject: [PATCH 34/49] Try to exclude github again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f34ff5aebc..56867e887a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -368,7 +368,7 @@ jobs: echo -e "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"/usr/bin/chromium-browser\"\n }\n }\n}" > .pa11yci zola serve & npx wait-on http://127.0.0.1:1111 - npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml --sitemap-exclude https://github.com/bevyengine/bevy/discussions?discussions_q=label%3AFAQ+sort%3Atop + npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml --sitemap-exclude "github\.com" typos: runs-on: ubuntu-latest From a45479009285468b4ef6b3ca3f1a2234fe94167e Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 14:18:15 -0800 Subject: [PATCH 35/49] Revert "Try to exclude github again" This reverts commit 1fc2ebe7a9dfce50a861392aff9c97302f13e6a3. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56867e887a..f34ff5aebc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -368,7 +368,7 @@ jobs: echo -e "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"/usr/bin/chromium-browser\"\n }\n }\n}" > .pa11yci zola serve & npx wait-on http://127.0.0.1:1111 - npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml --sitemap-exclude "github\.com" + npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml --sitemap-exclude https://github.com/bevyengine/bevy/discussions?discussions_q=label%3AFAQ+sort%3Atop typos: runs-on: ubuntu-latest From f0101a6c9ae8f7745a73c2ed97fcc600b0334400 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 14:18:22 -0800 Subject: [PATCH 36/49] Revert "Exclude github from accessibility linting" This reverts commit 202afb1e64dfecb40326073ec335678185165ec5. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f34ff5aebc..412a49d078 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -368,7 +368,7 @@ jobs: echo -e "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"/usr/bin/chromium-browser\"\n }\n }\n}" > .pa11yci zola serve & npx wait-on http://127.0.0.1:1111 - npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml --sitemap-exclude https://github.com/bevyengine/bevy/discussions?discussions_q=label%3AFAQ+sort%3Atop + npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml typos: runs-on: ubuntu-latest From 38af6e1f1721f63aef4ece22ceb9d4012ac28207 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 14:47:11 -0800 Subject: [PATCH 37/49] Fix examples issues --- templates/examples-webgpu.html | 3 ++- templates/examples.html | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/examples-webgpu.html b/templates/examples-webgpu.html index e964e14633..bbe3c1fa44 100644 --- a/templates/examples-webgpu.html +++ b/templates/examples-webgpu.html @@ -18,7 +18,8 @@

Support Warning

+ placeholder="Search Example" + aria-label="Search Example" />
{% for subsection in section.subsections %} {% set section = get_section(path=subsection) %} diff --git a/templates/examples.html b/templates/examples.html index c9fd891742..c14dd6bcff 100644 --- a/templates/examples.html +++ b/templates/examples.html @@ -19,7 +19,8 @@ + placeholder="Search Example" + aria-label="Search Example" /> {% for subsection in section.subsections %} {% set section = get_section(path=subsection) %} From 873e5daf786cdbb66488ff9cd934a4d584a205de Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 15:16:28 -0800 Subject: [PATCH 38/49] Remove github faq from accessibility linting --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 412a49d078..2fd71cf7c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -368,7 +368,7 @@ jobs: echo -e "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"/usr/bin/chromium-browser\"\n }\n }\n}" > .pa11yci zola serve & npx wait-on http://127.0.0.1:1111 - npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml + npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml --sitemap-exclude 'faq' typos: runs-on: ubuntu-latest From 7174b69f08c2ac72943a4870f2e6c0b5ed5ec3e6 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 16:01:32 -0800 Subject: [PATCH 39/49] Fix docs footer contrast Was supposed to be fixed in #970, but it got lost in a confusing merge conflict. --- sass/components/_docs-footer.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sass/components/_docs-footer.scss b/sass/components/_docs-footer.scss index 9ce5d7d434..fb1b459102 100644 --- a/sass/components/_docs-footer.scss +++ b/sass/components/_docs-footer.scss @@ -73,7 +73,7 @@ &__dir { margin-bottom: 4px; - color: #666; + color: $secondary-text-color; text-transform: uppercase; font-size: 0.8rem; line-height: 1; From 70af1058fd805bfaeed2d1706ae67e3d52c16250 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 16:44:06 -0800 Subject: [PATCH 40/49] Make migration area tag higher contrast --- sass/pages/_migration_guide.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/sass/pages/_migration_guide.scss b/sass/pages/_migration_guide.scss index c09820943f..4b335969e4 100644 --- a/sass/pages/_migration_guide.scss +++ b/sass/pages/_migration_guide.scss @@ -34,4 +34,5 @@ border-radius: 0.3rem; border-style: solid; border-width: 1px; + background-color: #17171a; } From 13c02a027402870d873bb23355551154d54accbe Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 17:11:54 -0800 Subject: [PATCH 41/49] Make diffs contrasting --- sass/components/_syntax-theme.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sass/components/_syntax-theme.scss b/sass/components/_syntax-theme.scss index c3a64250c7..c47e475e74 100644 --- a/sass/components/_syntax-theme.scss +++ b/sass/components/_syntax-theme.scss @@ -186,7 +186,7 @@ div.incorrect-image { .z-markup.z-deleted, .z-markup.z-deleted.z-git_gutter { - color: #bf616a; + color: #e0858d; } .z-markup.z-changed, From f001207dd4ad227eaf18be8e53afc374499afb88 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 17:22:14 -0800 Subject: [PATCH 42/49] Make anchor links higher contrast --- sass/_utils.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sass/_utils.scss b/sass/_utils.scss index b7e9acdfab..5f9393f3db 100644 --- a/sass/_utils.scss +++ b/sass/_utils.scss @@ -45,7 +45,7 @@ body:not(.show_drafts) .public_draft:not(.active_draft) { .anchor-link:link, .anchor-link:visited { margin-left: 0.3rem; - color: #737373; + color: $color-white; text-shadow: none; font-weight: 500; } From ffc1326b953aab3ecdac234cc603847a3eeaaf8b Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 17:30:50 -0800 Subject: [PATCH 43/49] Fix improper formatting Rust code wasn't in code block so was interpreted as HTML due to angle brackets. --- content/learn/migration-guides/0.12-to-0.13.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/learn/migration-guides/0.12-to-0.13.md b/content/learn/migration-guides/0.12-to-0.13.md index 65cb0fae4a..4e91536258 100644 --- a/content/learn/migration-guides/0.12-to-0.13.md +++ b/content/learn/migration-guides/0.12-to-0.13.md @@ -102,7 +102,7 @@ This means users who want to migrate their .meta files will have to add the `inc - For `add_texture` you need to wrap your `AssetId` in `Some` -- `finish` now returns the atlas texture image directly instead of a handle. Provide the atlas texture to `add` on Assets to get a Handle +- `finish` now returns the atlas texture image directly instead of a handle. Provide the atlas texture to `add` on `Assets` to get a `Handle` ### [Remove the ability to ignore global volume](https://github.com/bevyengine/bevy/pull/11092) From 3c8e23072172838c7ce65772fa63628a9c0ddca3 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Fri, 1 Mar 2024 17:51:52 -0800 Subject: [PATCH 44/49] Add 0.10 news bloom image alternative text --- content/news/2023-03-06-bevy-0.10/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/content/news/2023-03-06-bevy-0.10/index.md b/content/news/2023-03-06-bevy-0.10/index.md index 08ec8b5b1b..0b873d06b5 100644 --- a/content/news/2023-03-06-bevy-0.10/index.md +++ b/content/news/2023-03-06-bevy-0.10/index.md @@ -606,27 +606,27 @@ let's double the `emissive` value of each cube.
1
- + First image of bloom; from Bevy 0.9
2
- + Second image of bloom; from Bevy 0.9 with a tonemapper
3
- + Third image of bloom; from Bevy 0.10
4
- + Fourth image of bloom; from Bevy 0.10 with doubled emissive values
5
- + Fifth image of bloom; from Bevy 0.10 with additive compositing
6
- + The Bevy bloom 3D example
From 92e65d55ce9f1a61a3774bc1c3b9bf3062f95c62 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Sat, 2 Mar 2024 11:04:45 -0800 Subject: [PATCH 45/49] Try to fix errors page --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fd71cf7c5..ccb6c2cb10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -283,10 +283,11 @@ jobs: You have two solutions: - Solution #1: use disjoint queries using [`Without`](https://docs.rs/bevy/*/bevy/ecs/query/struct.Without.html) + Solution #1: use disjoint queries using [`Without`] - As a `Player` entity won't be an `Enemy` at the same time, those two queries will actually never target the same entity. This can be encoded in the query filter with [`Without`](https://docs.rs/bevy/*/bevy/ecs/query/struct.Without.html): + As a `Player` entity won't be an `Enemy` at the same time, those two queries will actually never target the same entity. This can be encoded in the query filter with [`Without`] : + [`Without`]: https://docs.rs/bevy/latest/bevy/ecs/query/struct.Without.html ```rust use bevy::prelude::*; From 0daf2c09cee5d77506e45478f0fecd8aefbf894b Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Sat, 2 Mar 2024 11:24:19 -0800 Subject: [PATCH 46/49] Add alternative text to Bevy logo --- content/news/2020-11-03-bevy-0.3/index.md | 2 +- content/news/2021-08-10-bevys-first-birthday/index.md | 2 +- content/news/2022-08-10-bevys-second-birthday/index.md | 2 +- content/news/2023-08-10-bevys-third-birthday/index.md | 2 +- .../index.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/content/news/2020-11-03-bevy-0.3/index.md b/content/news/2020-11-03-bevy-0.3/index.md index e0f22d078f..66e1faf4f7 100644 --- a/content/news/2020-11-03-bevy-0.3/index.md +++ b/content/news/2020-11-03-bevy-0.3/index.md @@ -44,7 +44,7 @@ This was a massive group effort that spanned multiple projects: Bevy can now run on iOS! - +A beige cube on a green plane running on an iOS emulator You can try out the [Bevy iOS example](https://github.com/bevyengine/bevy/tree/v0.3.0/examples/ios) by following the [instructions here](https://github.com/bevyengine/bevy/tree/v0.3.0/examples#ios). This one is also hot off the presses: some features will work and others probably won't. diff --git a/content/news/2021-08-10-bevys-first-birthday/index.md b/content/news/2021-08-10-bevys-first-birthday/index.md index c194a9f800..cde8fa8cb6 100644 --- a/content/news/2021-08-10-bevys-first-birthday/index.md +++ b/content/news/2021-08-10-bevys-first-birthday/index.md @@ -260,4 +260,4 @@ I'm looking forward to spending the next year with you all! \- [@cart](https://github.com/cart/) - +The Bevy logo diff --git a/content/news/2022-08-10-bevys-second-birthday/index.md b/content/news/2022-08-10-bevys-second-birthday/index.md index 752675a0b1..e566ee84c1 100644 --- a/content/news/2022-08-10-bevys-second-birthday/index.md +++ b/content/news/2022-08-10-bevys-second-birthday/index.md @@ -211,4 +211,4 @@ This year is going to be a big one for Bevy. I'm looking forward to spending it \- [@cart](https://github.com/cart/) - +The Bevy logo diff --git a/content/news/2023-08-10-bevys-third-birthday/index.md b/content/news/2023-08-10-bevys-third-birthday/index.md index b2f5cbe460..f83b170a96 100644 --- a/content/news/2023-08-10-bevys-third-birthday/index.md +++ b/content/news/2023-08-10-bevys-third-birthday/index.md @@ -231,4 +231,4 @@ I'm looking forward to spending another year building Bevy with you all! \- [@cart](https://github.com/cart/) - +The Bevy logo diff --git a/content/news/2023-09-21-community-reflection-on-bevys-third-year/index.md b/content/news/2023-09-21-community-reflection-on-bevys-third-year/index.md index 50ca659995..4f09d35571 100644 --- a/content/news/2023-09-21-community-reflection-on-bevys-third-year/index.md +++ b/content/news/2023-09-21-community-reflection-on-bevys-third-year/index.md @@ -57,4 +57,4 @@ Here is to another year of Bevy! \- [@cart](https://github.com/cart/) - +The Bevy logo From 266916f762333195a205817ca7efe6b2c5503d44 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Sat, 2 Mar 2024 11:33:53 -0800 Subject: [PATCH 47/49] Make "illegal" code contrasting --- sass/components/_syntax-theme.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sass/components/_syntax-theme.scss b/sass/components/_syntax-theme.scss index c47e475e74..3314f5eb72 100644 --- a/sass/components/_syntax-theme.scss +++ b/sass/components/_syntax-theme.scss @@ -223,7 +223,7 @@ div.incorrect-image { .z-invalid.z-illegal { color: #2b303b; - background-color: #bf616a; + background-color: #e0858d; } .z-markup.z-deleted.z-git_gutter { From 1de2b7a50a2f09187e8986a0da324fdedc49bb05 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Sat, 2 Mar 2024 11:49:10 -0800 Subject: [PATCH 48/49] Add more missing alternative texts --- content/news/2020-08-10-introducing-bevy/index.md | 2 +- content/news/2020-08-19-scaling-bevy/index.md | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/content/news/2020-08-10-introducing-bevy/index.md b/content/news/2020-08-10-introducing-bevy/index.md index 75652e9f24..f3bbb0e1a4 100644 --- a/content/news/2020-08-10-introducing-bevy/index.md +++ b/content/news/2020-08-10-introducing-bevy/index.md @@ -1198,4 +1198,4 @@ If any of this sounds interesting to you, I encourage you to check out [Bevy on I want Bevy to become a vibrant developer community ... thats actually why I chose the name! A Bevy is a group of birds, just like we are a group of game developers. Join the Bevy! - +The Bevy logo diff --git a/content/news/2020-08-19-scaling-bevy/index.md b/content/news/2020-08-19-scaling-bevy/index.md index 504fd30888..2069ce026d 100644 --- a/content/news/2020-08-19-scaling-bevy/index.md +++ b/content/news/2020-08-19-scaling-bevy/index.md @@ -16,31 +16,31 @@ First, I want to take a moment to highlight just how wild the last week has been

3rd most popular /r/rust post of all time

- + The Introducing Bevy article at third place in Reddit's top rankings

#2 on Hacker News

- + The Introducing Bevy article at second place on Hacker News' top stories

2,200 Github Stars

- + A star with the word

26 contributors

- + A list of Bevy engine contributors profile pictures and the number 26

644 Discord Users

- + Text saying
From adf29899ab7a09526b89587dc4c4134ecd63e0e9 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Sun, 3 Mar 2024 12:50:12 -0800 Subject: [PATCH 49/49] Make `generate-*` and build-website need accesibility linting To try and prevent starting jobs when the CI will fail anyway. --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccb6c2cb10..6c870c18ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -388,7 +388,7 @@ jobs: echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode' generate-assets: - needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos] + needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos, accessibility-linting] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -426,7 +426,7 @@ jobs: retention-days: 1 generate-errors: - needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos] + needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos, accessibility-linting] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -453,7 +453,7 @@ jobs: retention-days: 1 generate-wasm-examples: - needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos] + needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos, accessibility-linting] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -480,7 +480,7 @@ jobs: retention-days: 1 generate-community: - needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos] + needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos, accessibility-linting] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -508,7 +508,7 @@ jobs: build-website: runs-on: ubuntu-latest - needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos, generate-assets, generate-errors, generate-wasm-examples, generate-community] + needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos, accessibility-linting, generate-assets, generate-errors, generate-wasm-examples, generate-community] steps: - uses: actions/checkout@v4