Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Mdx #3795

Draft
wants to merge 101 commits into
base: master
Choose a base branch
from
Draft

Mdx #3795

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
f309be0
feat(macro): copy kcking mdx branch
geoffjay Nov 11, 2023
980c41b
feat(macro): copy kcking mdx branch
geoffjay Nov 11, 2023
a2b154f
feat(macro): add better support for lists and tables
geoffjay Nov 11, 2023
91443d4
Fix links to authors in the changelog generator (#3421)
its-the-shrimp Sep 29, 2023
800ffa2
Remove the dependency on `boolinator` (#3420)
its-the-shrimp Sep 29, 2023
6791ab0
Bump the cargo-deps group with 9 updates (#3424)
dependabot[bot] Sep 29, 2023
68bc163
Add CallbackRef that takes ref in argument instead of value (#3419)
cecton Sep 29, 2023
0b6bee4
Cleanup examples/function_todomvc/src/main.rs (#3413)
ronanM Sep 30, 2023
b489671
Update children.mdx (#3418)
fdvmoreira Sep 30, 2023
f03706c
Bump actions/checkout from 3 to 4 (#3433)
dependabot[bot] Oct 2, 2023
ec5f1e6
Add safe mode to joke api (#3429)
Jupp56 Oct 2, 2023
94359fc
docs: fix typo (#3437)
0xflotus Oct 2, 2023
3ec1052
Remove use of ChildrenRenderer from nested_list (#3436)
futursolo Oct 3, 2023
90b7e97
Add body tags (#3425)
moyeah Oct 3, 2023
79d2572
Fix typo in editor-setup.mdx (#3432)
eltociear Oct 4, 2023
7240747
Read for pull_request.user.login when checking for maintainer (#3445)
ranile Oct 5, 2023
33315c8
Add IntoPropValue impl for converting to VList (#3444)
ranile Oct 5, 2023
052df7b
Bump the cargo-deps group with 4 updates (#3450)
dependabot[bot] Oct 6, 2023
a6747d7
Fix typo in introduction (#3448)
JonathanPicques Oct 6, 2023
2cd3261
Update CHANGELOG.md (#3451)
Shivanipalya26 Oct 6, 2023
bf7889f
Bump postcss from 8.4.21 to 8.4.31 in /website (#3446)
dependabot[bot] Oct 6, 2023
4de5ef4
Agent: Avoiding clone of WorkerBridge and WorkerProviderState (#3435)
deftsp Oct 9, 2023
1e848fd
Jemalloc only works on *nix (#3474)
ranile Oct 20, 2023
4958b57
Bump the cargo-deps group with 11 updates (#3475)
dependabot[bot] Oct 22, 2023
8693978
Fix 0.20 to 0.21 migration guide (#3460)
abusch Oct 22, 2023
eadd987
Bump @babel/traverse from 7.21.4 to 7.23.2 in /website (#3473)
dependabot[bot] Oct 22, 2023
4a75a3f
Bump rustix from 0.37.20 to 0.37.25 (#3472)
dependabot[bot] Oct 22, 2023
1fa27a0
Benchmark crate for core features (#3487)
cecton Oct 27, 2023
cfbaf74
benchmark-core: fix wrong file name in workflow (#3491)
cecton Oct 27, 2023
bf8acfe
benchmark-core: fix huh wrong message (#3492)
cecton Oct 27, 2023
22999ce
Make Html (VNode) cheap to clone (#3431)
cecton Oct 27, 2023
395eec8
Remove ToHtml trait (#3453)
ranile Oct 28, 2023
f32bf41
Fix Typo (#3495)
FarukhS52 Oct 28, 2023
1f98c59
Remove deprecated `class=(...)` syntax (#3497)
its-the-shrimp Oct 28, 2023
95aedd3
Bump the cargo-deps group with 5 updates (#3490)
dependabot[bot] Oct 28, 2023
ac74046
Allow setting JsValue as properties (#3458)
ranile Oct 28, 2023
38e8fad
Bump actions/checkout from 3 to 4 (#3503)
dependabot[bot] Nov 2, 2023
35234d3
Bump actions/setup-node from 3 to 4 (#3502)
dependabot[bot] Nov 2, 2023
270f65b
Update to Docusaurus v3 (#3518)
ranile Nov 5, 2023
debe733
add the methods and From impls (#3519)
its-the-shrimp Nov 5, 2023
e66d860
Fix website search (#3522)
ranile Nov 8, 2023
5d09735
chore(mdx): update deps
geoffjay Jan 25, 2025
9bcfec1
Add yew-autoprops to website documentation (#3505)
cecton Dec 22, 2023
838b53c
use_state: fix/clarify docstring (#3570)
ydirson Dec 23, 2023
5ff69d2
Bump openssl from 0.10.55 to 0.10.60 (#3545)
dependabot[bot] Jan 4, 2024
909cfb6
Bump libgit2-sys from 0.16.1+1.7.1 to 0.16.2+1.7.2 (#3602)
dependabot[bot] Feb 14, 2024
a7303d9
Bump mio from 0.8.8 to 0.8.11 (#3624)
dependabot[bot] Mar 5, 2024
5dd4400
Fix: Hydratation of empty lists next to components. (#3630)
WorldSEnder Mar 12, 2024
36bdd95
Add generic type hints to boxed hooks (#3633)
Ichmed Mar 14, 2024
996643d
Namespace support for `VRaw`. (#3640)
finnbear May 10, 2024
b18d871
Fix CI (#3679)
kawadakk Jul 25, 2024
c39160c
Update implicit-clone to 0.5.0 (#3682)
cecton Jul 25, 2024
a4d2228
feat(macro): add `inert` to the boolean attributes list (#3678)
kawadakk Jul 25, 2024
56e3ce2
Bump actions/upload-artifact from 3 to 4 (#3576)
dependabot[bot] Jul 25, 2024
17cc19c
Allow `Self` in prop fields (#3569)
its-the-shrimp Jul 25, 2024
e1f2175
Fix CI for 1.80 (#3691)
ranile Jul 25, 2024
9c863c5
Fix typos in introduction.mdx (#3605)
rmschindler Jul 26, 2024
305f9cc
remove repetitive words (#3628)
gcmutator Jul 26, 2024
7a96f88
Fix typo in the docs (#3631)
astariul Jul 26, 2024
910919b
Raise MSRV to 1.76 (#3693)
ranile Aug 3, 2024
19ba4af
fix example serving (#3701)
WorldSEnder Aug 3, 2024
a677c4c
Add use_ref (#3548)
ColonelThirtyTwo Aug 3, 2024
e1bf6e3
use_future_with: simplify code a bit by using read-only use_memo rath…
Ekleog Aug 3, 2024
17f5e80
Bump the cargo-deps group across 1 directory with 52 updates (#3705)
dependabot[bot] Aug 3, 2024
50960f6
Bump openssl from 0.10.60 to 0.10.66 (#3690)
dependabot[bot] Aug 4, 2024
24513f1
Modernize github workflows (#3711)
WorldSEnder Aug 22, 2024
5189e23
Bump the cargo-deps group across 1 directory with 23 updates (#3713)
dependabot[bot] Aug 22, 2024
8ca8cfd
Provide reference ref for benchmark action and make it less spammy (#…
WorldSEnder Aug 23, 2024
20a1c90
Bump quote from 1.0.36 to 1.0.37 in the cargo-deps group (#3714)
dependabot[bot] Aug 23, 2024
45a02bc
Bump oleksiyrudenko/gha-git-credentials from 2.1.1 to 2.1.2 (#3696)
dependabot[bot] Aug 23, 2024
10a2488
Bump the cargo-deps group with 5 updates (#3717)
dependabot[bot] Aug 30, 2024
44128cd
Bump jetli/trunk-action from 0.4.0 to 0.5.0 (#3722)
dependabot[bot] Sep 1, 2024
9028743
Bump softprops/action-gh-release from 1 to 2 (#3720)
dependabot[bot] Sep 1, 2024
31ea148
Bump baptiste0928/cargo-install from 2 to 3 (#3721)
dependabot[bot] Sep 1, 2024
bbe7df5
Bump the website-deps group across 1 directory with 17 updates (#3723)
dependabot[bot] Sep 2, 2024
b6b5a9a
Fix hidden files not being uploaded with actions/upload-artifact upgr…
WorldSEnder Sep 5, 2024
adaa9fc
Fix CI. (#3727)
finnbear Sep 15, 2024
d4a463b
Bump the cargo-deps group across 1 directory with 13 updates (#3732)
dependabot[bot] Sep 20, 2024
e458d59
Bump the cargo-deps group with 6 updates (#3738)
dependabot[bot] Sep 29, 2024
e8d5ec2
Bump the website-deps group in /website with 5 updates (#3740)
dependabot[bot] Oct 1, 2024
6ca3824
Bump the cargo-deps group with 7 updates (#3741)
dependabot[bot] Oct 4, 2024
dbd585d
Fixed a type, edditing to editing (#3539)
raahimfareed Oct 11, 2024
1d5d249
Fix queries in ssr_router example (#3587)
Oliver-Bilbie Oct 11, 2024
395f3cd
yew-router: Dynamic basename. (#3725)
finnbear Oct 12, 2024
7f3832e
chore(website): code block typo (#3574)
rockyzhengwu Oct 12, 2024
c4e5d4d
Update editor-setup.mdx (#3585)
Tushar12222 Oct 12, 2024
f87315e
node refs example link updated (#3540)
giripriyadarshan Oct 12, 2024
e2707f4
Make UseFutureHandle Clone (#3529)
AdamSteinberg1 Oct 12, 2024
8cbd832
Allow boolean & update error for byte literals in `html!` (#3441)
its-the-shrimp Oct 12, 2024
c54d6be
File upload - simplify a bit with gloo::file::FileList::from (#3685)
knzai Oct 12, 2024
e3f2a39
Update documentation.md (#3591)
kawadakk Oct 12, 2024
0f93208
update gloo-net version in tutorial (#3527)
DannyCeb Oct 13, 2024
432226c
Allow import of layout_test into 3rd party crates (#3463)
rollo-b2c2 Oct 14, 2024
90bf3cc
Add WASI support for server-side rendering. (#3534)
langyo Oct 21, 2024
fb89c9f
Bump hashbrown from 0.15.0 to 0.15.2 (#3771)
dependabot[bot] Dec 4, 2024
4e806f4
silenced non-normalised element name warnings for SVG elements (#3769)
its-the-shrimp Dec 13, 2024
abe504d
Switch to tokise (#3776)
ranile Dec 13, 2024
6624bfb
Prepare for 0.22 release (#3750)
langyo Dec 17, 2024
b20fd65
Explicit duplicate key check (#3785)
WorldSEnder Dec 28, 2024
3fa408c
chore(mdx): update deps
geoffjay Jan 25, 2025
d20be33
chore(mdx): update deps
geoffjay Jan 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[target.'cfg(target_arch = "wasm32")']
[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))']
runner = 'wasm-bindgen-test-runner'

[target.'cfg(all(target_arch = "wasm32", target_os = "wasi"))']
runner = 'wasmtime -W unknown-imports-trap=y'

# This section needs to be last.
# GitHub Actions modifies this section.
[unstable]
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ assignees: ''

This is about:
- [ ] A typo
- [ ] Innaccurate/misleading documentation (e.g. technically incorrect advice)
- [ ] Inaccurate/misleading documentation (e.g. technically incorrect advice)
- [ ] Undocumented code
- [ ] Outdated documentation
- [ ] Other
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-approve-maintainer-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: JamesSingleton/[email protected]
with:
organization: "yewstack"
username: ${{ github.actor }}
username: ${{ github.event.pull_request.user.login }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Auto approve
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/benchmark-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Benchmark - core

on:
pull_request:
branches: [master]
paths:
- .github/workflows/benchmark-core.yml
- "packages/yew/**"
- "tools/benchmark-core/**"

jobs:
benchmark-core:
name: Benchmark - core
runs-on: ubuntu-latest

steps:
- name: Checkout master
uses: actions/checkout@v4
with:
repository: "yewstack/yew"
ref: master
path: yew-master

- name: Checkout pull request
uses: actions/checkout@v4
with:
path: current-pr

- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Restore Rust cache for yew packages
uses: Swatinem/rust-cache@v2
with:
shared-key: yew-packages
workspaces: |
yew-master
current-pr

- name: Run pull request benchmark
working-directory: current-pr/tools/benchmark-core
run: cargo bench -q > ../output.log

- name: Run master benchmark
working-directory: yew-master/tools/benchmark-core
run: cargo bench -q > ../output.log

- name: Write Pull Request ID
run: |
echo "${{ github.event.number }}" > .PR_NUMBER

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: benchmark-core
include-hidden-files: true
path: |
.PR_NUMBER
yew-master/tools/output.log
current-pr/tools/output.log
retention-days: 1
26 changes: 11 additions & 15 deletions .github/workflows/benchmark-ssr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Benchmark - SSR

on:
Expand All @@ -20,14 +19,14 @@ jobs:

steps:
- name: Checkout master
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: "yewstack/yew"
ref: master
path: yew-master

- name: Checkout pull request
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: current-pr

Expand All @@ -37,34 +36,31 @@ jobs:
toolchain: stable
targets: wasm32-unknown-unknown

- name: Restore Rust cache for master
- name: Restore Rust cache for yew packages
uses: Swatinem/rust-cache@v2
with:
working-directory: yew-master
key: master

- name: Restore Rust cache for current pull request
uses: Swatinem/rust-cache@v2
with:
working-directory: current-pr
key: pr
shared-key: yew-packages
workspaces: |
yew-master
current-pr

- name: Run pull request benchmark
run: cargo run --profile=bench -- --output-path ../output.json
working-directory: current-pr/tools/benchmark-ssr
run: cargo run --profile=bench -- --output-path ../output.json

- name: Run master benchmark
run: cargo run --profile=bench -- --output-path ../output.json
working-directory: yew-master/tools/benchmark-ssr
run: cargo run --profile=bench -- --output-path ../output.json

- name: Write Pull Request ID
run: |
echo "${{ github.event.number }}" > .PR_NUMBER

- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: benchmark-ssr
include-hidden-files: true
path: |
.PR_NUMBER
yew-master/tools/output.json
Expand Down
65 changes: 39 additions & 26 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,23 @@ on:
- "website/**"
types: [labeled, synchronize, opened, reopened]

permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
# Cancel outstanding benchmarks on pull requests
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
benchmark:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'performance')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: "yew"

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: krausest/js-framework-benchmark
path: "js-framework-benchmark"
Expand All @@ -37,35 +38,45 @@ jobs:
toolchain: stable
targets: wasm32-unknown-unknown

- uses: jetli/[email protected]
with:
version: "latest"
- name: Setup wasm-pack
uses: jetli/[email protected]

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: ">=18"
cache: "npm"
cache-dependency-path: js-framework-benchmark/package-lock.json

- uses: Swatinem/rust-cache@v2
- name: Restore Rust cache for yew packages
uses: Swatinem/rust-cache@v2
with:
shared-key: yew-packages
workspaces: |
yew

- name: Setup chrome
id: setup-chrome
uses: browser-actions/setup-chrome@v1
with:
install-chromedriver: true

- name: setup js-framework-benchmark
- name: Setup js-framework-benchmark
working-directory: js-framework-benchmark
run: |
npm ci
npm run install-server
npm run install-webdriver-ts

- name: setup benchmark-struct benchmark
- name: Setup benchmark-struct benchmark
run: |
ls -lauh
rm *.js
rm *.wasm
echo "STRUCT_BUILD_DIR=$PWD" >> $GITHUB_ENV
working-directory: js-framework-benchmark/frameworks/keyed/yew/bundled-dist/

- name: build benchmark-struct app
- name: Build benchmark-struct app
working-directory: yew/tools/benchmark-struct
run: |
wasm-pack build \
Expand All @@ -75,19 +86,19 @@ jobs:
--out-name js-framework-benchmark-yew \
--out-dir $STRUCT_BUILD_DIR

- name: show built benchmark-struct benchmark files
- name: Show built benchmark-struct benchmark files
run: |
ls -lauh js-framework-benchmark/frameworks/keyed/yew/bundled-dist/

- name: setup yew-hooks benchmark
- name: Setup yew-hooks benchmark
run: |
ls -lauh
rm *.js
rm *.wasm
echo "HOOKS_BUILD_DIR=$PWD" >> $GITHUB_ENV
working-directory: js-framework-benchmark/frameworks/keyed/yew-hooks/bundled-dist/

- name: build benchmark-hooks app
- name: Build benchmark-hooks app
working-directory: yew/tools/benchmark-hooks
run: |
wasm-pack build \
Expand All @@ -97,31 +108,33 @@ jobs:
--out-name js-framework-benchmark-yew-hooks \
--out-dir $HOOKS_BUILD_DIR

- name: show built benchmark-hooks benchmark files
- name: Show built benchmark-hooks benchmark files
run: |
ls -lauh js-framework-benchmark/frameworks/keyed/yew-hooks/bundled-dist/

- name: run js-framework-benchmark server
- name: Run js-framework-benchmark server
working-directory: js-framework-benchmark
run: |
npm start &
sleep 5

- name: js-framework-benchmark/webdriver-ts npm run bench
- name: Run js-framework-benchmark/webdriver-ts npm run bench
working-directory: js-framework-benchmark/webdriver-ts
run: xvfb-run npm run bench -- --framework keyed/yew keyed/yew-hooks --runner playwright
run: xvfb-run npm run bench -- --framework keyed/yew keyed/yew-hooks --runner playwright --chromeBinary "${{ steps.setup-chrome.outputs.chrome-path }}"

- name: transform results to be fit for display benchmark-action/github-action-benchmark@v1
- name: Transform results to be fit for display benchmark-action/github-action-benchmark@v1
run: |
mkdir artifacts/
jq -s . js-framework-benchmark/webdriver-ts/results/*.json | cargo run --manifest-path yew/Cargo.toml --release -p process-benchmark-results > artifacts/results.json
echo "$EVENT_INFO" > artifacts/PR_INFO
echo "$EVENT_INFO" > artifacts/.PR_INFO
env:
EVENT_INFO: ${{ toJSON(github.event) }}

- name: Upload result artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: results
path: artifacts/
if-no-files-found: error
include-hidden-files: true
retention-days: 1
13 changes: 6 additions & 7 deletions .github/workflows/build-api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
PR_INFO_FILE: ".PR_INFO"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
Expand All @@ -46,7 +44,7 @@ jobs:
cp -r target/doc/* api-docs/dist/next

- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: api-docs
path: api-docs/
Expand All @@ -55,12 +53,13 @@ jobs:
- if: github.event_name == 'pull_request'
name: Build pr info
run: |
echo "${{ github.event.number }}" > $PR_INFO_FILE
echo "${{ github.event.number }}" > .PR_INFO

- if: github.event_name == 'pull_request'
name: Upload pr info
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pr-info
path: "${{ env.PR_INFO_FILE }}"
include-hidden-files: true
path: .PR_INFO
retention-days: 1
19 changes: 9 additions & 10 deletions .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,18 @@ jobs:
build:
name: Build Website
runs-on: ubuntu-latest
env:
PR_INFO_FILE: ".PR_INFO"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"
node-version: "18"

- name: Install dependencies
run: |
cd website
npm install
npm ci

- name: Run prettier
run: |
Expand All @@ -48,7 +46,7 @@ jobs:
npm run build

- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: website
path: website/build/
Expand All @@ -57,12 +55,13 @@ jobs:
- if: github.event_name == 'pull_request'
name: Build pr info
run: |
echo "${{ github.event.number }}" > $PR_INFO_FILE
echo "${{ github.event.number }}" > .PR_INFO

- if: github.event_name == 'pull_request'
name: Upload pr info
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pr-info
path: "${{ env.PR_INFO_FILE }}"
include-hidden-files: true
path: .PR_INFO
retention-days: 1
Loading