forge
Explore
Log in

Don't you dare go Hollow

The day you press is the day that is saved

Browse files at this commit

c9b8984df23a578d9f1f6deba1aafc40688d2040Ahmet Kaan GümüşParent: a85a030
  • fix
    • the day you press is the day that is saved
Show full message
🐛 fix(deadline): the day you press is the day that is saved

The picker closed on the day you pressed and left the value sitting in a
form, waiting for a Save button that was no longer on screen. Every deadline
chosen that way was quietly discarded.

The grid autosubmits now, which is what the log filters, the status select
and the member role select already do — the deadline was the one control
asking for a second gesture to commit a single value, and there is nothing
to review between choosing a date and meaning it. Escape and a click outside
are what closing without choosing is for. The new-task modal keeps its Save:
there the date is one field of a form still being assembled.
crates/izlek-web/src/detail.rsmodified+9 -5
@@ -1120,6 +1120,14 @@ async fn description_control(cx: &Cx, task: &TaskDetail, may_write: bool, lang:
1120 }1120 }
1121 }1121 }
1122 1122
1123+/// The deadline field: a calendar popover that commits on the day you press.
1124+///
1125+/// It used to carry Save and Cancel under the grid, which put the commit two
1126+/// gestures away from the choice — and picking a day closes the popover, so
1127+/// the Save it was waiting for was no longer on screen. Every date chosen
1128+/// this way was silently discarded. The grid now autosubmits, the way the
1129+/// log filters already did, and closing is what Escape and a click outside
1130+/// are for.
1123 async fn deadline_control(1131 async fn deadline_control(
1124 cx: &Cx,1132 cx: &Cx,
1125 task: &TaskDetail,1133 task: &TaskDetail,
@@ -1160,11 +1168,7 @@ async fn deadline_control(
1160 <div class="edit-form pop-panel datepick-panel">1168 <div class="edit-form pop-panel datepick-panel">
1161 <form class="pop-form" method="post" action="/api/save_task">1169 <form class="pop-form" method="post" action="/api/save_task">
1162 <input type="hidden" name="task_id" value=(task.id.clone())>1170 <input type="hidden" name="task_id" value=(task.id.clone())>
1163- (datepicker_grid(cx, "deadline", &input_value, false, lang).await?)1171+ (datepicker_grid(cx, "deadline", &input_value, true, lang).await?)
1164- <div class="edit-row">
1165- <button class="edit-save" type="submit">(t(lang, Key::Save))</button>
1166- <label class="edit-cancel" for=(toggle)>(t(lang, Key::Cancel))</label>
1167- </div>
1168 </form>1172 </form>
1169 (refused(cx, "save_task", lang).await?)1173 (refused(cx, "save_task", lang).await?)
1170 </div>1174 </div>