forge
Explore
Log in

Don't you dare go Hollow

Clock time: two boxes, hour and minute, inside the deadline popover

Browse files at this commit

88fee1e27bff791f53a06da1c12934c511bf6b46Ahmet Kaan GümüşParent: 264fcca
The searchable dropdown carried 288 rows for what is two small numbers.
It is now a datepick-time row in the same panel: an hour box, a colon,
a minute box — numeric, maxlength 2, prefilled from the task's clock in
the viewer's zone, committed by a day press like the rest of the form.
ClockHour/ClockMinute name the boxes for a screen reader; Clear blanks
both. compose_clock keeps moment_field and parse_hhmm as the one
validators (absent pair keeps, empty pair clears, a lone box refuses).

run.sh bundles assets through the topcoat CLI before starting the
server: a plain cargo build leaves the previous content-hash bundle in
target/<profile>/assets, and every check would pass against the last
build's css.
crates/izlek-web/src/board.rsmodified+12 -4
@@ -81,7 +81,8 @@ async fn create_task_shared(
8181 column_id: &str,
8282 description: &str,
8383 deadline_raw: &str,
84- time_raw: &str,
84+ clock_hour: Option<&str>,
85+ clock_minute: Option<&str>,
8586 ) -> Result<Option<Refusal>> {
8687
8788 let user = match require_writer(cx).await {
@@ -93,10 +94,14 @@ async fn create_task_shared(
9394 return Ok(Some(Refusal::EmptyTitle));
9495 }
9596 let zone = izlek_core::detail::parse_zone(&user.timezone);
97+ let time = match crate::detail::combine_clock(clock_hour, clock_minute) {
98+ Ok(time) => time,
99+ Err(refusal) => return Ok(Some(refusal)),
100+ };
96101 let (deadline, clock_at) = match crate::detail::moment_field(
97102 Some(deadline_raw),
98103 (None, None),
99- Some(time_raw),
104+ time.as_deref(),
100105 zone,
101106 ) {
102107 Ok(pair) => pair,
@@ -161,7 +166,9 @@ struct CreateTaskForm {
161166 #[serde(default)]
162167 deadline: String,
163168 #[serde(default)]
164- clock_time: String,
169+ clock_hour: Option<String>,
170+ #[serde(default)]
171+ clock_minute: Option<String>,
165172 }
166173
167174 /// A browser without script's way onto the board: a real form post, same
@@ -174,7 +181,8 @@ async fn create_task(cx: &Cx, Form(input): Form<CreateTaskForm>) -> Redirect {
174181 &input.column_id,
175182 &input.description,
176183 &input.deadline,
177- &input.clock_time,
184+ input.clock_hour.as_deref(),
185+ input.clock_minute.as_deref(),
178186 )
179187 .await?
180188 {
crates/izlek-web/src/detail.rsmodified+42 -35
@@ -236,7 +236,9 @@ struct SaveTaskForm {
236236 #[serde(default)]
237237 deadline: Option<String>,
238238 #[serde(default)]
239- clock_time: Option<String>,
239+ clock_hour: Option<String>,
240+ #[serde(default)]
241+ clock_minute: Option<String>,
240242 }
241243
242244 #[derive(Deserialize)]
@@ -542,11 +544,23 @@ fn parse_hhmm(raw: &str) -> Option<(u8, u8)> {
542544 (hour <= 23 && minute <= 59).then_some((hour, minute))
543545 }
544546
545-/// The moment field's menu words: every five minutes of the day,
546-/// zero-padded, the value and the label the same word — the logs filters'
547-/// shape, at 288 options a `data-search` box is what makes it usable.
548-fn clock_steps() -> impl Iterator<Item = String> {
549- (0..24 * 12).map(|step| format!("{:02}:{:02}", step / 12, (step % 12) * 5))
547+/// The posted hour and minute words as one `HH:MM` for [`moment_field`],
548+/// which stays the one validator of the shape. Both absent: the form said
549+/// nothing about the time. Both empty: the popover's Clear, clearing the
550+/// clock. Both set: the moment, however the hands typed it. One without
551+/// the other is a form gone wrong, not something to guess past.
552+pub(crate) fn combine_clock(
553+ hour: Option<&str>,
554+ minute: Option<&str>,
555+) -> std::result::Result<Option<String>, Refusal> {
556+ match (hour, minute) {
557+ (None, None) => Ok(None),
558+ (Some(""), Some("")) => Ok(Some(String::new())),
559+ (Some(hour), Some(minute)) => {
560+ Ok(Some(format!("{}:{}", hour.trim(), minute.trim())))
561+ }
562+ _ => Err(Refusal::BadClock),
563+ }
550564 }
551565
552566 /// Saves the title, the description and the moment field — the deadline day
@@ -576,10 +590,14 @@ async fn save_task(cx: &Cx, Form(input): Form<SaveTaskForm>) -> Redirect {
576590 None => facts.description.clone(),
577591 };
578592 let zone = parse_zone(&user.timezone);
593+ let time = match combine_clock(input.clock_hour.as_deref(), input.clock_minute.as_deref()) {
594+ Ok(time) => time,
595+ Err(refusal) => return redirect(cx, Some(refusal)),
596+ };
579597 let (deadline, clock_at) = match moment_field(
580598 input.deadline.as_deref(),
581599 (facts.row.deadline, facts.row.clock_at),
582- input.clock_time.as_deref(),
600+ time.as_deref(),
583601 zone,
584602 ) {
585603 Ok(pair) => pair,
@@ -1274,7 +1292,7 @@ async fn deadline_control(
12741292 may_write: bool,
12751293 lang: Lang,
12761294 ) -> Result {
1277- use time::macros::format_description;
1295+
12781296
12791297 let overdue = task.is_overdue(today);
12801298 let local = task.clock_at.map(|at| at.to_offset(zone));
@@ -1312,17 +1330,12 @@ async fn deadline_control(
13121330 }
13131331 let toggle = format!("deadline-{}", task.id);
13141332 let input_value = task.deadline_input();
1315- let time_selected = local
1316- .map(|at| at.format(&format_description!("[hour]:[minute]")))
1317- .transpose()
1333+ let hour_value = local
1334+ .map(|at| format!("{:02}", at.hour()))
1335+ .unwrap_or_default();
1336+ let minute_value = local
1337+ .map(|at| format!("{:02}", at.minute()))
13181338 .unwrap_or_default();
1319- let steps: Vec<String> = clock_steps().collect();
1320- // A clock off the five-minute grid is still the truth that is stored:
1321- // its exact option is appended, never rounded onto a step.
1322- let time_exact = time_selected
1323- .as_ref()
1324- .filter(|value| !steps.iter().any(|step| step == *value))
1325- .cloned();
13261339 let change_aria = t(lang, Key::ChangeTheDeadline);
13271340 let no_deadline = t(lang, Key::NoDeadline);
13281341 view! {
@@ -1338,15 +1351,11 @@ async fn deadline_control(
13381351 <form class="pop-form" method="post" action="/api/save_task">
13391352 <input type="hidden" name="task_id" value=(task.id.clone())>
13401353 (datepicker_grid(cx, "deadline", &input_value, true, lang).await?)
1341- <select class="field-input" name="clock_time" aria-label=(t(lang, Key::ClockTime)) data-autosubmit="" data-search="">
1342- <option value="">("--")</option>
1343- for time in &steps {
1344- <option value=(time) selected=(time_selected.as_deref() == Some(time.as_str()))>(time)</option>
1345- }
1346- if let Some(value) = &time_exact {
1347- <option value=(value) selected=(true)>(value)</option>
1348- }
1349- </select>
1354+ <div class="datepick-time">
1355+ <input class="field-input" name="clock_hour" type="text" inputmode="numeric" maxlength="2" placeholder="HH" aria-label=(t(lang, Key::ClockHour)) value=(hour_value)>
1356+ <span class="datepick-colon">(":")</span>
1357+ <input class="field-input" name="clock_minute" type="text" inputmode="numeric" maxlength="2" placeholder="MM" aria-label=(t(lang, Key::ClockMinute)) value=(minute_value)>
1358+ </div>
13501359 </form>
13511360 (refused(cx, "save_task", lang).await?)
13521361 </div>
@@ -1432,7 +1441,7 @@ pub(crate) async fn datepicker_script(cx: &Cx, lang: Lang) -> Result {
14321441 var input = panel.querySelector('.datepick-input');\
14331442 if (!input) {{ return; }}\
14341443 input.value = ymd ? (ymd.y + '-' + pad(ymd.m) + '-' + pad(ymd.d)) : '';\
1435- if (!ymd) {{ var clock = panel.querySelector('[name=clock_time]'); if (clock) {{ clock.value = ''; }} }}\
1444+ if (!ymd) {{ var hh = panel.querySelector('[name=clock_hour]'); if (hh) {{ hh.value = ''; }} var mm = panel.querySelector('[name=clock_minute]'); if (mm) {{ mm.value = ''; }} }}\
14361445 var pop = panel.closest('.datepick-pop');\
14371446 var label = pop.querySelector('.datepick-label');\
14381447 if (label) {{ label.textContent = ymd ? (MONTHS[ymd.m - 1].slice(0, 3) + ' ' + pad(ymd.d)) : label.dataset.empty; }}\
@@ -2570,7 +2579,6 @@ async fn sheet_view(
25702579 /// as [`task_modal`], with a form posting straight to `/api/create_task`.
25712580 /// Wired off the board top bar's "New task" button as `/?new=1`.
25722581 pub async fn new_task_modal(cx: &Cx, columns: &[(String, String)], lang: Lang) -> Result {
2573- let steps: Vec<String> = clock_steps().collect();
25742582 view! {
25752583 cx =>
25762584 <div class="modal-scrim">
@@ -2607,12 +2615,11 @@ pub async fn new_task_modal(cx: &Cx, columns: &[(String, String)], lang: Lang) -
26072615 </label>
26082616 <div class="edit-form pop-panel datepick-panel">
26092617 (datepicker_grid(cx, "deadline", "", false, lang).await?)
2610- <select class="field-input" name="clock_time" aria-label=(t(lang, Key::ClockTime)) data-search="">
2611- <option value="">("--")</option>
2612- for time in &steps {
2613- <option value=(time)>(time)</option>
2614- }
2615- </select>
2618+ <div class="datepick-time">
2619+ <input class="field-input" name="clock_hour" type="text" inputmode="numeric" maxlength="2" placeholder="HH" aria-label=(t(lang, Key::ClockHour))>
2620+ <span class="datepick-colon">(":")</span>
2621+ <input class="field-input" name="clock_minute" type="text" inputmode="numeric" maxlength="2" placeholder="MM" aria-label=(t(lang, Key::ClockMinute))>
2622+ </div>
26162623 </div>
26172624 </div>
26182625 </div>
crates/izlek-web/src/i18n.rsmodified+6 -3
@@ -358,7 +358,8 @@ pub enum Key {
358358 InvitedByLabel,
359359 MailBatchLabel,
360360 ReminderMinutesLabel,
361- ClockTime,
361+ ClockHour,
362+ ClockMinute,
362363 }
363364
364365 /// The lone templated phrase — a name in the middle reads worse as two
@@ -1019,8 +1020,10 @@ pub fn t(lang: Lang, key: Key) -> &'static str {
10191020 (MailBatchLabel, Tr) => "Posta gecikmesi (dakika)",
10201021 (ReminderMinutesLabel, En) => "Reminder (minutes)",
10211022 (ReminderMinutesLabel, Tr) => "Hatırlatma (dakika)",
1022- (ClockTime, En) => "Time",
1023- (ClockTime, Tr) => "Saat",
1023+ (ClockHour, En) => "Hour",
1024+ (ClockHour, Tr) => "Saat",
1025+ (ClockMinute, En) => "Minute",
1026+ (ClockMinute, Tr) => "Dakika",
10241027 }
10251028 }
10261029
crates/izlek-web/tests/browser/moment.mjsmodified+6 -29
@@ -99,34 +99,11 @@ const chipLabel = `${MONTHS[picked.month - 1]} ${pad(picked.day)} · 16:20`;
9999 const fieldLabel = `${MONTHS[picked.month - 1]} ${pad(picked.day)} 16:20`;
100100
101101
102-// The time rides the same panel as a house dropdown: the select is
103-// enhanced into a trigger and a panel, so a hand on it clicks the trigger,
104-// types to filter, and presses the row — which also exercises the search
105-// box the data-search attribute buys. The dd pick writes the select's
106-// value; the modal select carries no data-autosubmit, so nothing posts
107-// until the form's own button.
108-await page.click(
109- '.modal-new-task select[name="clock_time"] >> xpath=preceding-sibling::button[1]',
110-);
111-const menu = page.locator('.dd-panel.dd-open');
112-await menu.locator('.dd-search').fill('16:');
113-const filtered = await menu.locator('.dd-search').evaluate((el) => {
114- const panel = el.closest('.dd-panel');
115- const row = panel.querySelector('.dd-option[data-value="16:20"]');
116- return {
117- search: el.value,
118- rows: panel.querySelectorAll('.dd-option').length,
119- hidden: panel.querySelectorAll('.dd-option-hidden').length,
120- rowOn: !!row && !row.classList.contains('dd-option-hidden'),
121- };
122-});
123-if (filtered.search !== '16:') failures.push(`the search box read '${filtered.search}'`);
124-if (filtered.rows !== 289) failures.push(`the menu holds ${filtered.rows} rows, not 289`);
125-if (!filtered.rowOn) failures.push("typing '16:' did not leave the 16:20 row on the menu");
126-// Press the row through its own handler. The panel's scroll-close race can
127-// make a point-and-click flake here; the handler is the house code either
128-// way, and the value it writes is asserted below.
129-await menu.locator('.dd-option[data-value="16:20"]').evaluate((el) => el.click());
102+// The time rides the same panel as two two-digit boxes — hour, colon,
103+// minute — typed before the day press, so the one form post carries both.
104+// Neither box autosubmits: a lone box is half a value.
105+await page.fill('.modal-new-task input[name="clock_hour"]', '16');
106+await page.fill('.modal-new-task input[name="clock_minute"]', '20');
130107
131108 // Then the day press, whose pick() writes the hidden input in place — in
132109 // the modal nothing autosubmits, so the value is read in the same tick as
@@ -145,7 +122,7 @@ if (!/^\d{4}-\d{2}-\d{2}$/.test(written.after)) {
145122 failures.push(`the day pick never wrote the hidden input: '${written.after}'`);
146123 }
147124 const atSubmit = await page.evaluate(() => ({
148- time: document.querySelector('.modal-new-task select[name="clock_time"]')?.value,
125+ time: `${document.querySelector('.modal-new-task input[name="clock_hour"]')?.value}:${document.querySelector('.modal-new-task input[name="clock_minute"]')?.value}`,
149126 day: document.querySelector('.modal-new-task .datepick-input')?.value,
150127 }));
151128 if (atSubmit.time !== '16:20') failures.push(`the time box read '${atSubmit.time}' at submit`);
crates/izlek-web/tests/browser/run.shmodified+5 -1
@@ -39,7 +39,11 @@ if [[ ! -f $IZLEK_PLAYWRIGHT ]]; then
3939 (cd "$home" && npx playwright install --only-shell chromium)
4040 fi
4141
42-cargo build --manifest-path "$repo/Cargo.toml" -p izlek-web
42+# The bundler runs the build itself and rewrites the content-hash files in
43+# target/<profile>/assets. A plain `cargo build` leaves the previous bundle
44+# in place, and the server would serve the old css from it — a css change
45+# would pass every check here while the page shows the last build.
46+(cd "$repo" && topcoat asset bundle -p izlek-web)
4347
4448 mkdir -p "$work/config"
4549 printf 'database = "izlek.db"\nlisten = "127.0.0.1:%s"\n' "$port" > "$work/config/izlek.toml"
crates/izlek-web/tests/http.rsmodified+55 -19
@@ -8268,7 +8268,8 @@ async fn a_clock_saved_on_a_task_renders_in_the_viewers_stored_timezone() {
82688268 &[
82698269 ("task_id", &task),
82708270 ("deadline", "2026-09-02"),
8271- ("clock_time", "11:00"),
8271+ ("clock_hour", "11"),
8272+ ("clock_minute", "00"),
82728273 ],
82738274 )
82748275 .await;
@@ -8289,7 +8290,8 @@ async fn a_clock_saved_on_a_task_renders_in_the_viewers_stored_timezone() {
82898290 .await;
82908291 let html = String::from_utf8_lossy(&page.bytes);
82918292 assert!(
8292- html.contains(r#"<option value="11:00" selected="">11:00</option>"#),
8293+ html.contains(r#"aria-label="Hour" value="11""#)
8294+ && html.contains(r#"aria-label="Minute" value="00""#),
82938295 "{html}"
82948296 );
82958297 assert!(html.contains(">Sep 02 11:00<"), "{html}");
@@ -8318,7 +8320,8 @@ async fn a_clock_saved_on_a_task_renders_in_the_viewers_stored_timezone() {
83188320 .await;
83198321 let html = String::from_utf8_lossy(&shifted.bytes);
83208322 assert!(
8321- html.contains(r#"<option value="14:00" selected="">14:00</option>"#),
8323+ html.contains(r#"aria-label="Hour" value="14""#)
8324+ && html.contains(r#"aria-label="Minute" value="00""#),
83228325 "{html}"
83238326 );
83248327 assert!(html.contains(">Sep 02 14:00<"), "{html}");
@@ -8337,7 +8340,8 @@ async fn an_empty_time_clears_the_clock_and_a_clear_clears_both() {
83378340 &[
83388341 ("task_id", &task),
83398342 ("deadline", "2026-09-02"),
8340- ("clock_time", "11:00"),
8343+ ("clock_hour", "11"),
8344+ ("clock_minute", "00"),
83418345 ],
83428346 )
83438347 .await;
@@ -8385,7 +8389,7 @@ async fn an_empty_time_clears_the_clock_and_a_clear_clears_both() {
83858389 .post(
83868390 "/api/save_task",
83878391 Some(&admin_cookie),
8388- &[("task_id", &task), ("clock_time", "")],
8392+ &[("task_id", &task), ("clock_hour", ""), ("clock_minute", "")],
83898393 )
83908394 .await;
83918395 assert!(
@@ -8410,13 +8414,16 @@ async fn an_empty_time_clears_the_clock_and_a_clear_clears_both() {
84108414 let html = String::from_utf8_lossy(&page.bytes);
84118415 assert!(html.contains(">Sep 02<"), "{html}");
84128416 // An empty time renders as no selected step at all — the bare "--".
8413- assert!(html.contains(r#"name="clock_time""#), "{html}");
8417+ assert!(
8418+ html.contains(r#"name="clock_hour""#) && html.contains(r#"name="clock_minute""#),
8419+ "{html}"
8420+ );
84148421 assert!(!html.contains(">Sep 02 11:00<"), "{html}");
84158422 let saved = app
84168423 .post(
84178424 "/api/save_task",
84188425 Some(&admin_cookie),
8419- &[("task_id", &task), ("deadline", ""), ("clock_time", "")],
8426+ &[("task_id", &task), ("deadline", ""), ("clock_hour", ""), ("clock_minute", "")],
84208427 )
84218428 .await;
84228429 assert!(
@@ -8454,7 +8461,8 @@ async fn a_title_edit_keeps_the_clock() {
84548461 &[
84558462 ("task_id", &task),
84568463 ("deadline", "2026-09-02"),
8457- ("clock_time", "11:00"),
8464+ ("clock_hour", "11"),
8465+ ("clock_minute", "00"),
84588466 ],
84598467 )
84608468 .await;
@@ -8511,7 +8519,8 @@ async fn a_description_edit_keeps_the_clock() {
85118519 &[
85128520 ("task_id", &task),
85138521 ("deadline", "2026-09-02"),
8514- ("clock_time", "11:00"),
8522+ ("clock_hour", "11"),
8523+ ("clock_minute", "00"),
85158524 ],
85168525 )
85178526 .await;
@@ -8570,7 +8579,7 @@ async fn a_time_that_cannot_be_used_is_refused_and_saves_nothing() {
85708579 ("task_id", task.as_str()),
85718580 ("title", "Renamed"),
85728581 ("deadline", "2026-09-02"),
8573- ("clock_time", "not-a-time"),
8582+ ("clock_hour", "not-a-time"),
85748583 ],
85758584 )
85768585 .await;
@@ -8602,7 +8611,11 @@ async fn a_time_that_cannot_be_used_is_refused_and_saves_nothing() {
86028611 "/api/save_task",
86038612 Some(&admin_cookie),
86048613 &format!("/?task={orphan}"),
8605- &[("task_id", orphan.as_str()), ("clock_time", "16:20")],
8614+ &[
8615+ ("task_id", orphan.as_str()),
8616+ ("clock_hour", "16"),
8617+ ("clock_minute", "20"),
8618+ ],
86068619 )
86078620 .await;
86088621 let location = answer.location.as_deref().unwrap_or_default();
@@ -8612,8 +8625,27 @@ async fn a_time_that_cannot_be_used_is_refused_and_saves_nothing() {
86128625 );
86138626 let facts = app.store.task(&orphan).await.unwrap().expect("task gone");
86148627 assert!(facts.row.clock_at.is_none(), "a dayless time was stored");
8628+ // And the mirror mistake: a minute with no hour is the same half of
8629+ // nothing.
8630+ let orphan2 = a_task(&app, &admin_cookie, &column, "Orphan Too").await;
8631+ let answer = app
8632+ .post_without_script(
8633+ "/api/save_task",
8634+ Some(&admin_cookie),
8635+ &format!("/?task={orphan2}"),
8636+ &[("task_id", orphan2.as_str()), ("clock_minute", "45")],
8637+ )
8638+ .await;
8639+ let location = answer.location.as_deref().unwrap_or_default();
8640+ assert!(
8641+ location.contains("refusal=bad-clock&on=save_task"),
8642+ "{location}"
8643+ );
8644+ let facts = app.store.task(&orphan2).await.unwrap().expect("task gone");
8645+ assert!(facts.row.clock_at.is_none(), "a lone minute was stored");
86158646 }
86168647
8648+
86178649 #[tokio::test]
86188650 async fn a_card_wears_the_clock_chip_in_the_viewers_zone_instead_of_the_deadline() {
86198651 let app = App::open().await;
@@ -8647,7 +8679,8 @@ async fn a_card_wears_the_clock_chip_in_the_viewers_zone_instead_of_the_deadline
86478679 ("title", "Kickoff"),
86488680 ("column_id", &column),
86498681 ("deadline", "2026-09-02"),
8650- ("clock_time", "14:00"),
8682+ ("clock_hour", "14"),
8683+ ("clock_minute", "00"),
86518684 ],
86528685 )
86538686 .await;
@@ -8704,7 +8737,7 @@ async fn a_time_set_on_an_existing_day_writes_both_columns() {
87048737 .post(
87058738 "/api/save_task",
87068739 Some(&admin_cookie),
8707- &[("task_id", &task), ("clock_time", "16:20")],
8740+ &[("task_id", &task), ("clock_hour", "16"), ("clock_minute", "20")],
87088741 )
87098742 .await;
87108743 assert!(
@@ -8733,7 +8766,8 @@ async fn a_time_set_on_an_existing_day_writes_both_columns() {
87338766 ("title", "Kickoff"),
87348767 ("column_id", &column),
87358768 ("deadline", "2026-09-10"),
8736- ("clock_time", "09:30"),
8769+ ("clock_hour", "9"),
8770+ ("clock_minute", "30"),
87378771 ],
87388772 )
87398773 .await;
@@ -8941,7 +8975,8 @@ async fn the_logs_feed_says_the_clock_in_its_own_words() {
89418975 &[
89428976 ("task_id", &task),
89438977 ("deadline", "2026-09-02"),
8944- ("clock_time", "11:00"),
8978+ ("clock_hour", "11"),
8979+ ("clock_minute", "00"),
89458980 ],
89468981 )
89478982 .await;
@@ -8991,8 +9026,8 @@ async fn the_datepicker_script_guards_a_panel_with_no_day_input() {
89919026 // The moment field's panel: the grid's hidden day input and the time
89929027 // box ride the same form.
89939028 assert!(
8994- html.contains(r#"name="clock_time" aria-label="Time" data-autosubmit="" data-search="""#),
8995- "the moment select lost its searchable chrome: {html}"
9029+ html.contains(r#"name="clock_hour""#) && html.contains(r#"name="clock_minute""#),
9030+ "the moment boxes lost their names: {html}"
89969031 );
89979032 assert!(html.contains("datepick-input"), "{html}");
89989033 }
@@ -9011,7 +9046,7 @@ async fn an_off_step_clock_renders_itself_not_a_rounded_step() {
90119046 .post(
90129047 "/api/save_task",
90139048 Some(&admin_cookie),
9014- &[("task_id", &task), ("deadline", "2026-09-02"), ("clock_time", "11:23")],
9049+ &[("task_id", &task), ("deadline", "2026-09-02"), ("clock_hour", "11"), ("clock_minute", "23")],
90159050 )
90169051 .await;
90179052 assert!(
@@ -9027,7 +9062,8 @@ async fn an_off_step_clock_renders_itself_not_a_rounded_step() {
90279062 let page = app.get(&format!("/?task={task}"), Some(&admin_cookie)).await;
90289063 let html = String::from_utf8_lossy(&page.bytes);
90299064 assert!(
9030- html.contains(r#"<option value="11:23" selected="">11:23</option>"#),
9065+ html.contains(r#"aria-label="Hour" value="11""#)
9066+ && html.contains(r#"aria-label="Minute" value="23""#),
90319067 "{html}"
90329068 );
90339069 assert!(html.contains(">Sep 02 11:23<"), "{html}");
style/main.scssmodified+20 -3
@@ -1920,9 +1920,26 @@ img.avatar {
19201920
19211921 .datepick-panel { width: 190px; }
19221922
1923-// The time menu rides the same panel as the day grid; a select's intrinsic
1924-// width is wider than the panel, so it is told to fill, not to size itself.
1925-.datepick-panel .field-input { width: 100%; }
1923+// The time row rides the same panel as the day grid: two two-digit boxes
1924+// and a colon between them, one line. An input's intrinsic width is wider
1925+// than its half, so each box fills its half and centers what is typed.
1926+.datepick-time {
1927+ display: flex;
1928+ gap: 4px;
1929+ align-items: center;
1930+ margin-top: 6px;
1931+}
1932+
1933+.datepick-time .field-input {
1934+ width: 100%;
1935+ min-width: 0;
1936+ text-align: center;
1937+}
1938+
1939+.datepick-colon {
1940+ font-family: var(--font-mono);
1941+ color: var(--ink-soft);
1942+}
19261943
19271944 .datepick-head {
19281945 display: flex;