From 3e294375b63d5ec288ffc05d85c6b2e376500a73 Mon Sep 17 00:00:00 2001 From: Dom H Date: Mon, 18 Apr 2022 14:40:35 +0100 Subject: [PATCH 01/88] feat(docs): Provide current status of Displays --- docs/docs/features/displays.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/docs/features/displays.md b/docs/docs/features/displays.md index 2b3d001d..f18b3acd 100644 --- a/docs/docs/features/displays.md +++ b/docs/docs/features/displays.md @@ -1,6 +1,10 @@ --- -title: OLED Displays -sidebar_label: OLED Displays +title: Displays +sidebar_label: Displays --- -TODO: Documentation on OLED displays. +Displays in ZMK are currently a proof of concept and official support is coming soon. + +:::info +Although ZMK-powered keyboards _are_ capable of utilizing OLED and ePaper displays, the Displays feature is not yet considered production-ready due to an issue where the display remains blank after resuming from [external power cutoff](../behaviors/power#external-power-control). This issue can be tracked on GitHub at [zmkfirmware/zmk #674](https://github.com/zmkfirmware/zmk/issues/674). +::: From d0176f368585c5bbb0a6a5f69465eb083349eff0 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 19 Apr 2022 01:28:22 +0000 Subject: [PATCH 02/88] fix(boards): Enable battery driver for XIAO BLE. --- app/boards/seeeduino_xiao_ble.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/app/boards/seeeduino_xiao_ble.conf b/app/boards/seeeduino_xiao_ble.conf index 92367028..22e6a9b5 100644 --- a/app/boards/seeeduino_xiao_ble.conf +++ b/app/boards/seeeduino_xiao_ble.conf @@ -3,6 +3,7 @@ CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n CONFIG_UART_INTERRUPT_DRIVEN=n +CONFIG_ZMK_BATTERY_VOLTAGE_DIVIDER=y CONFIG_ZMK_USB=y CONFIG_ZMK_BLE=y From bbaa6af81b0f70e117264a087a04935b0268d047 Mon Sep 17 00:00:00 2001 From: elagil Date: Sun, 3 Apr 2022 18:53:37 +0200 Subject: [PATCH 03/88] feat(ci): introduce reusable user-config workflow --- .github/workflows/build-user-config.yml | 96 +++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 .github/workflows/build-user-config.yml diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml new file mode 100644 index 00000000..ea889db0 --- /dev/null +++ b/.github/workflows/build-user-config.yml @@ -0,0 +1,96 @@ +name: Reusable user config build + +on: + workflow_call: + +jobs: + matrix: + runs-on: ubuntu-latest + name: Fetch Build Keyboards + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install yaml2json + run: python3 -m pip install remarshal + - id: set-matrix + name: Fetch Build Matrix + run: | + matrix=$(yaml2json build.yaml | jq -c .) + yaml2json build.yaml + echo "::set-output name=matrix::${matrix}" + build: + runs-on: ubuntu-latest + container: + image: zmkfirmware/zmk-build-arm:stable + needs: matrix + name: Build + strategy: + fail-fast: false + matrix: ${{fromJson(needs.matrix.outputs.matrix)}} + steps: + - name: Prepare variables + id: variables + run: | + if [ -n "${{ matrix.shield }}" ]; then + EXTRA_CMAKE_ARGS="-DSHIELD=${{ matrix.shield }}" + ARTIFACT_NAME="${{ matrix.shield }}-${{ matrix.board }}-zmk" + DISPLAY_NAME="${{ matrix.shield }} - ${{ matrix.board }}" + else + EXTRA_CMAKE_ARGS= + DISPLAY_NAME="${{ matrix.board }}" + ARTIFACT_NAME="${{ matrix.board }}-zmk" + fi + echo ::set-output name=extra-cmake-args::${EXTRA_CMAKE_ARGS} + echo ::set-output name=artifact-name::${ARTIFACT_NAME} + echo ::set-output name=display-name::${DISPLAY_NAME} + - name: Checkout + uses: actions/checkout@v2 + - name: Cache west modules + uses: actions/cache@v2 + env: + cache-name: cache-zephyr-modules + with: + path: | + modules/ + tools/ + zephyr/ + bootloader/ + zmk/ + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('manifest-dir/west.yml') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: West Init + run: west init -l config + - name: West Update + run: west update + - name: West Zephyr export + run: west zephyr-export + - name: West Build (${{ steps.variables.outputs.display-name }}) + run: | + west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/config ${{ steps.variables.outputs.extra-cmake-args }} ${{ matrix.cmake-args }} + - name: ${{ steps.variables.outputs.display-name }} DTS File + if: ${{ always() }} + run: | + if [ -f "build/zephyr/${{ matrix.board }}.dts.pre.tmp" ]; then cat -n build/zephyr/${{ matrix.board }}.dts.pre.tmp; fi + if [ -f "build/zephyr/zephyr.dts" ]; then cat -n build/zephyr/zephyr.dts; fi + - name: ${{ steps.variables.outputs.display-name }} Kconfig file + run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$" + - name: Rename artifacts + run: | + mkdir build/artifacts + if [ -f build/zephyr/zmk.uf2 ] + then + cp build/zephyr/zmk.uf2 "build/artifacts/${{ steps.variables.outputs.artifact-name }}.uf2" + elif [ -f build/zephyr/zmk.hex ] + then + cp build/zephyr/zmk.hex "build/artifacts/${{ steps.variables.outputs.artifact-name }}.hex" + fi + - name: Archive (${{ steps.variables.outputs.display-name }}) + uses: actions/upload-artifact@v2 + with: + name: firmware + path: build/artifacts From b1687eec2a1a8a4e3110e89fdfb553fbc5895fa9 Mon Sep 17 00:00:00 2001 From: Adrian Date: Sun, 3 Apr 2022 18:53:37 +0200 Subject: [PATCH 04/88] fix(ci): path to custom west.yml Co-authored-by: Joel Spadin --- .github/workflows/build-user-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index ea889db0..de35ffb4 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -58,7 +58,7 @@ jobs: zephyr/ bootloader/ zmk/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('manifest-dir/west.yml') }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- From 2c4ca7390b5904b0dbd5f88d321ba5bdccddf607 Mon Sep 17 00:00:00 2001 From: elagil Date: Sun, 3 Apr 2022 18:53:37 +0200 Subject: [PATCH 05/88] feat(ci): Use input variables for configuring user build --- .github/workflows/build-user-config.yml | 28 +++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index de35ffb4..7da9a546 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -2,6 +2,22 @@ name: Reusable user config build on: workflow_call: + inputs: + build_matrix_path: + description: 'Path to the build matrix file' + default: 'build.yaml' + required: false + type: string + config_path: + description: 'Path to the config directory' + default: 'config' + required: false + type: string + fallback_binary: + description: 'Fallback binary format, if no *.uf2 file was built' + default: 'bin' + required: false + type: string jobs: matrix: @@ -17,8 +33,8 @@ jobs: - id: set-matrix name: Fetch Build Matrix run: | - matrix=$(yaml2json build.yaml | jq -c .) - yaml2json build.yaml + matrix=$(yaml2json ${{ inputs.build_matrix_path }} | jq -c .) + yaml2json ${{ inputs.build_matrix_path }} echo "::set-output name=matrix::${matrix}" build: runs-on: ubuntu-latest @@ -64,14 +80,14 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- - name: West Init - run: west init -l config + run: west init -l ${{ inputs.config_path }} - name: West Update run: west update - name: West Zephyr export run: west zephyr-export - name: West Build (${{ steps.variables.outputs.display-name }}) run: | - west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/config ${{ steps.variables.outputs.extra-cmake-args }} ${{ matrix.cmake-args }} + west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ steps.variables.outputs.extra-cmake-args }} ${{ matrix.cmake-args }} - name: ${{ steps.variables.outputs.display-name }} DTS File if: ${{ always() }} run: | @@ -85,9 +101,9 @@ jobs: if [ -f build/zephyr/zmk.uf2 ] then cp build/zephyr/zmk.uf2 "build/artifacts/${{ steps.variables.outputs.artifact-name }}.uf2" - elif [ -f build/zephyr/zmk.hex ] + elif [ -f build/zephyr/zmk.${{ inputs.fallback_binary }} ] then - cp build/zephyr/zmk.hex "build/artifacts/${{ steps.variables.outputs.artifact-name }}.hex" + cp build/zephyr/zmk.${{ inputs.fallback_binary }} "build/artifacts/${{ steps.variables.outputs.artifact-name }}.${{ inputs.fallback_binary }}" fi - name: Archive (${{ steps.variables.outputs.display-name }}) uses: actions/upload-artifact@v2 From 0f70f4005497381062e7edd5fc9f09e3b2e1fb0b Mon Sep 17 00:00:00 2001 From: elagil Date: Sun, 3 Apr 2022 18:53:37 +0200 Subject: [PATCH 06/88] style(ci): add empty lines for readability --- .github/workflows/build-user-config.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 7da9a546..3b9912f9 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -28,14 +28,17 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Install yaml2json run: python3 -m pip install remarshal + - id: set-matrix name: Fetch Build Matrix run: | matrix=$(yaml2json ${{ inputs.build_matrix_path }} | jq -c .) yaml2json ${{ inputs.build_matrix_path }} echo "::set-output name=matrix::${matrix}" + build: runs-on: ubuntu-latest container: @@ -61,8 +64,10 @@ jobs: echo ::set-output name=extra-cmake-args::${EXTRA_CMAKE_ARGS} echo ::set-output name=artifact-name::${ARTIFACT_NAME} echo ::set-output name=display-name::${DISPLAY_NAME} + - name: Checkout uses: actions/checkout@v2 + - name: Cache west modules uses: actions/cache@v2 env: @@ -79,12 +84,16 @@ jobs: ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- + - name: West Init run: west init -l ${{ inputs.config_path }} + - name: West Update run: west update + - name: West Zephyr export run: west zephyr-export + - name: West Build (${{ steps.variables.outputs.display-name }}) run: | west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ steps.variables.outputs.extra-cmake-args }} ${{ matrix.cmake-args }} @@ -93,8 +102,10 @@ jobs: run: | if [ -f "build/zephyr/${{ matrix.board }}.dts.pre.tmp" ]; then cat -n build/zephyr/${{ matrix.board }}.dts.pre.tmp; fi if [ -f "build/zephyr/zephyr.dts" ]; then cat -n build/zephyr/zephyr.dts; fi + - name: ${{ steps.variables.outputs.display-name }} Kconfig file run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$" + - name: Rename artifacts run: | mkdir build/artifacts @@ -105,6 +116,7 @@ jobs: then cp build/zephyr/zmk.${{ inputs.fallback_binary }} "build/artifacts/${{ steps.variables.outputs.artifact-name }}.${{ inputs.fallback_binary }}" fi + - name: Archive (${{ steps.variables.outputs.display-name }}) uses: actions/upload-artifact@v2 with: From e676c79929a50c1c51bb7a7dc1c2b11043a49c17 Mon Sep 17 00:00:00 2001 From: elagil Date: Sun, 3 Apr 2022 18:53:37 +0200 Subject: [PATCH 07/88] fix(ci): generalize path to west.yml --- .github/workflows/build-user-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 3b9912f9..78d324ed 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -79,7 +79,7 @@ jobs: zephyr/ bootloader/ zmk/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('${{ inputs.config_path }}/west.yml') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- From b7771fbdd299e9dbfa606c8c3b1551c5acd401e6 Mon Sep 17 00:00:00 2001 From: elagil Date: Sun, 3 Apr 2022 18:57:35 +0200 Subject: [PATCH 08/88] ci: updated for Zephyr 3.0, cache invalidation --- .github/workflows/build-user-config.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 78d324ed..0f22bd99 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -64,14 +64,15 @@ jobs: echo ::set-output name=extra-cmake-args::${EXTRA_CMAKE_ARGS} echo ::set-output name=artifact-name::${ARTIFACT_NAME} echo ::set-output name=display-name::${DISPLAY_NAME} + echo ::set-output name=zephyr-version::${ZEPHYR_VERSION} - name: Checkout uses: actions/checkout@v2 - name: Cache west modules - uses: actions/cache@v2 + uses: actions/cache@v3.0.1 env: - cache-name: cache-zephyr-modules + cache-name: cache-zephyr-${{ steps.variables.outputs.zephyr-version }}-modules with: path: | modules/ @@ -97,12 +98,7 @@ jobs: - name: West Build (${{ steps.variables.outputs.display-name }}) run: | west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ steps.variables.outputs.extra-cmake-args }} ${{ matrix.cmake-args }} - - name: ${{ steps.variables.outputs.display-name }} DTS File - if: ${{ always() }} - run: | - if [ -f "build/zephyr/${{ matrix.board }}.dts.pre.tmp" ]; then cat -n build/zephyr/${{ matrix.board }}.dts.pre.tmp; fi - if [ -f "build/zephyr/zephyr.dts" ]; then cat -n build/zephyr/zephyr.dts; fi - + - name: ${{ steps.variables.outputs.display-name }} Kconfig file run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$" From 142d5187342e37b524b969f3e87b131478f1ac2b Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 5 Apr 2022 08:28:45 +0200 Subject: [PATCH 09/88] ci: make cache hash independent of input parameter --- .github/workflows/build-user-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 0f22bd99..226a53c1 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -80,7 +80,7 @@ jobs: zephyr/ bootloader/ zmk/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('${{ inputs.config_path }}/west.yml') }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- From 3ff8014cf299d682f7e76296c0c7e8e53c041a87 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 8 Apr 2022 18:44:12 +0200 Subject: [PATCH 10/88] ci: sort build configuration output Co-authored-by: Albert Y <76888457+filterpaper@users.noreply.github.com> --- .github/workflows/build-user-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 226a53c1..cb462b1a 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -100,7 +100,7 @@ jobs: west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ steps.variables.outputs.extra-cmake-args }} ${{ matrix.cmake-args }} - name: ${{ steps.variables.outputs.display-name }} Kconfig file - run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$" + run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$" | sort - name: Rename artifacts run: | From 6308ab942661656e9ca06787ebb0918df6ffd268 Mon Sep 17 00:00:00 2001 From: Dom H Date: Mon, 18 Apr 2022 17:44:43 +0100 Subject: [PATCH 11/88] fix(docs): Ensure relative links always resolve Linking to the document _file path_ rather than the document _URL_ ensures that the link resolves regardless of trailing slash config. More information is at https://docusaurus.io/docs/docs-markdown-features --- docs/docs/features/displays.md | 2 +- docs/docs/intro.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/features/displays.md b/docs/docs/features/displays.md index f18b3acd..283bf880 100644 --- a/docs/docs/features/displays.md +++ b/docs/docs/features/displays.md @@ -6,5 +6,5 @@ sidebar_label: Displays Displays in ZMK are currently a proof of concept and official support is coming soon. :::info -Although ZMK-powered keyboards _are_ capable of utilizing OLED and ePaper displays, the Displays feature is not yet considered production-ready due to an issue where the display remains blank after resuming from [external power cutoff](../behaviors/power#external-power-control). This issue can be tracked on GitHub at [zmkfirmware/zmk #674](https://github.com/zmkfirmware/zmk/issues/674). +Although ZMK-powered keyboards _are_ capable of utilizing OLED and ePaper displays, the Displays feature is not yet considered production-ready due to an issue where the display remains blank after resuming from [external power cutoff](../behaviors/power.md#external-power-control). This issue can be tracked on GitHub at [zmkfirmware/zmk #674](https://github.com/zmkfirmware/zmk/issues/674). ::: diff --git a/docs/docs/intro.md b/docs/docs/intro.md index 91b4e21b..142dcafc 100644 --- a/docs/docs/intro.md +++ b/docs/docs/intro.md @@ -32,7 +32,7 @@ ZMK is currently missing some features found in other popular firmware. This tab | [Backlight](features/backlight.md) | ✅ | ✅ | ✅ | | One Shot Keys | ✅ | ✅ | ✅ | | [Combo Keys](features/combos.md) | ✅ | | ✅ | -| [Macros](behaviors/macros) | ✅ | ✅ | ✅ | +| [Macros](behaviors/macros.md) | ✅ | ✅ | ✅ | | Mouse Keys | 🚧 | ✅ | ✅ | | Low Active Power Usage | ✅ | | | | Low Power Sleep States | ✅ | ✅ | | From 56d5f4153c22213dd032452ad846272a5ed12246 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 03:35:40 +0000 Subject: [PATCH 12/88] chore(deps): bump async from 2.6.3 to 2.6.4 in /docs Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4. - [Release notes](https://github.com/caolan/async/releases) - [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md) - [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4) --- updated-dependencies: - dependency-name: async dependency-type: indirect ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index c72f901b..18a272ca 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -5858,9 +5858,9 @@ "dev": true }, "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "requires": { "lodash": "^4.17.14" } From e13ea3fbfb46c41a188185faaa8451b9f430fe8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Apr 2022 05:09:13 +0000 Subject: [PATCH 13/88] chore(deps): bump @fortawesome/react-fontawesome in /docs Bumps [@fortawesome/react-fontawesome](https://github.com/FortAwesome/react-fontawesome) from 0.1.16 to 0.1.18. - [Release notes](https://github.com/FortAwesome/react-fontawesome/releases) - [Changelog](https://github.com/FortAwesome/react-fontawesome/blob/master/CHANGELOG.md) - [Commits](https://github.com/FortAwesome/react-fontawesome/compare/0.1.16...0.1.18) --- updated-dependencies: - dependency-name: "@fortawesome/react-fontawesome" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 20 ++++++++++++++++---- docs/package.json | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 18a272ca..c87e0aba 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -4825,11 +4825,23 @@ } }, "@fortawesome/react-fontawesome": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.16.tgz", - "integrity": "sha512-aLmzDwC9rEOAJv2UJdMns89VZR5Ry4IHu5dQQh24Z/lWKEm44lfQr1UNalZlkUaQN8d155tNh+CS7ntntj1VMA==", + "version": "0.1.18", + "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.18.tgz", + "integrity": "sha512-RwLIB4TZw0M9gvy5u+TusAA0afbwM4JQIimNH/j3ygd6aIvYPQLqXMhC9ErY26J23rDPyDZldIfPq/HpTTJ/tQ==", "requires": { - "prop-types": "^15.7.2" + "prop-types": "^15.8.1" + }, + "dependencies": { + "prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + } } }, "@hapi/hoek": { diff --git a/docs/package.json b/docs/package.json index 755482b6..978795a8 100644 --- a/docs/package.json +++ b/docs/package.json @@ -19,7 +19,7 @@ "@docusaurus/preset-classic": "^2.0.0-beta.18", "@fortawesome/fontawesome-svg-core": "^1.2.32", "@fortawesome/free-solid-svg-icons": "^5.15.3", - "@fortawesome/react-fontawesome": "^0.1.16", + "@fortawesome/react-fontawesome": "^0.1.18", "@mdx-js/react": "^1.6.22", "classnames": "^2.2.6", "js-yaml": "^4.1.0", From 158ac2720724123b91e6534c95710804cc49243e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Apr 2022 10:03:28 +0000 Subject: [PATCH 14/88] chore(deps-dev): bump eslint-plugin-mdx from 1.13.0 to 1.17.0 in /docs Bumps [eslint-plugin-mdx](https://github.com/mdx-js/eslint-mdx) from 1.13.0 to 1.17.0. - [Release notes](https://github.com/mdx-js/eslint-mdx/releases) - [Changelog](https://github.com/mdx-js/eslint-mdx/blob/master/CHANGELOG.md) - [Commits](https://github.com/mdx-js/eslint-mdx/compare/v1.13.0...v1.17.0) --- updated-dependencies: - dependency-name: eslint-plugin-mdx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 96 +++++++++++++++++------------------------- docs/package.json | 2 +- 2 files changed, 40 insertions(+), 58 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index c87e0aba..d09c5888 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -7581,21 +7581,29 @@ "dev": true }, "eslint-mdx": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/eslint-mdx/-/eslint-mdx-1.13.0.tgz", - "integrity": "sha512-Yqc5mnh2JMEm9yTp6NUnfOg1wXGLibCqQTjvb5+EQH4LtQEmWG0DtqWUXWHRy0gmy/3lBdN9Zkc5KGwAizaTrQ==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/eslint-mdx/-/eslint-mdx-1.17.0.tgz", + "integrity": "sha512-O8+JRfwCzpoR2P6zUI1GDAAM/bsuzcoBS1ArvpQrgQO/E2Km0vBmM15ukiJxZ+YUh5d+qDlrqha0fZB50MojJQ==", "dev": true, "requires": { + "cosmiconfig": "^7.0.1", "remark-mdx": "^1.6.22", "remark-parse": "^8.0.3", - "tslib": "^2.2.0", - "unified": "^9.2.1" + "remark-stringify": "^8.1.1", + "tslib": "^2.3.1", + "unified": "^9.2.2" }, "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, "unified": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.1.tgz", - "integrity": "sha512-juWjuI8Z4xFg8pJbnEZ41b5xjGUWGHqXALmBZ3FC3WX0PIx1CZBIIJ6mXbYMcf6Yw4Fi0rFUTA1cdz/BglbOhA==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", "dev": true, "requires": { "bail": "^1.0.0", @@ -7609,58 +7617,32 @@ } }, "eslint-plugin-markdown": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-2.2.0.tgz", - "integrity": "sha512-Ctuc7aP1tU92qnFwVO1wDLEzf1jqMxwRkcSTw7gjbvnEqfh5CKUcTXM0sxg8CB2KDXrqpTuMZPgJ1XE9Olr7KA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-2.2.1.tgz", + "integrity": "sha512-FgWp4iyYvTFxPwfbxofTvXxgzPsDuSKHQy2S+a8Ve6savbujey+lgrFFbXQA0HPygISpRYWYBjooPzhYSF81iA==", "dev": true, "requires": { "mdast-util-from-markdown": "^0.8.5" } }, "eslint-plugin-mdx": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mdx/-/eslint-plugin-mdx-1.13.0.tgz", - "integrity": "sha512-oZ/R9OmSx1gZs52CO58HTHlJXRKoZtF6ZMaWP+sOcSGMFxoddoPr9PDgpP52ab5TWu5yVl5guR9D+GMfzkR2Uw==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mdx/-/eslint-plugin-mdx-1.17.0.tgz", + "integrity": "sha512-Kicizy+fbfsB2UxTDXP92qTtFqITApu4v4DRQUfXMoPwBHeQRvZnaEtXu2S9aia51GYRYsMSqUvoPPih/5oB+g==", "dev": true, "requires": { - "cosmiconfig": "^7.0.0", - "eslint-mdx": "^1.13.0", - "eslint-plugin-markdown": "^2.1.0", - "remark-mdx": "^1.6.22", - "remark-parse": "^8.0.3", - "remark-stringify": "^8.1.1", - "synckit": "^0.1.5", - "tslib": "^2.2.0", - "unified": "^9.2.1", + "eslint-mdx": "^1.17.0", + "eslint-plugin-markdown": "^2.2.1", + "synckit": "^0.4.1", + "tslib": "^2.3.1", "vfile": "^4.2.1" }, "dependencies": { - "cosmiconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", - "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", - "dev": true, - "requires": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - } - }, - "unified": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.1.tgz", - "integrity": "sha512-juWjuI8Z4xFg8pJbnEZ41b5xjGUWGHqXALmBZ3FC3WX0PIx1CZBIIJ6mXbYMcf6Yw4Fi0rFUTA1cdz/BglbOhA==", - "dev": true, - "requires": { - "bail": "^1.0.0", - "extend": "^3.0.0", - "is-buffer": "^2.0.0", - "is-plain-obj": "^2.0.0", - "trough": "^1.0.0", - "vfile": "^4.0.0" - } + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true } } }, @@ -12827,19 +12809,19 @@ } }, "synckit": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.1.5.tgz", - "integrity": "sha512-s9rDbMJAF5SDEwBGH/DvbN/fb5N1Xu1boL4Uv66idbCbtosNX3ikUsFvGhROmPXsvlMYMcT5ksmkU5RSnkFi9Q==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.4.1.tgz", + "integrity": "sha512-ngUh0+s+DOqEc0sGnrLaeNjbXp0CWHjSGFBqPlQmQ+oN/OfoDoYDBXPh+b4qs1M5QTk5nuQ3AmVz9+2xiY/ldw==", "dev": true, "requires": { - "tslib": "^2.2.0", + "tslib": "^2.3.1", "uuid": "^8.3.2" }, "dependencies": { - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true } } diff --git a/docs/package.json b/docs/package.json index 978795a8..f8ef6dfe 100644 --- a/docs/package.json +++ b/docs/package.json @@ -52,7 +52,7 @@ "@types/react-router-dom": "^5.1.7", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-mdx": "^1.13.0", + "eslint-plugin-mdx": "^1.17.0", "eslint-plugin-react": "^7.28.0", "json-schema-to-typescript": "^10.1.5", "mustache": "^4.2.0", From c8c273d83b6806e53116748b8e5a216ed52ca1a1 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sun, 17 Apr 2022 14:30:22 +0000 Subject: [PATCH 15/88] feat(docs): Add TOC to supported hardware page. --- docs/docs/hardware.mdx | 42 +++++++- docs/src/components/hardware-list.tsx | 133 ++++++++------------------ docs/src/components/hardware-utils.ts | 70 ++++++++++++++ docs/tsconfig.json | 2 +- 4 files changed, 151 insertions(+), 96 deletions(-) create mode 100644 docs/src/components/hardware-utils.ts diff --git a/docs/docs/hardware.mdx b/docs/docs/hardware.mdx index 76a0a3cb..d2b6aa9d 100644 --- a/docs/docs/hardware.mdx +++ b/docs/docs/hardware.mdx @@ -6,12 +6,48 @@ sidebar_label: Supported Hardware import HardwareList from "@site/src/components/hardware-list"; import Metadata from "@site/src/data/hardware-metadata.json"; +import Heading from "@theme/Heading"; + +import { groupedMetadata } from "@site/src/components/hardware-utils"; + +export const toc = [ + { + value: "Onboard Controller Keyboards", + id: "onboard", + level: 2, + }, + { + value: "Composite Keyboards", + id: "composite", + level: 2, + }, + ...Object.values(groupedMetadata(Metadata).interconnects).map( + ({ interconnect }) => ({ + value: `${interconnect.name} Interconnect`, + id: interconnect.id, + level: 3, + }) + ), + { + value: "Other Hardware", + id: "other-hardware", + level: 2, + }, + { + value: "Contributing", + id: "contributing", + level: 2, + }, +]; + With the solid technical foundation of Zephyr™ RTOS, ZMK can support a wide diversity of hardware targets. That being said, there are currently only a few specific [boards](/docs/faq#what-is-a-board)/[shields](faq.md#what-is-a-shield) that have been implemented and tested by the ZMK contributors. -## Other Hardware + + Other Hardware + In addition to the basic keyboard functionality, there is some initial support for additional keyboard hardware: @@ -22,6 +58,8 @@ In addition to the basic keyboard functionality, there is some initial support f Until detailed documentation is available, feel free to ask questions about how these are supported in the [Discord server](https://zmk.dev/community/discord/invite). -## Contributing + + Contributing + If you'd like to add support for a new keyboard shield, head over to the [New Keyboard Shield](development/new-shield.md) documentation. diff --git a/docs/src/components/hardware-list.tsx b/docs/src/components/hardware-list.tsx index e611f5cf..54034ada 100644 --- a/docs/src/components/hardware-list.tsx +++ b/docs/src/components/hardware-list.tsx @@ -1,11 +1,9 @@ import React from "react"; -import { - Board, - HardwareMetadata, - Interconnect, - Shield, -} from "../hardware-metadata"; +import Heading from "@theme/Heading"; + +import { HardwareMetadata } from "../hardware-metadata"; +import { groupedMetadata, InterconnectDetails } from "./hardware-utils"; interface HardwareListProps { items: HardwareMetadata[]; @@ -53,12 +51,6 @@ function HardwareLineItem({ item }: { item: HardwareMetadata }) { ); } -interface InterconnectDetails { - interconnect?: Interconnect; - boards: Board[]; - shields: Shield[]; -} - function mapInterconnect({ interconnect, boards, @@ -70,15 +62,17 @@ function mapInterconnect({ return (
-

{interconnect.name} Interconnect

+ + {interconnect.name} Interconnect + {interconnect.description &&

{interconnect.description}

} -
Boards
+ Boards
    {boards.map((s) => ( ))}
-
Shields
+ Shields