in-web: signed-out default light (family parity), uppercase labels via CSS
Browse files at this commita125cd5000189c1163f9b1bdbd498a44f4ff8cadParent: aa7d6b23 changed files +8 -5
- crates/in-web/src/layout.rs +3 -2
- crates/in-web/tests/http.rs +3 -3
- style/main.scss +2 -0
crates/in-web/src/layout.rsmodified+3 -2
| @@ -1133,13 +1133,14 @@ pub(crate) async fn document_shell<'a>( | ||
| 1133 | 1133 | // The per-user chrome knobs, read off the request's own user: the theme |
| 1134 | 1134 | // into `data-theme`, the interface into `data-ui`, the language into |
| 1135 | 1135 | // `<html lang>`. Signed-out (or unreadable) wears the provision defaults — |
| 1136 | - // dark and instrument — and the language falls back to `Accept-Language`. | |
| 1136 | + // light and instrument, matching im and iz — and the language falls back | |
| 1137 | + // to `Accept-Language`. | |
| 1137 | 1138 | let me = match current_user(cx).await { |
| 1138 | 1139 | Ok(user) => user.as_ref(), |
| 1139 | 1140 | Err(_) => None, |
| 1140 | 1141 | }; |
| 1141 | 1142 | let asking = me.is_some(); |
| 1142 | - let dark = me.as_ref().is_none_or(|user| user.theme == "dark"); | |
| 1143 | + let dark = me.as_ref().is_some_and(|user| user.theme == "dark"); | |
| 1143 | 1144 | let ui = me.as_ref().map_or("instrument", |user| user.ui.as_str()); |
| 1144 | 1145 | let lang = crate::i18n::lang(cx).await; |
| 1145 | 1146 |
crates/in-web/tests/http.rsmodified+3 -3
| @@ -4845,13 +4845,13 @@ impl TestApp { | ||
| 4845 | 4845 | #[tokio::test] |
| 4846 | 4846 | async fn signed_out_settings_falls_back_to_accept_language() { |
| 4847 | 4847 | let app = TestApp::build().await; |
| 4848 | - | |
| 4849 | - // No header: English chrome on a dark instrument shell. | |
| 4848 | + // No header: English chrome on a light instrument shell. | |
| 4850 | 4849 | let page = app.get("/settings", None).await; |
| 4851 | 4850 | assert_eq!(page.status, StatusCode::OK, "{}", page.text()); |
| 4852 | 4851 | assert!(page.text().contains("lang=\"en\""), "{}", page.text()); |
| 4852 | + // Signed-out wears the family default: a light instrument shell. | |
| 4853 | 4853 | assert!( |
| 4854 | - page.text().contains("data-theme=\"dark\""), | |
| 4854 | + !page.text().contains("data-theme=\"dark\""), | |
| 4855 | 4855 | "{}", |
| 4856 | 4856 | page.text() |
| 4857 | 4857 | ); |
style/main.scssmodified+2 -0
| @@ -625,6 +625,7 @@ a { | ||
| 625 | 625 | font-size: 10px; |
| 626 | 626 | letter-spacing: 0.08em; |
| 627 | 627 | color: var(--muted-soft); |
| 628 | + text-transform: uppercase; | |
| 628 | 629 | } |
| 629 | 630 | |
| 630 | 631 | // The address an invited member signs in as: shown, never edited. |
| @@ -3350,6 +3351,7 @@ img.avatar { | ||
| 3350 | 3351 | font-size: 10px; |
| 3351 | 3352 | letter-spacing: 0.08em; |
| 3352 | 3353 | color: var(--muted-soft); |
| 3354 | + text-transform: uppercase; | |
| 3353 | 3355 | } |
| 3354 | 3356 | |
| 3355 | 3357 | // A read-only value under a field label — the profile's name, address and |