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
43 changes: 27 additions & 16 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,52 @@ on:
push:
branches: [master]

env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: "sccache"
RUSTFLAGS: -D warnings
SCCACHE_GHA_ENABLED: "true"

jobs:

nightly-clippy:
name: Nightly clippy (wasm32)
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- name: Checkout
uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
components: clippy
components: clippy, rustfmt
override: true
- uses: actions-rs/clippy-check@v1
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.6

# Formatting check
- name: Check formatting
run: cargo fmt -- --check

# Clippy checks
- name: Vertigo-forms Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -p vertigo-forms --all-features --target wasm32-unknown-unknown -- -Dwarnings
name: Vertigo-forms Clippy Output
- uses: actions-rs/clippy-check@v1
- name: Examples Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -p vertigo-forms-storybook -p vertigo-forms-example-manual-form -p vertigo-forms-example-model-form --all-features --target wasm32-unknown-unknown -- -Dwarnings
name: Storybook/Examples Clippy Output

nightly-tests:
name: Nightly tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
# Unit tests
- name: Unit tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<!-- markdownlint-configure-file { "no-duplicate-heading": { "siblings_only": true } } -->

<!-- markdownlint-disable-next-line first-line-h1 -->
## 0.1.2 - 2026-01-05

### Changed

* Updated to vertigo 0.10

## 0.1.1 - 2025-12-04

### Changed
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["storybook", "examples/manual_form", "examples/model_form"]

[package]
name = "vertigo-forms"
version = "0.1.1"
version = "0.1.2"
authors = ["Michał Pokrywka <wolfmoon@o2.pl>"]
description = "Building block for forms in vertigo"
readme = "README.md"
Expand All @@ -18,4 +18,4 @@ edition = "2024"
[dependencies]
base64 = "0.22"
either = "1.15.0"
vertigo = "0.9"
vertigo = "0.10"
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Blocks for building forms in [vertigo](https://crates.io/crates/vertigo).
[![crates.io](https://img.shields.io/crates/v/vertigo-forms)](https://crates.io/crates/vertigo-forms)
[![Documentation](https://docs.rs/vertigo-forms/badge.svg)](https://docs.rs/vertigo-forms)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/vertigo-forms.svg)
[![Dependency Status](https://deps.rs/crate/vertigo-forms/0.1.1/status.svg)](https://deps.rs/crate/vertigo-forms/0.1.1)
[![Dependency Status](https://deps.rs/crate/vertigo-forms/0.1.2/status.svg)](https://deps.rs/crate/vertigo-forms/0.1.2)
[![CI](https://github.com/vertigo-web/vertigo-forms/actions/workflows/pipeline.yaml/badge.svg)](https://github.com/vertigo-web/vertigo-forms/actions/workflows/pipeline.yaml)
[![downloads](https://img.shields.io/crates/d/vertigo-forms.svg)](https://crates.io/crates/vertigo-forms)

Expand All @@ -16,14 +16,14 @@ See [Changelog](https://github.com/vertigo-web/vertigo-forms/blob/master/CHANGES
Dependencies:

```toml
vertigo = "0.9"
vertigo = "0.10"
vertigo-forms = "0.1"
```

Example 1:

```rust
use vertigo::{computed_tuple, main, prelude::*};
use vertigo::{computed_tuple, prelude::*};
use vertigo_forms::{Input, Select};

#[derive(Default)]
Expand All @@ -34,7 +34,7 @@ struct FormData {
engine: Value<String>,
}

#[main]
#[vertigo::main]
fn render() -> DomNode {
let form_data = FormData::default();

Expand Down Expand Up @@ -74,7 +74,7 @@ fn render() -> DomNode {
Example 2:

```rust
use vertigo::{bind_rc, main, prelude::*};
use vertigo::{bind_rc, prelude::*};
use vertigo_forms::form::{DataSection as DS, FormData, FormExport, ModelForm};

#[derive(Clone, Default, PartialEq)]
Expand Down Expand Up @@ -112,7 +112,7 @@ impl From<FormExport> for Car {
}
}

#[main]
#[vertigo::main]
fn render() -> DomNode {
let car = Value::new(Car::default());

Expand Down
4 changes: 2 additions & 2 deletions examples/manual_form/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "vertigo-forms-example-manual-form"
version = "0.1.1"
version = "0.1.2"
authors = ["Michał Pokrywka <wolfmoon@o2.pl>"]
edition = "2024"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
vertigo = "0.9"
vertigo = "0.10"
vertigo-forms = { path = "../.." }
4 changes: 2 additions & 2 deletions examples/model_form/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "vertigo-forms-example-model-form"
version = "0.1.1"
version = "0.1.2"
authors = ["Michał Pokrywka <wolfmoon@o2.pl>"]
edition = "2024"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
vertigo = "0.9"
vertigo = "0.10"
vertigo-forms = { path = "../.." }
1 change: 0 additions & 1 deletion src/form/render/tabs.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::rc::Rc;

use vertigo::{AttrGroup, Css, DomNode, Value, dom};

use crate::{
Expand Down
1 change: 0 additions & 1 deletion src/search_panel.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::rc::Rc;

use vertigo::{AutoMap, DomNode, Resource, ToComputed, Value, bind, dom};

pub trait SearchResult {
Expand Down
4 changes: 2 additions & 2 deletions storybook/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "vertigo-forms-storybook"
version = "0.1.1"
version = "0.1.2"
authors = ["Michał Pokrywka <wolfmoon@o2.pl>"]
edition = "2024"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
vertigo = "0.9"
vertigo = "0.10"
vertigo-forms = { path = ".." }
4 changes: 2 additions & 2 deletions storybook/src/drop_image_file.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::rc::Rc;
use vertigo::{css, dom, DomNode, DropFileItem, Value};
use vertigo_forms::{image_as_uri, DropImageFile, DropImageFileParams};
use vertigo::{DomNode, DropFileItem, Value, css, dom};
use vertigo_forms::{DropImageFile, DropImageFileParams, image_as_uri};

pub fn drop_file() -> DomNode {
let value = Value::new(Some(Rc::new("https://picsum.photos/200".to_string()))).to_computed();
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/form/form1.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use vertigo::{bind_rc, component, css, dom, Value};
use vertigo::{Value, bind_rc, component, css, dom};
use vertigo_forms::form::{
DataSection, FieldsetStyle, FormData, FormExport, FormParams, ModelForm,
};
Expand Down
3 changes: 1 addition & 2 deletions storybook/src/form/form2.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::rc::Rc;

use vertigo::{bind_rc, component, css, dom, Value};
use vertigo::{Value, bind_rc, component, css, dom};
use vertigo_forms::form::{DataSection, FormData, FormExport, FormParams, ModelForm};

// Form example 2
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/form/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::rc::Rc;
use vertigo::{dom, DomNode, Value};
use vertigo::{DomNode, Value, dom};
use vertigo_forms::{Tab, Tabs};

use crate::bordered_tabs;
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/input.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use vertigo::{dom, DomNode, Value};
use vertigo::{DomNode, Value, dom};
use vertigo_forms::{Input, InputWithButton, ListInput};

pub fn input() -> DomNode {
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::{fmt, rc::Rc};
use vertigo::{css, dom, main, router::Router, DomNode};
use vertigo::{DomNode, css, dom, main, router::Router};
use vertigo_forms::{Tab, Tabs, TabsParams};

mod drop_image_file;
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/login.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use vertigo::{bind_rc, dom, DomNode, Resource, Value};
use vertigo::{DomNode, Resource, Value, bind_rc, dom};
use vertigo_forms::login::{Login, LoginParams};

pub fn login() -> DomNode {
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/multi_drop_down.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use vertigo::{dom, DomNode, Value};
use vertigo::{DomNode, Value, dom};
use vertigo_forms::MultiDropDown;

pub fn multi_drop_down() -> DomNode {
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/multi_select.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use vertigo::{dom, DomNode, Value};
use vertigo::{DomNode, Value, dom};
use vertigo_forms::MultiSelect;

pub fn multi_select() -> DomNode {
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/popup.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use vertigo::{css, dom, DomNode, Value};
use vertigo::{DomNode, Value, css, dom};
use vertigo_forms::{Popup, PopupOnHover, PopupParams, Switch};

pub fn popup() -> DomNode {
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/search_panel.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::rc::Rc;
use vertigo::{dom, AutoMap, Computed, DomNode, Resource, Value};
use vertigo::{AutoMap, Computed, DomNode, Resource, Value, dom};
use vertigo_forms::{SearchPanel, SearchPanelParams};

pub fn search_panel() -> DomNode {
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/select.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use vertigo::{dom, DomNode, Value};
use vertigo::{DomNode, Value, dom};
use vertigo_forms::Select;

pub fn select() -> DomNode {
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/select_search.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::collections::HashMap;
use vertigo::{computed_tuple, dom, DomNode, Value};
use vertigo::{DomNode, Value, computed_tuple, dom};
use vertigo_forms::SelectSearch;

pub fn select_search() -> DomNode {
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/switch.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use vertigo::{dom, html_entities, DomNode, Value};
use vertigo::{DomNode, Value, dom, html_entities};
use vertigo_forms::{Switch, SwitchParams};

pub fn switch() -> DomNode {
Expand Down
3 changes: 1 addition & 2 deletions storybook/src/tabs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::rc::Rc;

use vertigo::{bind_rc, dom, DomNode, Value};
use vertigo::{DomNode, Value, bind_rc, dom};
use vertigo_forms::{Tab, TabsContentMapped, TabsHeader};

use crate::bordered_tabs;
Expand Down
2 changes: 1 addition & 1 deletion storybook/src/with_loader.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use vertigo::{bind, bind_rc, dom, DomNode, Resource, Value};
use vertigo::{DomNode, Resource, Value, bind, bind_rc, dom};
use vertigo_forms::WithLoader;

pub fn with_loader() -> DomNode {
Expand Down
Loading