Skip to content

fw/applib/ui: extract day_picker as reusable component from alarm_editor#1474

Open
jmsunseri wants to merge 2 commits into
coredevices:mainfrom
jmsunseri:day-picker-refactor
Open

fw/applib/ui: extract day_picker as reusable component from alarm_editor#1474
jmsunseri wants to merge 2 commits into
coredevices:mainfrom
jmsunseri:day-picker-refactor

Conversation

@jmsunseri

@jmsunseri jmsunseri commented Jun 10, 2026

Copy link
Copy Markdown

Extract the day picker and custom day picker UI into a standalone reusable component in applib/ui/day_picker.{c,h}, replacing the inline implementation that was embedded in alarm_editor.c.

The new DayPicker API provides:

  • DayPickerConfig/DayPickerResult types for configuration and results
  • DayPickerKind enum (Everyday, Weekdays, Weekends, Custom, JustOnce)
  • day_picker_push() for the kind-selection screen
  • custom_day_picker_push() for the day-of-week toggle screen
  • day_picker_kind_get_string() for localized string lookup

alarm_editor.c now uses the new component via callback-based API, replacing ~300 lines of inline UI code with thin conversion functions.

This is a requirement for #1436 to try and break that work up into more manageable chunks. First we extract the day picker from the alarms scheduling tool. Then we can use it when improving quiet time scheduling.

@jmsunseri

Copy link
Copy Markdown
Author

cc @ericmigi

@gmarull

gmarull commented Jun 10, 2026

Copy link
Copy Markdown
Member

I wasn't aware we also do AI models Co-authored-by: glm-5.1 <ai@coredevices.com>

@jmsunseri

jmsunseri commented Jun 10, 2026 via email

Copy link
Copy Markdown
Author

@jmsunseri jmsunseri force-pushed the day-picker-refactor branch from 1a95807 to 1f06f95 Compare June 11, 2026 01:50
@jmsunseri

Copy link
Copy Markdown
Author

I wasn't aware we also do AI models Co-authored-by: glm-5.1 <ai@coredevices.com>

this has been resolved

@jmsunseri

Copy link
Copy Markdown
Author

@gmarull any update on this?

@gmarull

gmarull commented Jun 16, 2026

Copy link
Copy Markdown
Member

@gmarull any update on this?

pls make sure CI is green first

Extract the day picker and custom day picker UI into a standalone
reusable component in applib/ui/day_picker.{c,h}, replacing the
inline implementation that was embedded in alarm_editor.c.

The new DayPicker API provides:
- DayPickerConfig/DayPickerResult types for configuration and results
- DayPickerKind enum (Everyday, Weekdays, Weekends, Custom, JustOnce)
- day_picker_push() for the kind-selection screen
- custom_day_picker_push() for the day-of-week toggle screen
- day_picker_kind_get_string() for localized string lookup

alarm_editor.c now uses the new component via callback-based API,
replacing ~300 lines of inline UI code with thin conversion functions.

Co-authored-by: glm-5.1
Signed-off-by: Justin Sunseri <jmsunseri@gmail.com>
@jmsunseri jmsunseri force-pushed the day-picker-refactor branch from 1f06f95 to 1b9739d Compare June 17, 2026 03:08
day_picker.c uses resource IDs (CHECKBOX_ICON_CHECKED, CHECKBOX_ICON_UNCHECKED,
CHECKMARK_ICON_BLACK, CHECKMARK_ICON_DOTTED) that are only available in the
normal resource map, not in PRF. The alarms app that uses day_picker is already
excluded from PRF, so exclude the component as well.

Co-authored-by: glm-5.1
Signed-off-by: Justin Sunseri <jmsunseri@gmail.com>
@jmsunseri

Copy link
Copy Markdown
Author

@gmarull any update on this?

pls make sure CI is green first

Sorry about that I didn't know they were failing because I can't run any of the tests because my PR originates from a fork. This should be resolved now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants