forge
Explore
Log in

Don't you dare go Hollow

The task modal reads as a view, editing is a state you enter

Browse files at this commit

293a3a045bf9278f11b87367a3468a09b3cc4146Ahmet Kaan GümüşParent: 2fa2cc8
  • feat
    • the task modal reads as a view, editing is a state you enter
Show full message
💄 feat(detail): the task modal reads as a view, editing is a state you enter

The modal was showing view and edit at once: a TITLE field under the title, a
DEADLINE row under the deadline, a Save row the design does not have. It now
renders the artboard's view state and each region enters edit on its own.

The substrate stays a <form>. Every editor is a focusable checkbox, a <label>
that is the view, and a sibling form — so entering edit and cancelling both
work with wasm blocked, and the post-save refetch returns the region to prose.

- title is the header, edited in place; no second TITLE field
- description renders as prose, clicking it swaps that one region
- deadline is one control in the field row, calendar glyph and chevron
- "Link a task" is the 26px chip in the DEPENDENCIES header, opening a popover
- the assignee add control is the round "+", opening the same popover pattern

Two defects the drive turned up, both fixed here:

- a cleared edge still counted as taken, so an unlinked task could never be
  linked again and its row lingered with no way to remove it. cleared_at is
  only ever set by an unlink, so a cleared row leaves the list; a link whose
  blocker is finished still shows, because that is done_at.
- three assignees crowded the round "+" off the row. The chips give up width
  first; the picker never shrinks.

Driven headless: title rename, description edit and cancel, deadline popover,
assign, unlink, link (including the cycle refusal in the popover), status
change, comment, delete confirmation and cancel.
crates/dizey-core/src/store/turso_store.rsmodified+7 -2
@@ -1640,16 +1640,21 @@ impl DetailReads for TursoStore {
16401640
16411641 async fn dependencies_for_task(&self, task_id: &str) -> Result<Vec<(bool, DependencyEdge)>> {
16421642 // Both directions in one round trip: the leading column says which.
1643+ // `cleared_at` is only ever set by an unlink, so a cleared row is not a
1644+ // link any more and does not belong on the screen. A link whose blocker
1645+ // is finished still shows — that is `done_at`, and it reads as cleared.
16431646 let mut rows = self
16441647 .conn
16451648 .query(
16461649 "SELECT 1, t.id, t.task_key, t.title, d.cleared_at, t.done_at \
16471650 FROM task_dependency d JOIN task t ON t.id = d.blocking_task_id \
1648- WHERE d.blocked_task_id = ?1 AND t.deleted_at IS NULL \
1651+ WHERE d.blocked_task_id = ?1 AND d.cleared_at IS NULL \
1652+ AND t.deleted_at IS NULL \
16491653 UNION ALL \
16501654 SELECT 0, t.id, t.task_key, t.title, d.cleared_at, t.done_at \
16511655 FROM task_dependency d JOIN task t ON t.id = d.blocked_task_id \
1652- WHERE d.blocking_task_id = ?2 AND t.deleted_at IS NULL",
1656+ WHERE d.blocking_task_id = ?2 AND d.cleared_at IS NULL \
1657+ AND t.deleted_at IS NULL",
16531658 params![task_id, task_id],
16541659 )
16551660 .await
crates/dizey-web/src/board.rsmodified+4 -2
@@ -533,8 +533,10 @@ fn Card(
533533 }
534534 }
535535
536+/// A person as a circle. `extra` carries the size the surface wants — the
537+/// board's own 22px is the default, the modal asks for its 18px and 28px.
536538 #[component]
537-fn Avatar(person: Person) -> impl IntoView {
539+pub(crate) fn Avatar(person: Person, #[prop(optional)] extra: &'static str) -> impl IntoView {
538540 let initials = person.initials();
539541 // Five tones from the mockups' palette, picked from the id so a person
540542 // keeps the same one wherever they appear.
@@ -544,7 +546,7 @@ fn Avatar(person: Person) -> impl IntoView {
544546 .fold(0u32, |acc, b| acc.wrapping_mul(31).wrapping_add(b as u32))
545547 % 5;
546548 view! {
547- <span class=format!("avatar avatar-tone-{tone}") title=person.display_name.clone()>
549+ <span class=format!("avatar avatar-tone-{tone} {extra}") title=person.display_name.clone()>
548550 {initials}
549551 </span>
550552 }
crates/dizey-web/src/detail.rsmodified+653 -200
@@ -14,6 +14,7 @@ use serde::{Deserialize, Serialize};
1414 use time::Date;
1515
1616 use crate::auth::{Me, Refusal};
17+use crate::board::Avatar;
1718
1819 /// A task this board could be linked to: enough to name it in the picker and
1920 /// nothing more.
@@ -101,13 +102,16 @@ pub async fn fetch_task(task_id: String) -> Result<Result<DetailSnapshot, Refusa
101102 };
102103
103104 // What the picker may offer: this board's other tasks, minus the ones
104- // already on either end of a link with this one.
105+ // already on either end of a live link with this one. A cleared edge is
106+ // not a link any more, so its task comes back to the picker — the store's
107+ // upsert revives that row rather than duplicating it.
105108 let mut linkable = Vec::new();
106109 if let Some(board) = store.board(&user.workspace_id).await.map_err(fail)? {
107110 let taken: Vec<&str> = detail
108111 .blocked_by
109112 .iter()
110113 .chain(detail.blocks.iter())
114+ .filter(|edge| edge.cleared_at.is_none())
111115 .map(|edge| edge.task_id.as_str())
112116 .collect();
113117 for task in store.tasks_for_board(&board.id).await.map_err(fail)? {
@@ -145,30 +149,50 @@ pub async fn fetch_task(task_id: String) -> Result<Result<DetailSnapshot, Refusa
145149
146150 /// Saves the title, the description and the deadline. Status is not here: the
147151 /// column a task sits in is changed by moving it, which is the next slice.
152+/// Saves one region of the task, and leaves the rest of it alone.
153+///
154+/// Each field arrives only from the editor that was open, so a person fixing
155+/// a deadline cannot silently write back the description as it looked when
156+/// they opened the modal — the fields nobody edited are read from the store,
157+/// not from a hidden input carrying a stale copy.
148158 #[server]
149159 pub async fn save_task(
150160 task_id: String,
151- title: String,
152- description: String,
153- deadline: String,
161+ title: Option<String>,
162+ description: Option<String>,
163+ deadline: Option<String>,
154164 ) -> Result<Option<Refusal>, ServerFnError> {
155165 use crate::server::accounts;
156166 use time::OffsetDateTime;
157167 use time::macros::format_description;
158168
159- let (user, _) = match guard::writer_and_task(&task_id).await {
169+ let (user, facts) = match guard::writer_and_task(&task_id).await {
160170 Ok(pair) => pair,
161171 Err(refusal) => return Ok(Some(refusal)),
162172 };
163- let title = title.trim().to_string();
164- if title.is_empty() {
165- return Ok(Some(Refusal::EmptyTitle));
166- }
167- let deadline = match deadline.trim() {
168- "" => None,
169- raw => match Date::parse(raw, format_description!("[year]-[month]-[day]")) {
170- Ok(day) => Some(day),
171- Err(_) => return Ok(Some(Refusal::BadDeadline)),
173+
174+ let title = match title {
175+ Some(given) => {
176+ let trimmed = given.trim().to_string();
177+ if trimmed.is_empty() {
178+ return Ok(Some(Refusal::EmptyTitle));
179+ }
180+ trimmed
181+ }
182+ None => facts.row.title.clone(),
183+ };
184+ let description = match &description {
185+ Some(given) => given.trim().to_string(),
186+ None => facts.description.clone(),
187+ };
188+ let deadline = match deadline.as_deref() {
189+ None => facts.row.deadline,
190+ Some(raw) => match raw.trim() {
191+ "" => None,
192+ day => match Date::parse(day, format_description!("[year]-[month]-[day]")) {
193+ Ok(day) => Some(day),
194+ Err(_) => return Ok(Some(Refusal::BadDeadline)),
195+ },
172196 },
173197 };
174198
@@ -177,7 +201,7 @@ pub async fn save_task(
177201 .save_task(
178202 &task_id,
179203 &title,
180- description.trim(),
204+ &description,
181205 deadline,
182206 &user.id,
183207 OffsetDateTime::now_utc(),
@@ -503,6 +527,7 @@ fn StatusControl(
503527 })
504528 .collect_view()}
505529 </select>
530+ {glyph::chevron()}
506531 <Show when=move || !live.get()>
507532 <button class="status-go" type="submit">
508533 "Move"
@@ -602,6 +627,501 @@ pub fn TaskDetailModal(
602627 }
603628 }
604629
630+/// The artboard's glyphs, drawn rather than typed. A missing character in a
631+/// font is a hole in the design; an inline path is the same shape everywhere.
632+mod glyph {
633+ use leptos::prelude::*;
634+
635+ pub fn chevron() -> impl IntoView {
636+ view! {
637+ <svg
638+ class="glyph"
639+ width="14"
640+ height="14"
641+ viewBox="0 0 16 16"
642+ fill="none"
643+ stroke="currentColor"
644+ stroke-width="1.5"
645+ stroke-linecap="round"
646+ stroke-linejoin="round"
647+ aria-hidden="true"
648+ >
649+ <path d="M4 6l4 4 4-4"></path>
650+ </svg>
651+ }
652+ }
653+
654+ pub fn calendar() -> impl IntoView {
655+ view! {
656+ <svg
657+ class="glyph"
658+ width="13"
659+ height="13"
660+ viewBox="0 0 16 16"
661+ fill="none"
662+ stroke="currentColor"
663+ stroke-width="1.5"
664+ stroke-linecap="round"
665+ aria-hidden="true"
666+ >
667+ <rect x="2.5" y="3.5" width="11" height="10" rx="1.5"></rect>
668+ <path d="M2.5 6.5h11M5.5 2v2.5M10.5 2v2.5"></path>
669+ </svg>
670+ }
671+ }
672+
673+ pub fn plus() -> impl IntoView {
674+ view! {
675+ <svg
676+ class="glyph"
677+ width="12"
678+ height="12"
679+ viewBox="0 0 16 16"
680+ fill="none"
681+ stroke="currentColor"
682+ stroke-width="1.6"
683+ stroke-linecap="round"
684+ aria-hidden="true"
685+ >
686+ <path d="M8 3v10M3 8h10"></path>
687+ </svg>
688+ }
689+ }
690+
691+ pub fn cross() -> impl IntoView {
692+ view! {
693+ <svg
694+ class="glyph"
695+ width="13"
696+ height="13"
697+ viewBox="0 0 16 16"
698+ fill="none"
699+ stroke="currentColor"
700+ stroke-width="1.5"
701+ stroke-linecap="round"
702+ aria-hidden="true"
703+ >
704+ <path d="M4 4l8 8M12 4l-8 8"></path>
705+ </svg>
706+ }
707+ }
708+
709+ pub fn tick() -> impl IntoView {
710+ view! {
711+ <svg
712+ class="glyph dep-tick"
713+ width="14"
714+ height="14"
715+ viewBox="0 0 16 16"
716+ fill="none"
717+ stroke="currentColor"
718+ stroke-width="1.8"
719+ stroke-linecap="round"
720+ stroke-linejoin="round"
721+ aria-hidden="true"
722+ >
723+ <path d="M3 8.5l3.5 3.5L13 5"></path>
724+ </svg>
725+ }
726+ }
727+
728+ pub fn lock() -> impl IntoView {
729+ view! {
730+ <svg
731+ class="glyph"
732+ width="14"
733+ height="14"
734+ viewBox="0 0 16 16"
735+ fill="none"
736+ stroke="currentColor"
737+ stroke-width="1.6"
738+ stroke-linecap="round"
739+ stroke-linejoin="round"
740+ aria-hidden="true"
741+ >
742+ <rect x="3.5" y="7" width="9" height="6.5" rx="1.5"></rect>
743+ <path d="M5.5 7V5a2.5 2.5 0 015 0v2"></path>
744+ </svg>
745+ }
746+ }
747+
748+ pub fn bin() -> impl IntoView {
749+ view! {
750+ <svg
751+ class="glyph"
752+ width="14"
753+ height="14"
754+ viewBox="0 0 16 16"
755+ fill="none"
756+ stroke="currentColor"
757+ stroke-width="1.5"
758+ stroke-linecap="round"
759+ stroke-linejoin="round"
760+ aria-hidden="true"
761+ >
762+ <path d="M3 4.5h10M6.5 4.5V3h3v1.5M4.5 4.5l0.7 8.5a1 1 0 001 0.9h3.6a1 1 0 001-0.9l0.7-8.5"></path>
763+ </svg>
764+ }
765+ }
766+}
767+
768+/// The title, as the artboard draws it: the heading itself, with the rename
769+/// hidden behind it.
770+///
771+/// Editing is a state the screen enters, not a second field sitting beside the
772+/// first. The checkbox is the state — it is what a click on the heading flips,
773+/// what Cancel flips back, and it needs no script to do either. The heading and
774+/// the input are never on screen together.
775+#[component]
776+fn TitleControl(
777+ task_id: StoredValue<String>,
778+ title: String,
779+ may_write: bool,
780+ on_change: impl Fn() + Copy + Send + Sync + 'static,
781+) -> impl IntoView {
782+ if !may_write {
783+ return Either::Left(view! { <h2 class="detail-title">{title}</h2> });
784+ }
785+ let action = ServerAction::<SaveTask>::new();
786+ let value = action.value();
787+ Effect::new(move |_| {
788+ if matches!(value.get(), Some(Ok(None))) {
789+ on_change();
790+ }
791+ });
792+ let toggle = format!("rename-{}", task_id.get_value());
793+ let field = title.clone();
794+
795+ Either::Right(view! {
796+ <div class="edit">
797+ <input
798+ class="edit-toggle"
799+ type="checkbox"
800+ id=toggle.clone()
801+ aria-label="Rename this task"
802+ />
803+ <h2 class="detail-title edit-view">
804+ <label class="edit-hit" for=toggle.clone()>
805+ {title}
806+ </label>
807+ </h2>
808+ <ActionForm action=action attr:class="edit-form title-form">
809+ <input type="hidden" name="task_id" value=move || task_id.get_value()/>
810+ <input
811+ class="title-input"
812+ type="text"
813+ name="title"
814+ value=field
815+ autocomplete="off"
816+ required
817+ />
818+ <button class="edit-save" type="submit" disabled=move || action.pending().get()>
819+ "Save"
820+ </button>
821+ <label class="edit-cancel" for=toggle>
822+ "Cancel"
823+ </label>
824+ </ActionForm>
825+ {refused(action)}
826+ </div>
827+ })
828+}
829+
830+/// The description as prose, with the textarea behind it.
831+///
832+/// Clicking the prose swaps this region and only this region. Nothing else on
833+/// the screen moves, and the rest of the task is not carried along in hidden
834+/// inputs — the save names the description alone.
835+#[component]
836+fn DescriptionControl(
837+ task_id: StoredValue<String>,
838+ description: String,
839+ may_write: bool,
840+ on_change: impl Fn() + Copy + Send + Sync + 'static,
841+) -> impl IntoView {
842+ let empty = description.trim().is_empty();
843+ let prose = if empty {
844+ "No description yet.".to_string()
845+ } else {
846+ description.clone()
847+ };
848+
849+ if !may_write {
850+ return Either::Left(
851+ view! { <p class="detail-prose" class:detail-prose-empty=empty>{prose}</p> },
852+ );
853+ }
854+ let action = ServerAction::<SaveTask>::new();
855+ let value = action.value();
856+ Effect::new(move |_| {
857+ if matches!(value.get(), Some(Ok(None))) {
858+ on_change();
859+ }
860+ });
861+ let toggle = format!("describe-{}", task_id.get_value());
862+ let field = description.clone();
863+
864+ Either::Right(view! {
865+ <div class="edit">
866+ <input
867+ class="edit-toggle"
868+ type="checkbox"
869+ id=toggle.clone()
870+ aria-label="Edit the description"
871+ />
872+ <label class="detail-prose edit-view edit-hit" class:detail-prose-empty=empty for=toggle.clone()>
873+ {prose}
874+ </label>
875+ <ActionForm action=action attr:class="edit-form describe-form">
876+ <input type="hidden" name="task_id" value=move || task_id.get_value()/>
877+ <textarea class="detail-textarea" name="description" rows="5" prop:value=field.clone()>
878+ {field.clone()}
879+ </textarea>
880+ <div class="edit-row">
881+ <button class="edit-save" type="submit" disabled=move || action.pending().get()>
882+ "Save"
883+ </button>
884+ <label class="edit-cancel" for=toggle>
885+ "Cancel"
886+ </label>
887+ </div>
888+ </ActionForm>
889+ {refused(action)}
890+ </div>
891+ })
892+}
893+
894+/// One deadline control: the artboard's calendar glyph, the date as a person
895+/// reads it, and the chevron. The picker is what opens when it is clicked —
896+/// there is no second DEADLINE row further down the screen.
897+#[component]
898+fn DeadlineControl(
899+ task_id: StoredValue<String>,
900+ deadline_label: String,
901+ deadline_input: String,
902+ overdue: bool,
903+ may_write: bool,
904+ on_change: impl Fn() + Copy + Send + Sync + 'static,
905+) -> impl IntoView {
906+ if !may_write {
907+ return Either::Left(
908+ view! {
909+ <span class="field-box" class:detail-overdue=overdue>
910+ {glyph::calendar()}
911+ <span class="field-text">{deadline_label}</span>
912+ </span>
913+ },
914+ );
915+ }
916+ let action = ServerAction::<SaveTask>::new();
917+ let value = action.value();
918+ Effect::new(move |_| {
919+ if matches!(value.get(), Some(Ok(None))) {
920+ on_change();
921+ }
922+ });
923+ let toggle = format!("deadline-{}", task_id.get_value());
924+
925+ Either::Right(view! {
926+ <div class="edit edit-pop">
927+ <input
928+ class="edit-toggle"
929+ type="checkbox"
930+ id=toggle.clone()
931+ aria-label="Change the deadline"
932+ />
933+ <label
934+ class="field-box edit-view edit-hit"
935+ class:detail-overdue=overdue
936+ for=toggle.clone()
937+ >
938+ {glyph::calendar()}
939+ <span class="field-text">{deadline_label}</span>
940+ {glyph::chevron()}
941+ </label>
942+ <div class="edit-form pop-panel">
943+ <ActionForm action=action attr:class="pop-form">
944+ <input type="hidden" name="task_id" value=move || task_id.get_value()/>
945+ <input class="detail-date" type="date" name="deadline" value=deadline_input/>
946+ <div class="edit-row">
947+ <button
948+ class="edit-save"
949+ type="submit"
950+ disabled=move || action.pending().get()
951+ >
952+ "Save"
953+ </button>
954+ <label class="edit-cancel" for=toggle>
955+ "Cancel"
956+ </label>
957+ </div>
958+ </ActionForm>
959+ {refused(action)}
960+ </div>
961+ </div>
962+ })
963+}
964+/// The round "+" from the artboard, and the list of people it opens.
965+///
966+/// A native `<select>` cannot be made to look like this control, so the picker
967+/// is the same popover the deadline uses: a checkbox holds the open state, and
968+/// each person is their own one-field form. It works with the wasm bundle
969+/// blocked, and it is still the design's round button.
970+#[component]
971+fn AssigneePicker(
972+ task_id: StoredValue<String>,
973+ people: Vec<Person>,
974+ on_change: impl Fn() + Copy + Send + Sync + 'static,
975+) -> impl IntoView {
976+ if people.is_empty() {
977+ return None;
978+ }
979+ let action = ServerAction::<Assign>::new();
980+ let value = action.value();
981+ Effect::new(move |_| {
982+ if matches!(value.get(), Some(Ok(None))) {
983+ on_change();
984+ }
985+ });
986+ let toggle = format!("assign-{}", task_id.get_value());
987+
988+ Some(view! {
989+ <div class="edit edit-pop assignee-pop">
990+ <input
991+ class="edit-toggle"
992+ type="checkbox"
993+ id=toggle.clone()
994+ aria-label="Put someone on this task"
995+ />
996+ <label class="assignee-add edit-view edit-hit" for=toggle.clone()>
997+ {glyph::plus()}
998+ </label>
999+ <div class="edit-form pop-panel">
1000+ <div class="pop-list">
1001+ {people
1002+ .into_iter()
1003+ .map(|person| {
1004+ let name = person.display_name.clone();
1005+ view! {
1006+ <ActionForm action=action attr:class="pop-row-form">
1007+ <input
1008+ type="hidden"
1009+ name="task_id"
1010+ value=move || task_id.get_value()
1011+ />
1012+ <input type="hidden" name="user_id" value=person.id.clone()/>
1013+ <button class="pop-row" type="submit">
1014+ <Avatar person=person.clone() extra="avatar-sm"/>
1015+ <span class="pop-row-name">{name}</span>
1016+ </button>
1017+ </ActionForm>
1018+ }
1019+ })
1020+ .collect_view()}
1021+ </div>
1022+ {refused(action)}
1023+ </div>
1024+ </div>
1025+ })
1026+}
1027+
1028+/// The 26px "Link a task" chip in the DEPENDENCIES header, and the picker it
1029+/// opens: the tasks as a list, the direction as two words, one button.
1030+#[component]
1031+fn LinkPicker(
1032+ task_id: StoredValue<String>,
1033+ linkable: Vec<LinkTarget>,
1034+ on_change: impl Fn() + Copy + Send + Sync + 'static,
1035+) -> impl IntoView {
1036+ if linkable.is_empty() {
1037+ return None;
1038+ }
1039+ let action = ServerAction::<LinkTasks>::new();
1040+ let value = action.value();
1041+ Effect::new(move |_| {
1042+ if matches!(value.get(), Some(Ok(None))) {
1043+ on_change();
1044+ }
1045+ });
1046+ let toggle = format!("link-{}", task_id.get_value());
1047+ let direction = format!("link-direction-{}", task_id.get_value());
1048+
1049+ Some(view! {
1050+ <div class="edit edit-pop link-pop">
1051+ <input
1052+ class="edit-toggle"
1053+ type="checkbox"
1054+ id=toggle.clone()
1055+ aria-label="Link another task"
1056+ />
1057+ <label class="dep-chip edit-view edit-hit" for=toggle.clone()>
1058+ {glyph::plus()}
1059+ <span class="dep-chip-text">"Link a task"</span>
1060+ </label>
1061+ <div class="edit-form pop-panel pop-panel-wide">
1062+ <ActionForm action=action attr:class="pop-form">
1063+ <input type="hidden" name="task_id" value=move || task_id.get_value()/>
1064+ <div class="pop-list pop-list-scroll">
1065+ {linkable
1066+ .iter()
1067+ .map(|target| {
1068+ let key = target.task_key.clone();
1069+ let title = target.title.clone();
1070+ view! {
1071+ <label class="pick-row">
1072+ <input
1073+ type="radio"
1074+ name="other_id"
1075+ value=target.id.clone()
1076+ required
1077+ />
1078+ <span class="dep-key">{key}</span>
1079+ <span class="pick-title">{title}</span>
1080+ </label>
1081+ }
1082+ })
1083+ .collect_view()}
1084+ </div>
1085+ <fieldset class="pick-direction">
1086+ <legend class="detail-label">"DIRECTION"</legend>
1087+ <label class="pick-row">
1088+ <input
1089+ type="radio"
1090+ name="direction"
1091+ value="blocked_by"
1092+ checked
1093+ id=format!("{direction}-blocked-by")
1094+ />
1095+ <span class="pick-title">"blocks this task"</span>
1096+ </label>
1097+ <label class="pick-row">
1098+ <input
1099+ type="radio"
1100+ name="direction"
1101+ value="blocks"
1102+ id=format!("{direction}-blocks")
1103+ />
1104+ <span class="pick-title">"waits on this task"</span>
1105+ </label>
1106+ </fieldset>
1107+ <div class="edit-row">
1108+ <button
1109+ class="edit-save"
1110+ type="submit"
1111+ disabled=move || action.pending().get()
1112+ >
1113+ "Link"
1114+ </button>
1115+ <label class="edit-cancel" for=toggle>
1116+ "Cancel"
1117+ </label>
1118+ </div>
1119+ </ActionForm>
1120+ {refused(action)}
1121+ </div>
1122+ </div>
1123+ })
1124+}
6051125 #[component]
6061126 fn DetailScreen(
6071127 snapshot: DetailSnapshot,
@@ -621,9 +1141,7 @@ fn DetailScreen(
6211141 let id = StoredValue::new(detail.id.clone());
6221142 let task_key = detail.task_key.clone();
6231143 let title = detail.title.clone();
624- let title_field = detail.title.clone();
6251144 let description = detail.description.clone();
626- let description_field = detail.description.clone();
6271145 let status = detail.column.name.clone();
6281146 let column_id = detail.column.id.clone();
6291147 let columns = detail.columns.clone();
@@ -631,19 +1149,20 @@ fn DetailScreen(
6311149 let overdue = detail.is_overdue(today);
6321150 let deadline_label = detail.deadline_label(today);
6331151 let assignee_count = detail.assignees.len();
1152+ let comment_count = detail.comments.len();
6341153 let unassigned: Vec<Person> = detail.unassigned().cloned().collect();
1154+ let has_deps = !detail.blocked_by.is_empty() || !detail.blocks.is_empty();
6351155
636- let save = ServerAction::<SaveTask>::new();
6371156 let comment = ServerAction::<PostComment>::new();
638- let link = ServerAction::<LinkTasks>::new();
6391157 let remove = ServerAction::<DeleteTask>::new();
6401158 let move_to = ServerAction::<crate::board::MoveCard>::new();
6411159 // Deleting is two steps: ask what it would cost, then say it out loud and
6421160 // let the person decide. The artboard's red button had no confirmation and
6431161 // this action reaches other people's tasks.
6441162 let ask = ServerAction::<WhatDeleteCosts>::new();
645- // Every action that lands re-reads the task and the board behind it.
646- for value in [save.value(), comment.value(), link.value(), move_to.value()] {
1163+ // Every action that lands re-reads the task and the board behind it. The
1164+ // per-region editors own their own actions and do the same.
1165+ for value in [comment.value(), move_to.value()] {
6471166 Effect::new(move |_| {
6481167 if matches!(value.get(), Some(Ok(None))) {
6491168 on_change();
@@ -660,12 +1179,18 @@ fn DetailScreen(
6601179
6611180 view! {
6621181 <header class="detail-head">
663- <span class="detail-key">{task_key}</span>
664- <h2 class="detail-title">{title}</h2>
665- <div class="spacer"></div>
1182+ <div class="detail-headline">
1183+ <span class="detail-key">{task_key}</span>
1184+ <TitleControl task_id=id title=title may_write=may_write on_change=on_change/>
1185+ </div>
6661186 <span class="detail-esc">"esc"</span>
667- <button class="detail-close" type="button" on:click=move |_| on_close()>
668- "✕"
1187+ <button
1188+ class="detail-close"
1189+ type="button"
1190+ aria-label="Close this task"
1191+ on:click=move |_| on_close()
1192+ >
1193+ {glyph::cross()}
6691194 </button>
6701195 </header>
6711196
@@ -684,7 +1209,14 @@ fn DetailScreen(
6841209 },
6851210 )
6861211 } else {
687- Either::Right(view! { <span class="detail-value">{status}</span> })
1212+ Either::Right(
1213+ view! {
1214+ <span class="field-box">
1215+ <span class="status-dot"></span>
1216+ <span class="field-text">{status}</span>
1217+ </span>
1218+ },
1219+ )
6881220 }}
6891221 {refused(move_to)}
6901222 </div>
@@ -707,6 +1239,7 @@ fn DetailScreen(
7071239 }
7081240 })
7091241 .collect_view()}
1242+ <div class="spacer"></div>
7101243 {may_write
7111244 .then(|| {
7121245 view! { <AssigneePicker task_id=id people=unassigned on_change=on_change/> }
@@ -715,67 +1248,40 @@ fn DetailScreen(
7151248 </div>
7161249 <div class="detail-field">
7171250 <span class="detail-label">"DEADLINE"</span>
718- <span class="detail-value" class:detail-overdue=overdue>
719- {deadline_label}
720- </span>
1251+ <DeadlineControl
1252+ task_id=id
1253+ deadline_label=deadline_label
1254+ deadline_input=deadline_input
1255+ overdue=overdue
1256+ may_write=may_write
1257+ on_change=on_change
1258+ />
7211259 </div>
7221260 </div>
7231261
724- <ActionForm action=save attr:class="detail-form">
725- <input type="hidden" name="task_id" value=move || id.get_value()/>
726- <span class="detail-label">"TITLE"</span>
727- <input
728- class="detail-input"
729- type="text"
730- name="title"
731- value=title_field
732- required
733- disabled=!may_write
734- />
1262+ <section class="detail-block">
7351263 <span class="detail-label">"DESCRIPTION"</span>
736- <textarea
737- class="detail-textarea"
738- name="description"
739- rows="4"
740- disabled=!may_write
741- prop:value=description_field
742- >
743- {description}
744- </textarea>
745- <span class="detail-label">"DEADLINE"</span>
746- <input
747- class="detail-input detail-date"
748- type="date"
749- name="deadline"
750- value=deadline_input
751- disabled=!may_write
1264+ <DescriptionControl
1265+ task_id=id
1266+ description=description
1267+ may_write=may_write
1268+ on_change=on_change
7521269 />
753- {may_write
754- .then(|| {
755- view! {
756- <div class="detail-form-row">
757- <button
758- class="detail-save"
759- type="submit"
760- disabled=move || save.pending().get()
761- >
762- "Save"
763- </button>
764- </div>
765- {refused(save)}
766- }
767- })}
768- </ActionForm>
1270+ </section>
7691271
770- <section class="detail-section">
771- <div class="detail-section-head">
1272+ <section class="detail-block">
1273+ <div class="detail-block-head">
7721274 <span class="detail-label">"DEPENDENCIES"</span>
1275+ <div class="spacer"></div>
1276+ {may_write
1277+ .then(|| {
1278+ view! { <LinkPicker task_id=id linkable=linkable on_change=on_change/> }
1279+ })}
7731280 </div>
774- {(!detail.blocked_by.is_empty())
1281+ {has_deps
7751282 .then(|| {
7761283 view! {
777- <div class="dep-group">
778- <span class="dep-heading">"BLOCKED BY"</span>
1284+ <div class="dep-list">
7791285 {detail
7801286 .blocked_by
7811287 .iter()
@@ -791,14 +1297,6 @@ fn DetailScreen(
7911297 }
7921298 })
7931299 .collect_view()}
794- </div>
795- }
796- })}
797- {(!detail.blocks.is_empty())
798- .then(|| {
799- view! {
800- <div class="dep-group">
801- <span class="dep-heading">"BLOCKS"</span>
8021300 {detail
8031301 .blocks
8041302 .iter()
@@ -817,73 +1315,51 @@ fn DetailScreen(
8171315 </div>
8181316 }
8191317 })}
820- {(may_write && !linkable.is_empty())
821- .then(|| {
822- view! {
823- <ActionForm action=link attr:class="dep-link">
824- <input type="hidden" name="task_id" value=move || id.get_value()/>
825- <select class="dep-select" name="other_id">
826- {linkable
827- .iter()
828- .map(|target| {
829- view! {
830- <option value=target.id.clone()>
831- {format!("{} {}", target.task_key, target.title)}
832- </option>
833- }
834- })
835- .collect_view()}
836- </select>
837- <select class="dep-select" name="direction">
838- <option value="blocked_by">"blocks this task"</option>
839- <option value="blocks">"waits on this task"</option>
840- </select>
841- <button class="dep-add" type="submit" disabled=move || link.pending().get()>
842- "Link a task"
843- </button>
844- </ActionForm>
845- {refused(link)}
846- }
847- })}
1318+ {(!has_deps).then(|| view! { <p class="detail-quiet">"Nothing blocks this task."</p> })}
8481319 </section>
8491320
850- <section class="detail-section">
851- <span class="detail-label">"COMMENTS"</span>
852- {detail
853- .comments
854- .iter()
855- .map(|entry| view! { <CommentRow comment=entry.clone()/> })
856- .collect_view()}
857- {may_comment
858- .then(|| {
859- view! {
860- <ActionForm action=comment attr:class="comment-composer">
861- <input type="hidden" name="task_id" value=move || id.get_value()/>
862- <textarea
863- class="comment-input"
864- name="body"
865- rows="3"
866- placeholder="Write a comment…"
867- required
868- ></textarea>
869- <div class="comment-row">
870- <span class="comment-hint">"⌘↵ to post"</span>
871- <div class="spacer"></div>
872- <button
873- class="comment-post"
874- type="submit"
875- disabled=move || comment.pending().get()
876- >
877- "Comment"
878- </button>
879- </div>
880- </ActionForm>
881- {refused(comment)}
882- }
883- })}
1321+ <section class="detail-block">
1322+ <div class="detail-block-head">
1323+ <span class="detail-label">"COMMENTS"</span>
1324+ <span class="detail-count">{comment_count}</span>
1325+ </div>
1326+ <div class="comment-list">
1327+ {detail
1328+ .comments
1329+ .iter()
1330+ .map(|entry| view! { <CommentRow comment=entry.clone()/> })
1331+ .collect_view()}
1332+ {may_comment
1333+ .then(|| {
1334+ view! {
1335+ <ActionForm action=comment attr:class="comment-composer">
1336+ <input type="hidden" name="task_id" value=move || id.get_value()/>
1337+ <textarea
1338+ class="comment-input"
1339+ name="body"
1340+ rows="3"
1341+ placeholder="Write a comment…"
1342+ required
1343+ ></textarea>
1344+ <div class="comment-row">
1345+ <span class="comment-hint">"⌘↵ to post"</span>
1346+ <div class="spacer"></div>
1347+ <button
1348+ class="comment-post"
1349+ type="submit"
1350+ disabled=move || comment.pending().get()
1351+ >
1352+ "Comment"
1353+ </button>
1354+ </div>
1355+ </ActionForm>
1356+ {refused(comment)}
1357+ }
1358+ })}
1359+ </div>
8841360 </section>
8851361
886- <section class="detail-section">
1362+ <section class="detail-block">
8871363 <span class="detail-label">"ACTIVITY"</span>
8881364 {detail
8891365 .activity
@@ -987,7 +1463,8 @@ fn DetailScreen(
9871463 type="submit"
9881464 disabled=move || ask.pending().get()
9891465 >
990- "Delete task"
1466+ {glyph::bin()}
1467+ <span>"Delete task"</span>
9911468 </button>
9921469 </ActionForm>
9931470 }
@@ -1015,22 +1492,24 @@ fn AssigneeChip(
10151492 }
10161493 });
10171494 let name = person.display_name.clone();
1495+ let person_id = person.id.clone();
10181496
10191497 view! {
10201498 <span class="assignee-chip">
1021- {name.clone()}
1499+ <Avatar person=person extra="avatar-sm"/>
1500+ <span class="assignee-name">{name.clone()}</span>
10221501 {may_write
10231502 .then(|| {
10241503 view! {
10251504 <ActionForm action=action attr:class="assignee-drop">
10261505 <input type="hidden" name="task_id" value=move || task_id.get_value()/>
1027- <input type="hidden" name="user_id" value=person.id.clone()/>
1506+ <input type="hidden" name="user_id" value=person_id/>
10281507 <button
10291508 class="assignee-remove"
10301509 type="submit"
10311510 title=format!("Take {name} off this task")
10321511 >
1033- "✕"
1512+ {glyph::cross()}
10341513 </button>
10351514 </ActionForm>
10361515 }
@@ -1039,46 +1518,6 @@ fn AssigneeChip(
10391518 }
10401519 }
10411520
1042-#[component]
1043-fn AssigneePicker(
1044- task_id: StoredValue<String>,
1045- people: Vec<Person>,
1046- on_change: impl Fn() + Copy + Send + Sync + 'static,
1047-) -> impl IntoView {
1048- let action = ServerAction::<Assign>::new();
1049- let value = action.value();
1050- Effect::new(move |_| {
1051- if matches!(value.get(), Some(Ok(None))) {
1052- on_change();
1053- }
1054- });
1055- let empty = people.is_empty();
1056-
1057- view! {
1058- {(!empty)
1059- .then(|| {
1060- view! {
1061- <ActionForm action=action attr:class="assignee-add">
1062- <input type="hidden" name="task_id" value=move || task_id.get_value()/>
1063- <select class="assignee-select" name="user_id">
1064- {people
1065- .iter()
1066- .map(|person| {
1067- view! {
1068- <option value=person.id.clone()>{person.display_name.clone()}</option>
1069- }
1070- })
1071- .collect_view()}
1072- </select>
1073- <button class="assignee-assign" type="submit">
1074- "Assign"
1075- </button>
1076- </ActionForm>
1077- }
1078- })}
1079- }
1080-}
1081-
10821521 #[component]
10831522 fn DepRow(
10841523 task_id: StoredValue<String>,
@@ -1105,15 +1544,25 @@ fn DepRow(
11051544 Direction::BlockedBy => "blocked_by",
11061545 Direction::Blocks => "blocks",
11071546 };
1547+ // The artboard puts the direction in the row itself, in a fixed column, so
1548+ // the rows line up whichever way round they run.
1549+ let tag = if waiting { "BLOCKS" } else { "BLOCKED BY" };
11081550
11091551 view! {
11101552 <div class="dep-row" class:dep-row-waiting=waiting>
1111- {cleared.then(|| view! { <span class="dep-tick">"✓"</span> })}
1553+ <span class="dep-tag">{tag}</span>
1554+ {if waiting {
1555+ Either::Left(glyph::lock())
1556+ } else if cleared {
1557+ Either::Right(Either::Left(glyph::tick()))
1558+ } else {
1559+ Either::Right(Either::Right(glyph::lock()))
1560+ }}
11121561 <span class="dep-key">{edge.task_key.clone()}</span>
11131562 <span class="dep-title">{edge.title.clone()}</span>
11141563 <div class="spacer"></div>
11151564 <span class="dep-note">{note}</span>
1116- {(may_write && !cleared)
1565+ {may_write
11171566 .then(|| {
11181567 view! {
11191568 <ActionForm action=action attr:class="dep-unlink-form">
@@ -1121,7 +1570,7 @@ fn DepRow(
11211570 <input type="hidden" name="other_id" value=other_id/>
11221571 <input type="hidden" name="direction" value=wire/>
11231572 <button class="dep-unlink" type="submit" title="Remove this link">
1124- "✕"
1573+ {glyph::cross()}
11251574 </button>
11261575 </ActionForm>
11271576 }
@@ -1134,13 +1583,17 @@ fn DepRow(
11341583 fn CommentRow(comment: Comment) -> impl IntoView {
11351584 use dizey_core::detail::moment_label;
11361585
1586+ let author = comment.author.clone();
11371587 view! {
11381588 <div class="comment">
1139- <div class="comment-head">
1140- <span class="comment-who">{comment.author.display_name.clone()}</span>
1141- <span class="comment-when">{moment_label(comment.at)}</span>
1589+ <Avatar person=author extra="avatar-lg"/>
1590+ <div class="comment-said">
1591+ <div class="comment-head">
1592+ <span class="comment-who">{comment.author.display_name.clone()}</span>
1593+ <span class="comment-when">{moment_label(comment.at)}</span>
1594+ </div>
1595+ <div class="comment-body">{comment.body.clone()}</div>
11421596 </div>
1143- <div class="comment-body">{comment.body.clone()}</div>
11441597 </div>
11451598 }
11461599 }
style/main.scssmodified+472 -139
@@ -548,6 +548,24 @@ a {
548548 background: transparent;
549549 }
550550
551+ // The modal asks for two other sizes: 18px inside an assignee chip, 28px
552+ // beside a comment. The border is the board's overlap trick and has no job
553+ // on a lone avatar, so these drop it.
554+ &-sm {
555+ width: 18px;
556+ height: 18px;
557+ border: none;
558+ font-size: 8px;
559+ }
560+
561+ &-lg {
562+ width: 28px;
563+ height: 28px;
564+ border: none;
565+ font-size: 11px;
566+ flex: none;
567+ }
568+
551569 &-tone-0 { background: #46557b; }
552570 &-tone-1 { background: #7b6846; }
553571 &-tone-2 { background: #5c7b46; }
@@ -636,7 +654,15 @@ a {
636654 cursor: pointer;
637655 }
638656
657+
639658 // -- the task detail modal --------------------------------------------------
659+//
660+// The modal is a view. Every region that can be changed is a `<form>` wearing
661+// the view's clothes: the read-only shape is a `<label>`, the form beneath it
662+// is hidden until a visually-hidden checkbox is checked, and the checkbox is
663+// checked by clicking that label. Cancel is a second label pointing at the
664+// same checkbox, so entering and leaving the edit state both work with wasm
665+// blocked. Nothing else on the screen changes when one region opens.
640666
641667 .modal-scrim {
642668 position: fixed;
@@ -657,7 +683,7 @@ a {
657683 border: 1px solid var(--border);
658684 border-radius: 12px;
659685 box-shadow: 0 12px 40px rgba(28, 27, 24, 0.18);
660- padding: 20px 24px 16px;
686+ padding: 4px 0 0;
661687 outline: none;
662688 }
663689
@@ -665,18 +691,171 @@ a {
665691
666692 .modal-note,
667693 .modal-problem {
668- margin: 8px 0 0;
694+ margin: 8px 24px 0;
669695 font-size: 13px;
670696 color: #a04a24;
671697 }
672698
673-.detail-head {
699+// -- the edit state ---------------------------------------------------------
700+
701+.edit { position: relative; }
702+
703+// Focusable but invisible: it is the state, and a keyboard must be able to
704+// reach it. Not `display: none` — that would take it out of the tab order.
705+.edit-toggle {
706+ position: absolute;
707+ width: 1px;
708+ height: 1px;
709+ margin: 0;
710+ padding: 0;
711+ opacity: 0;
712+ pointer-events: none;
713+}
714+
715+.edit-hit { cursor: text; }
716+
717+.edit-form { display: none; }
718+
719+.edit:not(.edit-pop) > .edit-toggle:checked ~ .edit-view { display: none; }
720+.edit-toggle:checked ~ .edit-form { display: block; }
721+.edit-toggle:checked ~ .title-form { display: flex; }
722+.edit-toggle:focus-visible ~ .edit-view {
723+ outline: 2px solid var(--accent, #46557b);
724+ outline-offset: 2px;
725+ border-radius: 4px;
726+}
727+
728+.edit-row {
729+ display: flex;
730+ align-items: center;
731+ gap: 8px;
732+ margin-top: 8px;
733+}
734+
735+.edit-save {
736+ height: 28px;
737+ padding: 0 12px;
738+ border: none;
739+ border-radius: var(--radius);
740+ background: var(--ink);
741+ color: #fffefb;
742+ font-family: inherit;
743+ font-size: 12px;
744+ cursor: pointer;
745+
746+ &:disabled { opacity: 0.5; cursor: default; }
747+}
748+
749+.edit-cancel {
750+ font-size: 12px;
751+ color: var(--muted);
752+ cursor: pointer;
753+}
754+
755+// A popover is the same machinery, floated.
756+.edit-pop {
757+ .edit-form {
758+ position: absolute;
759+ top: calc(100% + 6px);
760+ left: 0;
761+ z-index: 4;
762+ }
763+}
764+
765+.pop-panel {
766+ min-width: 200px;
767+ padding: 8px;
768+ background: var(--surface);
769+ border: 1px solid var(--border-strong);
770+ border-radius: 8px;
771+ box-shadow: 0 8px 24px rgba(28, 27, 24, 0.14);
772+}
773+
774+.pop-panel-wide { min-width: 320px; }
775+
776+.pop-list {
777+ display: flex;
778+ flex-direction: column;
779+ gap: 2px;
780+}
781+
782+.pop-list-scroll {
783+ max-height: 220px;
784+ overflow-y: auto;
785+}
786+
787+.pop-row-form { display: block; }
788+
789+.pop-row {
674790 display: flex;
675791 align-items: center;
792+ gap: 8px;
793+ width: 100%;
794+ padding: 5px 6px;
795+ border: none;
796+ border-radius: 5px;
797+ background: transparent;
798+ font-family: inherit;
799+ font-size: 12px;
800+ color: var(--ink);
801+ text-align: left;
802+ cursor: pointer;
803+
804+ &:hover { background: #f3f1ea; }
805+}
806+
807+.pop-row-name { font-size: 12px; }
808+
809+
810+.pick-row {
811+ display: flex;
812+ align-items: center;
813+ gap: 8px;
814+ padding: 5px 6px;
815+ border-radius: 5px;
816+ font-size: 12px;
817+ cursor: pointer;
818+
819+ &:hover { background: #f3f1ea; }
820+}
821+
822+.pick-title { color: var(--muted); }
823+
824+.pick-direction {
825+ display: flex;
826+ align-items: center;
827+ gap: 12px;
828+ margin: 8px 0 0;
829+ padding: 8px 6px 0;
830+ border: none;
831+ border-top: 1px solid var(--border);
832+ font-size: 12px;
833+
834+ label {
835+ display: inline-flex;
836+ align-items: center;
837+ gap: 5px;
838+ cursor: pointer;
839+ }
840+}
841+
842+// -- header -----------------------------------------------------------------
843+
844+.detail-head {
845+ display: flex;
846+ align-items: flex-start;
676847 gap: 10px;
848+ padding: 24px 24px 0;
849+}
850+
851+.detail-headline {
852+ flex: 1;
853+ min-width: 0;
677854 }
678855
679856 .detail-key {
857+ display: block;
858+ margin-bottom: 6px;
680859 font-family: var(--font-mono);
681860 font-size: 11px;
682861 color: var(--muted-soft);
@@ -686,9 +865,30 @@ a {
686865 margin: 0;
687866 font-size: 20px;
688867 font-weight: 600;
868+ line-height: 1.3;
869+}
870+
871+.title-form {
872+ align-items: center;
873+ gap: 8px;
874+}
875+
876+.title-input {
877+ flex: 1;
878+ min-width: 0;
879+ height: 32px;
880+ padding: 0 8px;
881+ border: 1px solid var(--border-strong);
882+ border-radius: var(--radius);
883+ background: var(--surface);
884+ font-family: inherit;
885+ font-size: 20px;
886+ font-weight: 600;
887+ color: var(--ink);
689888 }
690889
691890 .detail-esc {
891+ margin-top: 4px;
692892 font-family: var(--font-mono);
693893 font-size: 10px;
694894 color: var(--muted-soft);
@@ -698,54 +898,84 @@ a {
698898 }
699899
700900 .detail-close {
901+ display: inline-flex;
902+ align-items: center;
903+ justify-content: center;
904+ width: 36px;
905+ height: 36px;
701906 border: none;
702- background: none;
907+ border-radius: var(--radius);
908+ background: transparent;
703909 color: var(--muted);
704- font-size: 14px;
705910 cursor: pointer;
706- padding: 2px 4px;
911+
912+ &:hover { background: #f3f1ea; }
707913 }
708914
915+// -- the field row ----------------------------------------------------------
916+
709917 .detail-fields {
710918 display: grid;
711919 grid-template-columns: 1fr 1.5fr 1fr;
712920 gap: 12px;
713- margin-top: 18px;
921+ padding: 20px 24px 0;
922+ margin-top: 2px;
714923 }
715924
716925 .detail-field {
717926 display: flex;
718927 flex-direction: column;
719928 gap: 6px;
929+ min-width: 0;
720930 }
721931
722932 .detail-label {
723933 font-family: var(--font-mono);
724934 font-size: 10px;
725- letter-spacing: 0.08em;
935+ letter-spacing: 0.06em;
726936 color: var(--muted-soft);
727937 }
728938
729-.detail-value {
730- min-height: 36px;
939+.detail-count {
940+ font-family: var(--font-mono);
941+ font-size: 11px;
942+ color: var(--muted-soft);
943+}
944+
945+// Every value in the field row wears the same box, so a `<select>`, a label
946+// and a plain span all line up at 36px.
947+.field-box {
731948 display: flex;
732949 align-items: center;
950+ gap: 8px;
951+ height: 36px;
733952 padding: 0 10px;
734953 background: #faf9f6;
735954 border: 1px solid var(--border-strong);
736955 border-radius: var(--radius);
737956 font-size: 13px;
957+ color: var(--ink);
958+ cursor: pointer;
959+}
960+
961+.field-text {
962+ flex: 1;
963+ min-width: 0;
964+ overflow: hidden;
965+ text-overflow: ellipsis;
966+ white-space: nowrap;
967+}
968+
969+.glyph {
970+ flex: none;
971+ color: var(--muted-soft);
738972 }
739973
740-/* The artboard's STATUS control: a dot, the column name, and the chevron the
741- select draws for itself. It is a form, so it works without script; the
742- submit button beside it is drawn only when script is absent. */
743974 .status-form {
744- position: relative;
745975 display: flex;
746976 align-items: center;
747977 gap: 8px;
748- min-height: 36px;
978+ height: 36px;
749979 padding: 0 10px;
750980 background: #faf9f6;
751981 border: 1px solid var(--border-strong);
@@ -753,48 +983,69 @@ a {
753983 }
754984
755985 .status-dot {
756- width: 7px;
757- height: 7px;
986+ flex: none;
987+ width: 8px;
988+ height: 8px;
758989 border-radius: 50%;
759- background: var(--accent);
760- flex-shrink: 0;
990+ background: var(--muted-soft);
761991 }
762992
763993 .status-dot-done { background: #5c7b46; }
764994
995+// The select carries no chrome of its own: the box around it is the control.
765996 .status-select {
766- flex-grow: 1;
997+ flex: 1;
998+ min-width: 0;
767999 border: none;
768- background: none;
769- font: inherit;
1000+ background: transparent;
1001+ appearance: none;
1002+ font-family: inherit;
7701003 font-size: 13px;
771- color: inherit;
772- padding: 0;
1004+ color: var(--ink);
7731005 cursor: pointer;
774- outline: none;
1006+
1007+ &:focus { outline: none; }
7751008 }
7761009
7771010 .status-go {
1011+ height: 24px;
1012+ padding: 0 8px;
7781013 border: 1px solid var(--border-strong);
7791014 border-radius: 4px;
7801015 background: var(--surface);
1016+ font-family: inherit;
7811017 font-size: 11px;
782- padding: 2px 6px;
1018+ color: var(--muted);
7831019 cursor: pointer;
7841020 }
7851021
7861022 .detail-overdue {
7871023 border-color: #e8c9b8;
7881024 color: #a04a24;
1025+
1026+ .glyph { color: #a04a24; }
1027+}
1028+
1029+.detail-date {
1030+ width: 100%;
1031+ height: 32px;
1032+ padding: 0 8px;
1033+ border: 1px solid var(--border-strong);
1034+ border-radius: var(--radius);
1035+ background: var(--surface);
1036+ font-family: inherit;
1037+ font-size: 13px;
1038+ color: var(--ink);
7891039 }
7901040
1041+// -- assignees --------------------------------------------------------------
1042+
7911043 .detail-assignees {
792- min-height: 36px;
7931044 display: flex;
7941045 align-items: center;
795- flex-wrap: wrap;
7961046 gap: 6px;
797- padding: 4px 6px;
1047+ height: 36px;
1048+ padding: 0 6px;
7981049 background: #faf9f6;
7991050 border: 1px solid var(--border-strong);
8001051 border-radius: var(--radius);
@@ -802,125 +1053,147 @@ a {
8021053
8031054 .assignee-chip {
8041055 display: inline-flex;
1056+ min-width: 0;
8051057 align-items: center;
806- gap: 4px;
807- font-size: 12px;
1058+ gap: 5px;
1059+ white-space: nowrap;
1060+ padding: 3px 6px 3px 3px;
1061+ border-radius: 5px;
8081062 background: var(--surface);
809- border: 1px solid var(--border-strong);
810- border-radius: 11px;
811- padding: 2px 4px 2px 8px;
1063+ border: 1px solid var(--border);
1064+}
1065+
1066+.assignee-name {
1067+ min-width: 0;
1068+ overflow: hidden;
1069+ text-overflow: ellipsis;
1070+ font-size: 12px;
1071+ color: var(--ink);
8121072 }
8131073
8141074 .assignee-drop { display: inline-flex; }
8151075
8161076 .assignee-remove {
1077+ display: inline-flex;
1078+ align-items: center;
1079+ justify-content: center;
1080+ width: 14px;
1081+ height: 14px;
8171082 border: none;
818- background: none;
1083+ background: transparent;
8191084 color: var(--muted-soft);
820- font-size: 10px;
8211085 cursor: pointer;
822- padding: 0 2px;
1086+
1087+ &:hover { color: #a04a24; }
8231088 }
8241089
1090+// The artboard's round dashed "+". It is a label, and the popover it opens
1091+// holds one tiny form per person — a submit button's own name/value does not
1092+// survive `ActionForm`, so each row carries its own hidden field instead.
8251093 .assignee-add {
8261094 display: inline-flex;
827- gap: 4px;
828-}
1095+ align-items: center;
1096+ justify-content: center;
1097+ width: 22px;
1098+ height: 22px;
1099+ border: 1px dashed var(--border-strong);
1100+ border-radius: 50%;
1101+ color: var(--muted-soft);
1102+ cursor: pointer;
8291103
830-.assignee-select,
831-.dep-select {
832- font-family: inherit;
833- font-size: 12px;
834- background: var(--surface);
835- border: 1px solid var(--border-strong);
836- border-radius: 4px;
837- padding: 2px 4px;
838- max-width: 220px;
1104+ &:hover { color: var(--ink); border-color: var(--muted-soft); }
8391105 }
8401106
841-.assignee-assign,
842-.dep-add {
843- font-family: inherit;
844- font-size: 12px;
845- background: var(--surface);
846- border: 1px solid var(--border-strong);
847- border-radius: 4px;
848- padding: 2px 8px;
849- cursor: pointer;
850-}
1107+// The round "+" is the only way to assign anyone, so it never gets crowded off
1108+// the row: the chips give up width first.
1109+.detail-assignees > .edit { flex: none; }
1110+
1111+.assignee-pop .edit-form { left: auto; right: 0; }
1112+
1113+// -- blocks -----------------------------------------------------------------
8511114
852-.detail-form {
1115+.detail-block {
8531116 display: flex;
8541117 flex-direction: column;
855- gap: 6px;
856- margin-top: 20px;
1118+ gap: 10px;
1119+ padding: 22px 24px 0;
8571120 }
8581121
859-.detail-input,
860-.detail-textarea,
861-.comment-input {
862- font-family: inherit;
1122+.detail-block-head {
1123+ display: flex;
1124+ align-items: center;
1125+ gap: 8px;
1126+ margin-bottom: -2px;
1127+}
1128+
1129+.detail-prose {
1130+ display: block;
1131+ margin: 0;
8631132 font-size: 14px;
1133+ line-height: 1.6;
8641134 color: #3d3a34;
865- background: var(--surface);
1135+ white-space: pre-wrap;
1136+}
1137+
1138+.detail-prose-empty { color: var(--muted-soft); }
1139+
1140+.detail-quiet {
1141+ margin: 0;
1142+ font-size: 13px;
1143+ color: var(--muted-soft);
1144+}
1145+
1146+.detail-textarea,
1147+.comment-input {
1148+ width: 100%;
1149+ padding: 8px 10px;
8661150 border: 1px solid var(--border-strong);
8671151 border-radius: var(--radius);
868- padding: 8px 10px;
1152+ background: var(--surface);
1153+ font-family: inherit;
1154+ font-size: 14px;
1155+ line-height: 1.6;
1156+ color: var(--ink);
8691157 resize: vertical;
8701158 }
8711159
872-.detail-textarea { line-height: 1.6; }
873-
874-.detail-date { width: 160px; }
8751160
876-.detail-form-row {
877- display: flex;
878- justify-content: flex-end;
879-}
1161+// -- dependencies -----------------------------------------------------------
8801162
881-.detail-save,
882-.comment-post {
883- font-family: inherit;
884- font-size: 13px;
885- color: #fffefb;
886- background: var(--accent);
887- border: 1px solid var(--accent);
888- border-radius: var(--radius);
889- padding: 6px 14px;
1163+.dep-chip {
1164+ display: inline-flex;
1165+ align-items: center;
1166+ gap: 5px;
1167+ height: 26px;
1168+ padding: 0 9px;
1169+ border: 1px solid var(--border-strong);
1170+ border-radius: 5px;
1171+ background: var(--surface);
1172+ font-size: 12px;
1173+ color: var(--muted);
8901174 cursor: pointer;
8911175
892- &:disabled { opacity: 0.6; cursor: default; }
1176+ &:hover { color: var(--ink); }
8931177 }
8941178
895-.detail-section {
896- display: flex;
897- flex-direction: column;
898- gap: 8px;
899- margin-top: 22px;
900-}
1179+.dep-chip-text { font-size: 12px; }
1180+
1181+.link-pop .edit-form { left: auto; right: 0; }
9011182
902-.dep-group {
1183+.dep-list {
9031184 display: flex;
9041185 flex-direction: column;
9051186 gap: 6px;
9061187 }
9071188
908-.dep-heading {
909- font-family: var(--font-mono);
910- font-size: 10px;
911- letter-spacing: 0.06em;
912- color: var(--muted-soft);
913-}
914-
9151189 .dep-row {
9161190 display: flex;
9171191 align-items: center;
918- gap: 8px;
919- min-height: 34px;
920- padding: 0 10px;
1192+ gap: 10px;
1193+ padding: 10px 12px;
1194+ border: 1px solid var(--border);
1195+ border-radius: 7px;
9211196 background: #faf9f6;
922- border: 1px solid var(--border-strong);
923- border-radius: var(--radius);
9241197 font-size: 13px;
9251198 }
9261199
@@ -928,42 +1201,76 @@ a {
9281201 background: #fdfaf1;
9291202 border-color: #e6d7ae;
9301203
931- .dep-note { color: #7a5c1e; }
1204+ .dep-tag,
1205+ .dep-note,
1206+ .glyph { color: #7a5c1e; }
1207+}
1208+
1209+.dep-tag {
1210+ flex: none;
1211+ width: 78px;
1212+ font-family: var(--font-mono);
1213+ font-size: 10px;
1214+ letter-spacing: 0.06em;
1215+ color: var(--muted-soft);
9321216 }
9331217
9341218 .dep-tick { color: #5c7b46; }
9351219
9361220 .dep-key {
1221+ flex: none;
9371222 font-family: var(--font-mono);
9381223 font-size: 11px;
9391224 color: var(--muted-soft);
9401225 }
9411226
1227+.dep-title {
1228+ min-width: 0;
1229+ overflow: hidden;
1230+ text-overflow: ellipsis;
1231+ white-space: nowrap;
1232+}
1233+
9421234 .dep-note {
943- font-size: 12px;
944- color: var(--muted);
1235+ flex: none;
1236+ font-size: 11px;
1237+ color: var(--muted-soft);
9451238 }
9461239
9471240 .dep-unlink-form { display: inline-flex; }
9481241
9491242 .dep-unlink {
1243+ display: inline-flex;
1244+ align-items: center;
1245+ justify-content: center;
1246+ width: 24px;
1247+ height: 24px;
9501248 border: none;
951- background: none;
1249+ border-radius: 4px;
1250+ background: transparent;
9521251 color: var(--muted-soft);
953- font-size: 11px;
9541252 cursor: pointer;
1253+
1254+ &:hover { color: #a04a24; }
9551255 }
9561256
957-.dep-link {
1257+// -- comments ---------------------------------------------------------------
1258+
1259+.comment-list {
9581260 display: flex;
959- align-items: center;
960- gap: 6px;
1261+ flex-direction: column;
1262+ gap: 14px;
9611263 }
9621264
9631265 .comment {
9641266 display: flex;
965- flex-direction: column;
966- gap: 3px;
1267+ align-items: flex-start;
1268+ gap: 10px;
1269+}
1270+
1271+.comment-said {
1272+ min-width: 0;
1273+ flex: 1;
9671274 }
9681275
9691276 .comment-head {
@@ -975,6 +1282,7 @@ a {
9751282 .comment-who {
9761283 font-size: 13px;
9771284 font-weight: 600;
1285+ color: var(--ink);
9781286 }
9791287
9801288 .comment-when {
@@ -984,6 +1292,7 @@ a {
9841292 }
9851293
9861294 .comment-body {
1295+ margin-top: 3px;
9871296 font-size: 13px;
9881297 line-height: 1.55;
9891298 color: #3d3a34;
@@ -993,10 +1302,12 @@ a {
9931302 .comment-composer {
9941303 display: flex;
9951304 flex-direction: column;
996- gap: 6px;
997- margin-top: 4px;
1305+ gap: 8px;
1306+ margin-top: 2px;
9981307 }
9991308
1309+.comment-input { font-size: 13px; }
1310+
10001311 .comment-row {
10011312 display: flex;
10021313 align-items: center;
@@ -1005,22 +1316,36 @@ a {
10051316
10061317 .comment-hint {
10071318 font-family: var(--font-mono);
1008- font-size: 10px;
1319+ font-size: 11px;
10091320 color: var(--muted-soft);
1010- border: 1px solid var(--border-strong);
1011- border-radius: 4px;
1012- padding: 1px 5px;
10131321 }
10141322
1323+.comment-post {
1324+ height: 30px;
1325+ padding: 0 14px;
1326+ border: none;
1327+ border-radius: var(--radius);
1328+ background: var(--ink);
1329+ color: #fffefb;
1330+ font-family: inherit;
1331+ font-size: 12px;
1332+ cursor: pointer;
1333+
1334+ &:disabled { opacity: 0.5; cursor: default; }
1335+}
1336+
1337+// -- activity ---------------------------------------------------------------
1338+
10151339 .activity-line {
10161340 display: flex;
10171341 align-items: baseline;
1018- gap: 8px;
1342+ gap: 10px;
10191343 font-size: 12px;
10201344 color: var(--muted);
10211345 }
10221346
10231347 .activity-stamp {
1348+ flex: none;
10241349 font-family: var(--font-mono);
10251350 font-size: 11px;
10261351 color: var(--muted-soft);
@@ -1028,58 +1353,67 @@ a {
10281353
10291354 .activity-who { color: var(--ink); }
10301355
1356+// -- footer -----------------------------------------------------------------
1357+
10311358 .detail-foot {
10321359 display: flex;
10331360 align-items: center;
10341361 gap: 8px;
1035- margin-top: 22px;
1036- padding-top: 14px;
1037- border-top: 1px solid var(--border);
1362+ padding: 22px 24px 24px;
1363+ margin-top: 4px;
10381364 }
10391365
10401366 .detail-delete-form { display: inline-flex; }
10411367
10421368 .detail-delete {
1369+ display: inline-flex;
1370+ align-items: center;
1371+ gap: 6px;
1372+ height: 36px;
1373+ padding: 0 14px;
1374+ border: 1px solid #e8c9b8;
1375+ border-radius: var(--radius);
1376+ background: var(--surface);
10431377 font-family: inherit;
10441378 font-size: 13px;
10451379 color: #a04a24;
1046- background: none;
1047- border: 1px solid #e8c9b8;
1048- border-radius: var(--radius);
1049- padding: 6px 12px;
10501380 cursor: pointer;
1381+
1382+ &:disabled { opacity: 0.5; cursor: default; }
10511383 }
10521384
10531385 .detail-cancel {
1386+ height: 36px;
1387+ padding: 0 16px;
1388+ border: 1px solid var(--border-strong);
1389+ border-radius: var(--radius);
1390+ background: var(--surface);
10541391 font-family: inherit;
10551392 font-size: 13px;
10561393 color: var(--muted);
1057- background: var(--surface);
1058- border: 1px solid var(--border-strong);
1059- border-radius: var(--radius);
1060- padding: 6px 12px;
10611394 cursor: pointer;
10621395 }
10631396
1397+// -- the delete confirmation ------------------------------------------------
1398+
10641399 .confirm {
1065- margin-top: 18px;
1400+ margin: 16px 24px 0;
10661401 padding: 14px 16px;
1067- background: #fdf6f2;
10681402 border: 1px solid #e8c9b8;
1069- border-radius: var(--radius);
1403+ border-radius: 8px;
1404+ background: #fdf6f2;
10701405 }
10711406
10721407 .confirm-title {
10731408 font-size: 14px;
10741409 font-weight: 600;
1075- color: #a04a24;
1410+ color: var(--ink);
10761411 }
10771412
10781413 .confirm-list {
10791414 margin: 8px 0 0;
10801415 padding-left: 18px;
10811416 font-size: 13px;
1082- line-height: 1.6;
10831417 color: #3d3a34;
10841418 }
10851419
@@ -1092,13 +1426,12 @@ a {
10921426 .confirm-row {
10931427 display: flex;
10941428 align-items: center;
1095- justify-content: flex-end;
10961429 gap: 8px;
10971430 margin-top: 12px;
10981431 }
10991432
11001433 .detail-delete-sure {
1101- color: #fffefb;
1102- background: #a04a24;
11031434 border-color: #a04a24;
1435+ background: #a04a24;
1436+ color: #fffefb;
11041437 }