Template: the generated app links the time axis
makeover-build 0.52.0 writes a fourth stylesheet, so the template's
build.rs asks for it, both shells link it after geometry, and the asset
table serves it. The serve-what-is-linked test in the generated app
covers it without being told to.
Verified by generating outside ~/Code, where the [patch] block does not
reach: timing.css is written, served, and the core crate's 30 tests pass.
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
7 files changed,
+25 insertions,
-13 deletions
| 6201 |
6201 |
|
name = "quasi-type"
|
| 6202 |
6202 |
|
version = "0.1.0"
|
| 6203 |
6203 |
|
|
|
6204 |
+ |
[[patch.unused]]
|
|
6205 |
+ |
name = "synckit-client"
|
|
6206 |
+ |
version = "0.9.1"
|
|
6207 |
+ |
|
| 6204 |
6208 |
|
[[patch.unused]]
|
| 6205 |
6209 |
|
name = "kberg"
|
| 6206 |
6210 |
|
version = "0.1.0"
|
| 6216 |
6220 |
|
[[patch.unused]]
|
| 6217 |
6221 |
|
name = "tagtree"
|
| 6218 |
6222 |
|
version = "0.4.1"
|
| 6219 |
|
- |
|
| 6220 |
|
- |
[[patch.unused]]
|
| 6221 |
|
- |
name = "synckit-client"
|
| 6222 |
|
- |
version = "0.9.1"
|
| 8 |
8 |
|
/themes/
|
| 9 |
9 |
|
/static/theme.css
|
| 10 |
10 |
|
/static/geometry.css
|
|
11 |
+ |
/static/timing.css
|
| 11 |
12 |
|
/static/layout.css
|
| 12 |
13 |
|
/static/quasi-selection.js
|
| 13 |
14 |
|
/static/quasi-clock.js
|
| 42 |
42 |
|
# scaffolds from now on. 2.4.1 and 0.13.0 sat here once, and 2.5 and 0.28.0
|
| 43 |
43 |
|
# after that, while the suite reached 3.0.0 and 0.47.0.
|
| 44 |
44 |
|
makeover = "3.0"
|
| 45 |
|
- |
makeover-build = "0.51.0"
|
|
45 |
+ |
makeover-build = "0.52.0"
|
| 46 |
46 |
|
# The renderer's own scripts, written into `static/` beside the stylesheets.
|
| 47 |
47 |
|
# A build dependency and not a runtime one: this crate names no host, and
|
| 48 |
48 |
|
# reading three constants out of the webview renderer at build time does not
|
| 1 |
|
- |
//! The generated files: migrations, and the design system's three stylesheets.
|
|
1 |
+ |
//! The generated files: migrations, and the design system's four stylesheets.
|
| 2 |
2 |
|
//!
|
| 3 |
3 |
|
//! Everything written here lands in the workspace and is gitignored. The source
|
| 4 |
4 |
|
//! crates stay authoritative and nothing is vendored, which is what keeps a
|
| 5 |
5 |
|
//! `makeover` release from needing a copy-and-paste pass through this repo.
|
| 6 |
6 |
|
//!
|
| 7 |
|
- |
//! # The three stylesheets
|
|
7 |
+ |
//! # The four stylesheets
|
| 8 |
8 |
|
//!
|
| 9 |
9 |
|
//! Linked in this order, and the order is the cascade:
|
| 10 |
10 |
|
//!
|
| 12 |
12 |
|
//! under `:root`, dark under `prefers-color-scheme`.
|
| 13 |
13 |
|
//! - `geometry.css` — spacing, named by relationship rather than by size, with
|
| 14 |
14 |
|
//! `makeover-geometry`'s own density selection.
|
|
15 |
+ |
//! - `timing.css` — the durations `makeover-timing` names by intent, and the
|
|
16 |
+ |
//! `prefers-reduced-motion` block that turns the animated ones off.
|
| 15 |
17 |
|
//! - `layout.css` — the component vocabulary `makeover-webview` emits, which is
|
| 16 |
18 |
|
//! what makes the described screens look like a Make Creative app rather than
|
| 17 |
19 |
|
//! like unstyled HTML.
|
| 79 |
81 |
|
|
| 80 |
82 |
|
let opts = makeover_build::Emit::default();
|
| 81 |
83 |
|
makeover_build::geometry_css(static_dir.join("geometry.css"), None);
|
|
84 |
+ |
makeover_build::timing_css(static_dir.join("timing.css"));
|
| 82 |
85 |
|
makeover_build::layout_css(static_dir.join("layout.css"), &opts);
|
| 83 |
86 |
|
write_theme_css(&static_dir.join("theme.css"));
|
| 84 |
87 |
|
|
| 21 |
21 |
|
#[must_use]
|
| 22 |
22 |
|
pub fn get(path: &str) -> Option<Asset> {
|
| 23 |
23 |
|
Some(match path {
|
| 24 |
|
- |
// The three generated ones. `build.rs` writes them before this crate
|
|
24 |
+ |
// The four generated ones. `build.rs` writes them before this crate
|
| 25 |
25 |
|
// compiles, and they are gitignored: the source crates stay
|
| 26 |
26 |
|
// authoritative rather than a copy of them living here.
|
| 27 |
27 |
|
"/static/theme.css" => (
|
| 32 |
32 |
|
"text/css; charset=utf-8",
|
| 33 |
33 |
|
include_bytes!("../../../static/geometry.css").as_slice(),
|
| 34 |
34 |
|
),
|
|
35 |
+ |
"/static/timing.css" => (
|
|
36 |
+ |
"text/css; charset=utf-8",
|
|
37 |
+ |
include_bytes!("../../../static/timing.css").as_slice(),
|
|
38 |
+ |
),
|
| 35 |
39 |
|
"/static/layout.css" => (
|
| 36 |
40 |
|
"text/css; charset=utf-8",
|
| 37 |
41 |
|
include_bytes!("../../../static/layout.css").as_slice(),
|
| 116 |
120 |
|
#[test]
|
| 117 |
121 |
|
fn every_stylesheet_the_shell_links_is_reachable() {
|
| 118 |
122 |
|
// The order here is the order the shell links them in, and the order is
|
| 119 |
|
- |
// the cascade: intents, then spacing, then components, then yours.
|
|
123 |
+ |
// the cascade: intents, then spacing, then time, then components, then
|
|
124 |
+ |
// yours.
|
| 120 |
125 |
|
for href in [
|
| 121 |
126 |
|
"/static/theme.css",
|
| 122 |
127 |
|
"/static/geometry.css",
|
|
128 |
+ |
"/static/timing.css",
|
| 123 |
129 |
|
"/static/layout.css",
|
| 124 |
130 |
|
"/static/styles.css",
|
| 125 |
131 |
|
] {
|
| 80 |
80 |
|
fn renderer() -> Webview {
|
| 81 |
81 |
|
Webview::new().with_shell(
|
| 82 |
82 |
|
Shell::under("/static")
|
| 83 |
|
- |
// The order is the cascade: colour intents, then spacing, then the
|
| 84 |
|
- |
// component vocabulary, then this app's own.
|
|
83 |
+ |
// The order is the cascade: colour intents, then spacing, then
|
|
84 |
+ |
// time, then the component vocabulary, then this app's own.
|
| 85 |
85 |
|
.styled("/static/theme.css")
|
| 86 |
86 |
|
.styled("/static/geometry.css")
|
|
87 |
+ |
.styled("/static/timing.css")
|
| 87 |
88 |
|
.styled("/static/layout.css")
|
| 88 |
89 |
|
.styled("/static/styles.css")
|
| 89 |
90 |
|
// The app's own affordances, declared once. `Chrome` is what makes
|
| 95 |
95 |
|
fn renderer() -> Webview {
|
| 96 |
96 |
|
Webview::new().with_shell(
|
| 97 |
97 |
|
Shell::under("/static")
|
| 98 |
|
- |
// The order is the cascade: colour intents, then spacing, then the
|
| 99 |
|
- |
// component vocabulary, then this app's own.
|
|
98 |
+ |
// The order is the cascade: colour intents, then spacing, then
|
|
99 |
+ |
// time, then the component vocabulary, then this app's own.
|
| 100 |
100 |
|
.styled("/static/theme.css")
|
| 101 |
101 |
|
.styled("/static/geometry.css")
|
|
102 |
+ |
.styled("/static/timing.css")
|
| 102 |
103 |
|
.styled("/static/layout.css")
|
| 103 |
104 |
|
.styled("/static/styles.css")
|
| 104 |
105 |
|
// The app's own affordances, declared once. `Chrome` is what makes
|