Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 1 addition & 6 deletions .github/workflows/pr-preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@ jobs:

- name: Install trunk
run: |
curl -sL https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz -o trunk-x86_64-unknown-linux-gnu.tar.gz
curl -sL https://github.com/trunk-rs/trunk/releases/download/v0.22.0-beta.1/trunk-x86_64-unknown-linux-gnu.tar.gz -o trunk-x86_64-unknown-linux-gnu.tar.gz
tar xzf trunk-x86_64-unknown-linux-gnu.tar.gz
sudo install trunk /usr/bin/trunk
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install NPM dependencies
run: npm install

- name: Set build timestamp
run: echo "BUILD_TIMESTAMP=$(date --rfc-3339=seconds --utc)" >> $GITHUB_ENV
Expand Down
16 changes: 1 addition & 15 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,12 @@ jobs:
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install trunk
run: |
curl -sL https://github.com/thedodd/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz -o trunk-x86_64-unknown-linux-gnu.tar.gz
curl -sL https://github.com/thedodd/trunk/releases/download/v0.22.0-beta.1/trunk-x86_64-unknown-linux-gnu.tar.gz -o trunk-x86_64-unknown-linux-gnu.tar.gz
tar xzf trunk-x86_64-unknown-linux-gnu.tar.gz
sudo install trunk /usr/bin/trunk

- uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Set build timestamp
run: echo "BUILD_TIMESTAMP=$(date --rfc-3339=seconds --utc)" >> $GITHUB_ENV

Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ browser-panic-hook = "0.2"
chrono = { version = "0.4.30", default-features = false, features = ["wasmbind"] }
gloo-utils = "0.2"
log = "0.4"
patternfly-yew = { version = "0.7", features = ["tree", "icons-fab"] }
patternfly-yew = { version = "0.7.3", features = ["tree", "icons-fab"] }
popper-rs = { version = "0.4", features = ["yew", "debug"] }
serde_json = "1"
strum = { version = "0.27", features = ["derive"] }
Expand Down
8 changes: 8 additions & 0 deletions Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[node_packages]]
name = "@patternfly/patternfly"
version = "6.4.0"

[[node_packages]]
name = "@fortawesome/fontawesome-free"
version = "7.1.0"

26 changes: 13 additions & 13 deletions assets/initializer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@ export default function initializer() {
console.time("trunk-initializer");

document.body.insertAdjacentHTML("afterbegin", `
<div class="pf-v5-l-bullseye">
<div class="pf-v5-l-bullseye__item" style="width: 50%;">
<div id="initializer" class="pf-v5-c-progress">
<div class="pf-v6-l-bullseye">
<div class="pf-v6-l-bullseye__item" style="width: 50%;">
<div id="initializer" class="pf-v6-c-progress">
<div
class="pf-v5-c-progress__description"
class="pf-v6-c-progress__description"
id="initializerState"
>Loading</div>
<div id="initializerStatus" class="pf-v5-c-progress__status" aria-hidden="true">
<span id="initializerLabel" class="pf-v5-c-progress__measure">0%</span>
<div id="initializerStatus" class="pf-v6-c-progress__status" aria-hidden="true">
<span id="initializerLabel" class="pf-v6-c-progress__measure">0%</span>
</div>
<div
class="pf-v5-c-progress__bar"
class="pf-v6-c-progress__bar"
id="initializerBar"
role="progressbar"
aria-valuemin="0"
aria-valuemax="100"
aria-valuenow="0"
aria-labelledby="progress-simple-example-description"
>
<div id="initializerValue" class="pf-v5-c-progress__indicator" style="width:0;"></div>
<div id="initializerValue" class="pf-v6-c-progress__indicator" style="width:0;"></div>
</div>
</div>
<div id="initializerHelper" class="pf-v5-c-progress__helper-text pf-m-hidden">
<div class="pf-v5-c-helper-text">
<div class="pf-v5-c-helper-text__item">
<span id="initializerHelperText" class="pf-v5-c-helper-text__item-text"></span>
<div id="initializerHelper" class="pf-v6-c-progress__helper-text pf-m-hidden">
<div class="pf-v6-c-helper-text">
<div class="pf-v6-c-helper-text__item">
<span id="initializerHelperText" class="pf-v6-c-helper-text__item-text"></span>
</div>
</div>
</div>
Expand Down Expand Up @@ -93,7 +93,7 @@ function setState(value, helperText) {
}
const status = document.getElementById("initializerStatus");
status.innerHTML = `
<span class="pf-v5-c-progress__status-icon">
<span class="pf-v6-c-progress__status-icon">
<i class="fas fa-fw fa-times-circle" aria-hidden="true"></i>
</span>
`;
Expand Down
16 changes: 12 additions & 4 deletions assets/style.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
// only required if you are using the icons-far or icons-fab feature
// $fa-font-path: "webfonts";
@import "../node_modules/@fortawesome/fontawesome-free/scss/fontawesome";
@import "../node_modules/@fortawesome/fontawesome-free/scss/brands";
@import "../target/node_modules/@fortawesome/fontawesome-free/7.1.0/scss/fontawesome";
@import "../target/node_modules/@fortawesome/fontawesome-free/7.1.0/scss/brands";

// PatternFly styles
@import "../node_modules/@patternfly/patternfly/patternfly.scss";
@import "../node_modules/@patternfly/patternfly/patternfly-addons.scss";
@import "../target/node_modules/@patternfly/patternfly/6.4.0/patternfly.scss";
@import "../target/node_modules/@patternfly/patternfly/6.4.0/patternfly-addons.scss";

@font-face {
font-family: "Font Awesome 7 Brands";
font-style: normal;
font-weight: 400;
font-display: block;
src: url("./webfonts/fa-brands-400.woff2");
}
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PatternFly Yew Quickstart</title>

<link data-trunk rel="icon" href="/assets/images/Favicon-Light.png">
<link data-trunk rel="icon" type="image/png" sizes="16x16" href="/assets/images/Favicon-Light-16x16.png">
<link data-trunk rel="icon" type="image/png" sizes="32x32" href="/assets/images/Favicon-Light-32x32.png">
<link data-trunk rel="icon" type="image/png" sizes="48x48" href="/assets/images/Favicon-Light-48x48.png">
<link data-trunk rel="icon" href="./assets/images/Favicon-Light.png">
<link data-trunk rel="icon" type="image/png" sizes="16x16" href="./assets/images/Favicon-Light-16x16.png">
<link data-trunk rel="icon" type="image/png" sizes="32x32" href="./assets/images/Favicon-Light-32x32.png">
<link data-trunk rel="icon" type="image/png" sizes="48x48" href="./assets/images/Favicon-Light-48x48.png">

<link data-trunk rel="scss" href="assets/style.scss">
<!-- This path needs to be here, otherwise icons won't render correctly -->
<link data-trunk rel="copy-dir" href="node_modules/@patternfly/patternfly/assets" data-target-path="assets/">
<link data-trunk rel="copy-dir" href="target/node_modules/@patternfly/patternfly/6.4.0/assets" data-target-path="assets/">
<link data-trunk rel="copy-dir" href="assets/images">

<!-- include when using the icons-far or icons-fab feature -->
<!-- also requires includes in the assets/styles.scss file -->
<link data-trunk rel="copy-dir" href="node_modules/@fortawesome/fontawesome-free/webfonts">
<link data-trunk rel="copy-dir" href="target/node_modules/@fortawesome/fontawesome-free/7.1.0/webfonts">

<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" data-initializer="assets/initializer.mjs"/>

Expand Down
43 changes: 0 additions & 43 deletions package-lock.json

This file was deleted.

15 changes: 0 additions & 15 deletions package.json

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ fn page(props: &PageProps) -> Html {
<MastheadBrand>
<div className="show-light">
<Brand
src="/images/pf-logo.svg"
src="./images/pf-logo.svg"
alt="Patternfly Logo"
style="--pf-v6-c-brand--Height: 36px;"
/>
Expand Down Expand Up @@ -600,5 +600,5 @@ fn page(props: &PageProps) -> Html {
</Toolbar>
);

html! (<Page {brand} {sidebar} {tools}>{ for props.children.iter() }</Page>)
html! (<Page {brand} {sidebar} {tools} full_height=true>{ for props.children.iter() }</Page>)
}
2 changes: 1 addition & 1 deletion src/components/brand/brand.1.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
html!(
<Brand src="/images/pf-logo.svg" alt="PatternFly logo" />
<Brand src="./images/pf-logo.svg" alt="PatternFly logo" />
)
Loading