Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
05d4494
Fix ssr compatibility
ealmloff May 28, 2025
dc2b45c
add check and publish workflows
ealmloff May 28, 2025
7c7fba0
upgrade to the alpha
ealmloff May 28, 2025
f26c446
reorganize preview app
ealmloff May 28, 2025
fbecf20
fix clippy lints
ealmloff May 28, 2025
56e24b3
Generate highlighted html at compile time
ealmloff May 28, 2025
4dbb768
light/dark theme code highlighting
ealmloff May 28, 2025
6fbe097
fix unique id hydration
ealmloff May 28, 2025
bae5432
basic component preview working
ealmloff May 28, 2025
6658146
fix light mode
ealmloff May 28, 2025
9a04772
Fix slider after layout changes
ealmloff May 28, 2025
6b5f46a
Move code into the preview block
ealmloff May 28, 2025
42fd266
add a more interesting background for the previews
ealmloff May 29, 2025
d07b13f
brick component preview section
ealmloff May 29, 2025
dd36222
dark mode calendar
ealmloff May 29, 2025
d966123
Fix some layout issues on small screens
ealmloff May 29, 2025
bd7ff83
add padding around progress demo buttons
ealmloff May 29, 2025
18e5939
Fix some more layout issues
ealmloff May 29, 2025
f49aba7
add docs file for each component
ealmloff May 29, 2025
643da50
fix checkbox hydration
ealmloff May 29, 2025
613cb3f
fix scroll area size
ealmloff May 29, 2025
d7f4f92
enable fullstack
ealmloff May 29, 2025
ed9c517
fix code block overflow
ealmloff May 29, 2025
0279c79
client side only rendering in GH pages
ealmloff May 29, 2025
fbef217
use the fixed version of the CLI
ealmloff May 29, 2025
6d01ae2
basic docs for each component
ealmloff May 29, 2025
8841855
Add syntax highlighting for the markdown
ealmloff May 29, 2025
996f9d4
fix build directory
ealmloff May 29, 2025
9244ea8
Fix overflowing code in long examples
ealmloff May 29, 2025
7765873
Fix copy path
ealmloff May 29, 2025
b0058cb
Fix toasts
ealmloff May 30, 2025
97ffba2
Fix toast styles
ealmloff May 30, 2025
00a3f6e
mess with styling - more muted
ealmloff May 30, 2025
33b84f0
center hover card
ealmloff May 30, 2025
ad95478
add copy button
ealmloff May 30, 2025
c47d6eb
dull slider
ealmloff May 30, 2025
3c51a6e
Dioxus.toml for gh pages build
ealmloff May 30, 2025
5488963
Create a preview for each PR
ealmloff May 30, 2025
804c200
partially fix calendar component
ealmloff May 30, 2025
b5b6ef0
add navbar and search
ealmloff May 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: check examples

on:
push:
branches:
- main
paths:
- /**
- preview/**/*.rs
- preview/**/Cargo.toml
- primitives/**/*.rs
- primitives/**/Cargo.toml
- .github/**
- Cargo.toml

pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
paths:
- /**
- preview/**/*.rs
- preview/**/Cargo.toml
- primitives/**/*.rs
- primitives/**/Cargo.toml
- .github/**
- Cargo.toml

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
version: 1.0
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
cache-on-failure: "false"
cache-directories: "target/dx"
- name: Check
run: cargo check --workspace --all-features
48 changes: 48 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: github pages

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-deploy:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 1
steps:
- uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
version: 1.0
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
cache-on-failure: "false"
- uses: cargo-bins/cargo-binstall@main
- name: Install CLI
run: cargo install dioxus-cli --git https://github.com/ealmloff/dioxus --branch fix-bundle
- name: Build
run: cd preview && dx build --platform web --release
- name: Copy output
run: cp -r target/dx/preview/release/web/public docs
- name: Add gh pages 404
run: cp docs/index.html docs/404.html
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.
target-folder: .
clean: true
single-commit: true
54 changes: 54 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy PR previews

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
deploy-preview:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 1
steps:
- uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
version: 1.0
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
cache-on-failure: "false"
- uses: cargo-bins/cargo-binstall@main
- name: Install CLI
run: cargo install dioxus-cli --git https://github.com/ealmloff/dioxus --branch fix-bundle
- name: Set base path
run: |
echo "[application]
name = \"Dioxus Preview\"
version = \"0.1.0\"

[web.app]
base_path = \"components/pr-preview/pr-${{ github.event.pull_request.number }}/\"" > preview/Dioxus.toml
- name: Build
run: cd preview && dx build --platform web --release
- name: Copy output
run: cp -r target/dx/preview/release/web/public docs
- name: Add gh pages 404
run: cp docs/index.html docs/404.html
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
preview-branch: gh-pages # The branch the action should deploy to.
source-dir: docs # The folder the action should deploy.
Loading