forge
Explore
Log in

Don't you dare go Hollow

in-web: signed-out default light (family parity), uppercase labels via CSS

Browse files at this commit

a125cd5000189c1163f9b1bdbd498a44f4ff8cadAhmet Kaan GümüşParent: aa7d6b2
crates/in-web/src/layout.rsmodified+3 -2
@@ -1133,13 +1133,14 @@ pub(crate) async fn document_shell<'a>(
11331133 // The per-user chrome knobs, read off the request's own user: the theme
11341134 // into `data-theme`, the interface into `data-ui`, the language into
11351135 // `<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`.
11371138 let me = match current_user(cx).await {
11381139 Ok(user) => user.as_ref(),
11391140 Err(_) => None,
11401141 };
11411142 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");
11431144 let ui = me.as_ref().map_or("instrument", |user| user.ui.as_str());
11441145 let lang = crate::i18n::lang(cx).await;
11451146
crates/in-web/tests/http.rsmodified+3 -3
@@ -4845,13 +4845,13 @@ impl TestApp {
48454845 #[tokio::test]
48464846 async fn signed_out_settings_falls_back_to_accept_language() {
48474847 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.
48504849 let page = app.get("/settings", None).await;
48514850 assert_eq!(page.status, StatusCode::OK, "{}", page.text());
48524851 assert!(page.text().contains("lang=\"en\""), "{}", page.text());
4852+ // Signed-out wears the family default: a light instrument shell.
48534853 assert!(
4854- page.text().contains("data-theme=\"dark\""),
4854+ !page.text().contains("data-theme=\"dark\""),
48554855 "{}",
48564856 page.text()
48574857 );
style/main.scssmodified+2 -0
@@ -625,6 +625,7 @@ a {
625625 font-size: 10px;
626626 letter-spacing: 0.08em;
627627 color: var(--muted-soft);
628+ text-transform: uppercase;
628629 }
629630
630631 // The address an invited member signs in as: shown, never edited.
@@ -3350,6 +3351,7 @@ img.avatar {
33503351 font-size: 10px;
33513352 letter-spacing: 0.08em;
33523353 color: var(--muted-soft);
3354+ text-transform: uppercase;
33533355 }
33543356
33553357 // A read-only value under a field label — the profile's name, address and