Refactor: EditableTextView.Changed() and the Canceled spelling

EditableTextView.Changed is a method like every other result's.
AlertDialogResult, PopconfirmResult and DateTimeResult spell Canceled
the American way, matching EditableTextView and LoadingOverlayResult.
Callers, Gallery and docs updated.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 13:50:02 -04:00
1 parent 5d395ad789
commit c0be05d043
22 files changed
+306 -72

No files matched your search

+3 -3
View File
@@ -64,7 +64,7 @@ func DateTimePicker(c *ui.Context, value *time.Time, opts DateTimePickerOptions)
opts.Layout = "2006-01-02"
}
format := func(t time.Time) string { return dateTimeText(c, t.In(loc), opts.Layout, cfg) }
changed, cancelled, done := false, false, false
changed, canceled, done := false, false, false
label := opts.Label
if label == "" {
label = msg(c, "date_time_picker.placeholder")
@@ -137,13 +137,13 @@ func DateTimePicker(c *ui.Context, value *time.Time, opts DateTimePickerOptions)
})
if *wasOpen && !*open && !done {
slog.Debug("mujica: date_time_picker cancel")
cancelled = true
canceled = true
}
*wasOpen = *open
if !*open {
*problem = ""
}
return DateTimeResult{Element: col, changed: changed, cancelled: cancelled}
return DateTimeResult{Element: col, changed: changed, canceled: canceled}
}
// dateTimeConfirm turns the draft into an instant, or explains why it cannot.