diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..4ce15cd --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,10 @@ +# Dizey UI conventions + +1. No bare native form controls. Every `` wears the house + field box (`style/main.scss` `.field-input` / `.field-box` / `.status-form` + pattern) — never an unstyled OS control. + +2. UI text is terse. No instructional/explainer text: refusals state the + fact in one short sentence with no guidance, labels are nouns, no notes + narrating what a control does or restating a limit the form already + enforces. The user is not to be taught his own app. diff --git a/crates/dizey-web/src/auth.rs b/crates/dizey-web/src/auth.rs index 83e28e9..bc8ea04 100644 --- a/crates/dizey-web/src/auth.rs +++ b/crates/dizey-web/src/auth.rs @@ -79,9 +79,7 @@ impl Refusal { Refusal::SignInFirst => "Sign in first.".to_string(), Refusal::AlreadyClaimed => "This workspace already has an owner.".to_string(), Refusal::AddressTaken => "That address already has an account.".to_string(), - Refusal::LinkNotUsable => { - "This link no longer works. Ask the admin to send another.".to_string() - } + Refusal::LinkNotUsable => "This link no longer works.".to_string(), Refusal::EmptyTitle => "Give the task a title.".to_string(), Refusal::EmptyName => "Give yourself a name.".to_string(), Refusal::BadLimit => { @@ -94,21 +92,16 @@ impl Refusal { Refusal::BadSender(problem) => problem.clone(), Refusal::EmptyComment => "Write something first.".to_string(), Refusal::NoFile => "Choose a file first.".to_string(), - Refusal::FileTooBig => { - "That file is bigger than this workspace allows. The limit is in Settings." - .to_string() - } + Refusal::FileTooBig => "Too big for this workspace.".to_string(), Refusal::FileTypeNotAllowed => { "That kind of file is not on this workspace's allowed list.".to_string() } Refusal::EmptySubject => "Give the rule a subject line.".to_string(), Refusal::BadDeadline => "That is not a date.".to_string(), Refusal::Cycle => "That link would put this task behind itself.".to_string(), - Refusal::MovedAlready => { - "Somebody moved this card first. This is where it is now.".to_string() - } + Refusal::MovedAlready => "Somebody moved this card first.".to_string(), Refusal::NotFound => "No such task.".to_string(), - Refusal::Unavailable => "Something went wrong. Try again.".to_string(), + Refusal::Unavailable => "Something went wrong.".to_string(), } } diff --git a/crates/dizey-web/src/board.rs b/crates/dizey-web/src/board.rs index 7d9fc01..4484a24 100644 --- a/crates/dizey-web/src/board.rs +++ b/crates/dizey-web/src/board.rs @@ -220,7 +220,7 @@ pub fn Board() -> impl IntoView { Err(_) => { view! {
-

"Something went wrong. Reload the page."

+

"Something went wrong."

} .into_any() @@ -423,9 +423,6 @@ fn BoardScreen( view! {
"This board is empty"
-
- "Create the first task with the New task button." -
} })} diff --git a/crates/dizey-web/src/detail.rs b/crates/dizey-web/src/detail.rs index ee8ce3f..9cf3808 100644 --- a/crates/dizey-web/src/detail.rs +++ b/crates/dizey-web/src/detail.rs @@ -667,7 +667,7 @@ pub fn TaskDetailModal( } Err(_) => { view! { - + } .into_any() } @@ -1212,7 +1212,7 @@ fn DetailScreen( may_comment, may_delete, allowed_file_types, - attachment_limit_mb, + attachment_limit_mb: _, } = snapshot; let id = StoredValue::new(detail.id.clone()); @@ -1449,9 +1449,6 @@ fn DetailScreen( - - {format!("Up to {attachment_limit_mb} MB.")} - {refused(upload_refusal)} } diff --git a/crates/dizey-web/src/pages.rs b/crates/dizey-web/src/pages.rs index a16919a..7440646 100644 --- a/crates/dizey-web/src/pages.rs +++ b/crates/dizey-web/src/pages.rs @@ -39,7 +39,7 @@ pub fn Landing() -> impl IntoView { view! {
-

"Something went wrong. Reload the page."

+

"Something went wrong."

} .into_any() @@ -150,9 +150,7 @@ pub fn Join() -> impl IntoView {
"This link no longer works"
-
- "Sign-in links last seven days. Ask the admin to send another — it opens the same account, with the same history." -
+
"Sign-in links last seven days."
diff --git a/crates/dizey-web/src/rules.rs b/crates/dizey-web/src/rules.rs index 4747138..2eaa2ee 100644 --- a/crates/dizey-web/src/rules.rs +++ b/crates/dizey-web/src/rules.rs @@ -291,7 +291,7 @@ pub fn RulesPage() -> impl IntoView { Err(_) => { view! {
-

"Something went wrong. Reload the page."

+

"Something went wrong."

} .into_any() @@ -344,16 +344,13 @@ fn RulesScreen(snapshot: RulesSnapshot, on_change: Callback<()>) -> impl IntoVie

"Mail rules"

"Admin only" - - "One sentence per rule. A rule fires when a task on this board matches it. Only the admin writes them — a rule sends mail on everyone's behalf, from the one workspace sender." -
{(!sender_connected) .then(|| { view! {

- "No sender is connected yet, so nothing leaves the machine. Rules still fire and the mail they owe waits in the queue until you connect one in " + "No sender connected — mail waits in the queue until you set one in " "Settings" "."

@@ -364,14 +361,7 @@ fn RulesScreen(snapshot: RulesSnapshot, on_change: Callback<()>) -> impl IntoVie
{rows} - {empty - .then(|| { - view! { -

- "No rules yet. Nothing on this board sends mail until you write one." -

- } - })} + {empty.then(|| view! {

"No rules yet."

})}
@@ -462,9 +452,6 @@ fn Composer(columns: Vec, on_change: Callback<()>) -> impl IntoVie "Add rule" - - "A Viewer is never mailed by a rule, on any audience, and neither is whoever caused the event." - } diff --git a/crates/dizey-web/src/settings.rs b/crates/dizey-web/src/settings.rs index 140da13..4c6b612 100644 --- a/crates/dizey-web/src/settings.rs +++ b/crates/dizey-web/src/settings.rs @@ -343,17 +343,17 @@ pub async fn save_sender( .unwrap_or(false); let complaint = if host.is_empty() { - Some("The SMTP host is the server your mail goes out through — smtp.fastmail.com, for instance.") + Some("Give the SMTP host.") } else if host.contains(char::is_whitespace) || host.contains('@') || host.contains('/') { Some("The SMTP host is a host name, not an address or a URL.") } else if !(1..=65535).contains(&port) { - Some("A port is a number between 1 and 65535. 587 is the usual one; 465 is the other.") + Some("A port is a number between 1 and 65535.") } else if username.is_empty() { - Some("The username is the account Dizey signs in to the mail server with.") + Some("Give the SMTP username.") } else if password.is_none() && !known { - Some("A password is needed the first time. It is stored so Dizey can sign in on every send, and is never shown again.") + Some("A password is needed the first time.") } else if !is_address(&from_address) { - Some("The from-address is the address people will see this mail come from.") + Some("That is not a from-address.") } else { None }; @@ -545,7 +545,7 @@ pub fn SettingsPage() -> impl IntoView { Err(_) => { view! {
-

"Something went wrong. Reload the page."

+

"Something went wrong."

} .into_any() @@ -564,19 +564,6 @@ fn SettingsScreen( link_refusal: RwSignal>, ) -> impl IntoView { let me = snapshot.me.clone(); - // Three roles, three true sentences. A Viewer is never mailed by a rule, so - // the member's line is not merely vague for them, it is wrong. - let role_note = match me.role { - dizey_core::Role::Admin => { - "First account in this workspace. Only you see the sender, limits and member panels." - } - dizey_core::Role::Member => { - "You work the board and the rules mail you. The sender, the limits and the member list are the admin's." - } - dizey_core::Role::Viewer => { - "You read and export the board. No rule ever mails you, and the sender, the limits and the member list are the admin's." - } - }; view! {
@@ -609,7 +596,6 @@ fn SettingsScreen(

"Settings"

{me.role.as_str().to_string()} - {role_note}
@@ -664,11 +650,8 @@ fn ProfilePanel(me: Me) -> impl IntoView { />
{move || { @@ -684,9 +667,6 @@ fn ProfilePanel(me: Me) -> impl IntoView {
- - "Signing out ends this browser's session. Anywhere else you are signed in stays signed in." -
-

- "One sender for the whole workspace. Every mail rule, for every member, sends through this account — nobody sets their own." -

{(!connected) .then(|| { view! {

- "Nothing is sent until this is filled in. Cards still move and rules still fire — what they owe is kept, and goes out on the next sweep after you save." + "Not connected — mail queues until you save."

} })} @@ -832,12 +809,6 @@ fn SenderPanel(sender: Sender, on_change: Callback<()>) -> impl IntoView { false => "Needed before anything can be sent", } /> - - {match password_set { - true => "A password is stored. It is never shown again — not here, not in any answer this page receives. Leave this empty and the stored one is kept.", - false => "No password is stored yet. It is kept so Dizey can sign in to the mail server on every send, and is never shown again once saved.", - }} -
diff --git a/style/main.scss b/style/main.scss index cb1d048..68da659 100644 --- a/style/main.scss +++ b/style/main.scss @@ -1729,6 +1729,19 @@ a { } } +// A