ui: trim explanatory copy
It's a household app; the people using it know what Done and Trash
do. State flashes say just "Moved to Wait", the trash dialog asks its
question without the paragraph under it, the comment field says "Add a
comment", the quote toggle says "Show quote", and unfiling says
"Unfiled".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
diff --git a/assets/docket.css b/assets/docket.css
index e7c09f3..fbe72e0 100644
--- a/assets/docket.css
+++ b/assets/docket.css
@@ -139,8 +139,7 @@ button { font: inherit; color: inherit; }
/* The trash confirm: a small centered modal over a dimmed page. */
dialog { margin: auto; border: none; border-radius: var(--gl-radius); padding: var(--gl-space-m); background: var(--gl-color-surface-card); color: var(--gl-color-text-primary); box-shadow: var(--gl-shadow-float); max-width: min(380px, calc(100vw - 2 * var(--gl-space-m))); }
dialog::backdrop { background: rgb(0 0 0 / .4); }
-dialog h3 { font: 500 var(--gl-step-0)/1.3 var(--gl-font-text); margin: 0 0 var(--gl-space-2xs) 0; }
-dialog p { margin: 0 0 var(--gl-space-s) 0; color: var(--gl-color-text-secondary); }
+dialog h3 { font: 500 var(--gl-step-0)/1.3 var(--gl-font-text); margin: 0 0 var(--gl-space-s) 0; }
dialog form { display: flex; justify-content: flex-end; gap: var(--gl-space-xs); }
.btn.danger { background: var(--gl-color-danger); color: #fff; }
diff --git a/src/store.rs b/src/store.rs
index ba49524..05d98e3 100644
--- a/src/store.rs
+++ b/src/store.rs
@@ -376,7 +376,7 @@ impl Store {
}
None => {
next.folder = None;
- "Removed from folder".to_owned()
+ "Unfiled".to_owned()
}
};
queue_file(&tx, id, next.folder.as_deref())?;
@@ -399,19 +399,10 @@ impl Store {
inner
.undo
.insert(user.to_owned(), (id.to_owned(), prev, queued_move));
- // Every state but Inbox takes the mail out of the shared Inbox,
- // and the flash teaches that. The verb for Done is Done.
- let flash = match next.state {
- State::Done if queued_move => "Done — leaves the shared Inbox".to_owned(),
- State::Do | State::Wait | State::Watch if queued_move => {
- format!("{text} — leaves the shared Inbox")
- }
- _ => text,
- };
inner.flash.insert(
user.to_owned(),
Flash {
- text: flash,
+ text,
undoable: true,
},
);
@@ -1303,7 +1294,7 @@ mod tests {
.edit(SAM, &fixtures::id(4), Change::Folder(None))
.unwrap();
assert_eq!(values(&store, &fixtures::id(4)).folder, None);
- assert_eq!(store.take_flash(SAM).unwrap().text, "Removed from folder");
+ assert_eq!(store.take_flash(SAM).unwrap().text, "Unfiled");
assert!(matches!(
store.edit(SAM, &fixtures::id(4), Change::Folder(Some("Nope".into()))),
Err(Error::NotFound("folder"))
@@ -1337,8 +1328,7 @@ mod tests {
.clone();
store.sign_in(SAM, "Sam").unwrap();
- // Done on a writable account queues the move; the history
- // names the verb, the flash teaches what it does.
+ // Done on a writable account queues the move.
store.edit(SAM, &id, Change::State(State::Done)).unwrap();
assert_eq!(values(&store, &id).state, State::Done);
assert_eq!(
@@ -1352,7 +1342,7 @@ mod tests {
assert_eq!(
store.take_flash(SAM).unwrap(),
Flash {
- text: "Done — leaves the shared Inbox".into(),
+ text: "Moved to Done".into(),
undoable: true,
}
);
@@ -1375,10 +1365,7 @@ mod tests {
// The other lanes leave the Inbox too; the latest state is the
// one that goes out.
store.edit(SAM, &id, Change::State(State::Wait)).unwrap();
- assert_eq!(
- store.take_flash(SAM).unwrap().text,
- "Moved to Wait — leaves the shared Inbox"
- );
+ assert_eq!(store.take_flash(SAM).unwrap().text, "Moved to Wait");
store.edit(SAM, &id, Change::State(State::Inbox)).unwrap();
assert_eq!(store.take_flash(SAM).unwrap().text, "Moved to Inbox");
assert_eq!(
diff --git a/src/views.rs b/src/views.rs
index 288b960..992b09f 100644
--- a/src/views.rs
+++ b/src/views.rs
@@ -328,8 +328,8 @@ fn thread(p: &Page<'_>, t: &ThreadView, selected: &str) -> Markup {
}
form.comment-box method="post" action=(format!("/threads/{}/comments", t.thread.id)) {
(back(p.here))
- input.field type="text" name="text" required placeholder="Add an internal comment to this thread"
- aria-label="Internal comment" autocomplete="off";
+ input.field type="text" name="text" required placeholder="Add a comment"
+ aria-label="Comment" autocomplete="off";
button.btn.primary type="submit" { "Comment" }
}
}
@@ -386,7 +386,7 @@ fn message(p: &Page<'_>, m: &Message, open: bool, selected: bool, account: &Acco
@if let Some(quoted) = quoted {
button.quote-btn type="button" x-show="open" x-cloak[!open]
"@click"="quoted = !quoted" ":aria-expanded"="quoted"
- x-text="quoted ? 'Hide quoted text' : 'Show quoted text'" { "Show quoted text" }
+ x-text="quoted ? 'Hide quote' : 'Show quote'" { "Show quote" }
span.text.quoted x-show="open && quoted" x-cloak { (body::linked(quoted)) }
}
span.text.closed x-show="!open" x-cloak[open] "@click"="open = true" { (said) }
@@ -474,7 +474,6 @@ fn values_controls(p: &Page<'_>, id: &str, values: &Values, read_only: bool) ->
onclick=(format!("document.getElementById('trash-{}').showModal()", id)) { "Trash" }
dialog id=(format!("trash-{}", id)) {
h3 { "Move to Trash?" }
- p { "The thread goes Done in Docket; the mail lands in Fastmail's Trash." }
form method="post" action=(format!("/messages/{id}/delete")) {
(back(p.here))
button.btn type="submit" formmethod="dialog" autofocus { "Cancel" }
diff --git a/tests/api.rs b/tests/api.rs
index 6d3b494..7415fd5 100644
--- a/tests/api.rs
+++ b/tests/api.rs
@@ -309,7 +309,7 @@ async fn editing_values_with_undo() {
.await;
assert_eq!(res.status(), StatusCode::SEE_OTHER);
let (_, body) = get(addr, SAM, &format!("/?m={}", mid(4))).await;
- assert!(body.contains("Removed from folder"));
+ assert!(body.contains("Unfiled"));
let res = post(
addr,