max / audiofiles
4 files changed,
+41 insertions,
-17 deletions
| @@ -4244,7 +4244,7 @@ | |||
| 4244 | 4244 | ||
| 4245 | 4245 | [[package]] | |
| 4246 | 4246 | name = "quasi-immediate" | |
| 4247 | - | version = "0.16.0" | |
| 4247 | + | version = "0.17.0" | |
| 4248 | 4248 | dependencies = [ | |
| 4249 | 4249 | "docengine", | |
| 4250 | 4250 | "egui", | |
| @@ -4254,7 +4254,7 @@ | |||
| 4254 | 4254 | ||
| 4255 | 4255 | [[package]] | |
| 4256 | 4256 | name = "quasi-router" | |
| 4257 | - | version = "0.16.0" | |
| 4257 | + | version = "0.17.0" | |
| 4258 | 4258 | dependencies = [ | |
| 4259 | 4259 | "makeover-layout", | |
| 4260 | 4260 | ] | |
| @@ -7557,15 +7557,15 @@ | |||
| 7557 | 7557 | ||
| 7558 | 7558 | [[patch.unused]] | |
| 7559 | 7559 | name = "quasi-axum" | |
| 7560 | - | version = "0.16.0" | |
| 7560 | + | version = "0.17.0" | |
| 7561 | 7561 | ||
| 7562 | 7562 | [[patch.unused]] | |
| 7563 | 7563 | name = "quasi-basics" | |
| 7564 | - | version = "0.16.0" | |
| 7564 | + | version = "0.17.0" | |
| 7565 | 7565 | ||
| 7566 | 7566 | [[patch.unused]] | |
| 7567 | 7567 | name = "quasi-http" | |
| 7568 | - | version = "0.16.0" | |
| 7568 | + | version = "0.17.0" | |
| 7569 | 7569 | ||
| 7570 | 7570 | [[patch.unused]] | |
| 7571 | 7571 | name = "quasi-store" | |
| @@ -7573,8 +7573,8 @@ | |||
| 7573 | 7573 | ||
| 7574 | 7574 | [[patch.unused]] | |
| 7575 | 7575 | name = "quasi-tauri" | |
| 7576 | - | version = "0.16.0" | |
| 7576 | + | version = "0.17.0" | |
| 7577 | 7577 | ||
| 7578 | 7578 | [[patch.unused]] | |
| 7579 | 7579 | name = "quasi-webview" | |
| 7580 | - | version = "0.16.0" | |
| 7580 | + | version = "0.17.0" |
| @@ -21,8 +21,8 @@ | |||
| 21 | 21 | makeover-immediate = "0.25.0" | |
| 22 | 22 | # The described screens, behind audiofiles-browser's `quasi` feature. By git URL | |
| 23 | 23 | # with a version requirement, per the tree's rule for cross-repo deps. | |
| 24 | - | quasi-router = { git = "https://makenot.work/git/max/quasi.git", version = "0.16" } | |
| 25 | - | quasi-immediate = { git = "https://makenot.work/git/max/quasi.git", version = "0.16" } | |
| 24 | + | quasi-router = { git = "https://makenot.work/git/max/quasi.git", version = "0.17" } | |
| 25 | + | quasi-immediate = { git = "https://makenot.work/git/max/quasi.git", version = "0.17" } | |
| 26 | 26 | egui = { version = "0.35", default-features = false, features = ["default_fonts"] } | |
| 27 | 27 | egui_extras = { version = "0.35", default-features = false } | |
| 28 | 28 | eframe = { version = "0.35", default-features = false, features = ["default_fonts", "glow"] } |
| @@ -4075,3 +4075,20 @@ | |||
| 4075 | 4075 | assert!(barred(&bar, Request::get(address)).is_ok()); | |
| 4076 | 4076 | } | |
| 4077 | 4077 | } | |
| 4078 | + | ||
| 4079 | + | #[test] | |
| 4080 | + | fn the_search_field_says_it_takes_the_room_the_buttons_do_not() { | |
| 4081 | + | // What `trailing_width` was measuring for, said instead of measured. Filed | |
| 4082 | + | // as quasicoherent `6d6a9160`, settled by Max the same day -- fill is | |
| 4083 | + | // determined at the description stage -- and landed as `Field::width` in | |
| 4084 | + | // quasi 0.17.0. | |
| 4085 | + | let bar = FakeBar::at(Where::Folder { trail: Vec::new() }); | |
| 4086 | + | let asked = nodes(&topped(&bar)) | |
| 4087 | + | .iter() | |
| 4088 | + | .find_map(|node| match node { | |
| 4089 | + | Node::Field(field) if field.name == "query" => Some(field.width), | |
| 4090 | + | _ => None, | |
| 4091 | + | }) | |
| 4092 | + | .expect("the toolbar has a search field"); | |
| 4093 | + | assert_eq!(asked, quasi_router::layout::Width::Fill); | |
| 4094 | + | } |
| @@ -23,13 +23,14 @@ | |||
| 23 | 23 | //! described row measures nothing: how a row of controls divides itself is the | |
| 24 | 24 | //! host's, resolved in its own layout pass where the numbers actually are. | |
| 25 | 25 | //! | |
| 26 | - | //! **The second finding is what the app cannot say instead.** `Width::Fill` | |
| 27 | - | //! exists — on a table [`Column`](quasi_router::Column) — and `Share` exists on | |
| 28 | - | //! a region, so the vocabulary already accepts that an app has opinions about | |
| 29 | - | //! which of several things expands. A [`Field`](quasi_router::Field) has no | |
| 30 | - | //! such member, so "the search box takes the room the buttons do not" is not | |
| 31 | - | //! sayable at all, and every renderer will size it by its own default. That is | |
| 32 | - | //! an inconsistency rather than a principle, and it is filed. | |
| 26 | + | //! **And it is now sayable.** `Width::Fill` existed on a table | |
| 27 | + | //! [`Column`](quasi_router::Column) and `Share` on a region, so the vocabulary | |
| 28 | + | //! already accepted that an app has opinions about which of several things | |
| 29 | + | //! expands; a leaf control having no way to say it was an inconsistency rather | |
| 30 | + | //! than a principle. Filed as `6d6a9160`, settled by Max the same day — *fill is | |
| 31 | + | //! determined at the description stage* — and landed as | |
| 32 | + | //! [`Field::width`](quasi_router::Field::width) in quasi 0.17.0. The search box | |
| 33 | + | //! below says `Width::Fill` and the twenty lines are gone. | |
| 33 | 34 | //! | |
| 34 | 35 | //! **Two more pixel breakpoints.** `screen_w < 900.0` collapses six panel | |
| 35 | 36 | //! toggles into a View menu; `screen_w < 700.0` marks the detail panel as | |
| @@ -81,7 +82,7 @@ | |||
| 81 | 82 | //! host draws it rather than what it holds, so no finding — but a vocabulary | |
| 82 | 83 | //! that grows anchoring should know this was the first place it mattered. | |
| 83 | 84 | ||
| 84 | - | use quasi_router::layout::{FieldKind, Selector, Tone}; | |
| 85 | + | use quasi_router::layout::{FieldKind, Selector, Tone, Width}; | |
| 85 | 86 | use quasi_router::{ | |
| 86 | 87 | Act, Action, Choice, Field, Node, RegionKind, Request, Response, RouteError, Router, Screen, | |
| 87 | 88 | Slot, | |
| @@ -303,6 +304,12 @@ | |||
| 303 | 304 | Field::new(FieldKind::Text, QUERY, "Search") | |
| 304 | 305 | .value(&searching.query) | |
| 305 | 306 | .hint("Search samples...") | |
| 307 | + | // What `trailing_width` was measuring for, said instead of | |
| 308 | + | // measured. quasi 0.17.0, settled by Max: fill is determined at | |
| 309 | + | // the description stage. It is the default, so this line changes | |
| 310 | + | // no pixel -- and it is the difference between a row that | |
| 311 | + | // happens to look right and one that says what it means. | |
| 312 | + | .width(Width::Fill) | |
| 306 | 313 | .changes(Action::post("/search")), | |
| 307 | 314 | ))) | |
| 308 | 315 | .with(Node::Select { |