feat: Add Ui on newMessageFragment - #2989
Conversation
8c39155 to
7702c6d
Compare
There was a problem hiding this comment.
Pull request overview
Adds a unified send-options screen to the new-message flow, combining scheduled sending with response reminders.
Changes:
- Adds reminder configuration, feature flag, UI, and translations.
- Replaces the scheduling bottom sheet with a full send-options screen.
- Refactors reusable scheduling and settings components.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
OldKotlin/realm-models/.../FeatureFlag.kt |
Adds the response-reminder flag. |
app/src/main/res/values/strings.xml |
Adds English send-option strings. |
app/src/main/res/values-{da,de,el,es,fi,fr,it,nb,nl,pl,pt,sv}/strings.xml |
Adds localized send-option strings. |
app/src/main/res/values/dimens.xml |
Adds option-content padding. |
app/src/main/res/values/attrs.xml |
Adds configurable icon tint. |
app/src/main/res/navigation/new_message_navigation.xml |
Registers the send-options screen. |
app/src/main/res/navigation/main_navigation.xml |
Updates rescheduling navigation. |
app/src/main/res/layout/view_setting_radio_button.xml |
Adds radio-option descriptions. |
app/src/main/res/layout/view_item_setting.xml |
Adds checkmark and chip containers. |
app/src/main/res/layout/fragment_send_options.xml |
Defines the send-options screen. |
app/src/main/res/layout/fragment_new_message.xml |
Adds schedule and reminder alerts. |
app/src/main/java/com/infomaniak/mail/utils/extensions/ViewExt.kt |
Adds child-padding support. |
app/src/main/java/com/infomaniak/mail/utils/date/DateFormatUtils.kt |
Formats reminder delays. |
app/src/main/java/com/infomaniak/mail/ui/newMessage/SendOptionsConfig.kt |
Defines schedule and reminder state. |
app/src/main/java/com/infomaniak/mail/ui/newMessage/sendOptions/DraftSendOptionsFragment.kt |
Implements send-option selection. |
app/src/main/java/com/infomaniak/mail/ui/newMessage/NewMessageViewModel.kt |
Stores send-option state. |
app/src/main/java/com/infomaniak/mail/ui/newMessage/NewMessageFragment.kt |
Integrates options into composition. |
app/src/main/java/com/infomaniak/mail/ui/main/thread/ThreadFragment.kt |
Updates rescheduling references. |
app/src/main/java/com/infomaniak/mail/ui/main/settings/SettingRadioGroupView.kt |
Adds selection clearing. |
app/src/main/java/com/infomaniak/mail/ui/main/settings/SettingRadioButtonView.kt |
Supports descriptions and dynamic items. |
app/src/main/java/com/infomaniak/mail/ui/main/settings/ItemSettingView.kt |
Supports icon tint and checkmarks. |
app/src/main/java/com/infomaniak/mail/ui/bottomSheetDialogs/SnoozeBottomSheetDialog.kt |
Uses the refactored picker. |
app/src/main/java/com/infomaniak/mail/ui/bottomSheetDialogs/SimpleSchedulePickerBottomSheet.kt |
Extracts shared picker behavior. |
app/src/main/java/com/infomaniak/mail/ui/bottomSheetDialogs/ScheduleOptionsHelper.kt |
Generalizes schedule-option setup. |
app/src/main/java/com/infomaniak/mail/ui/bottomSheetDialogs/RescheduleDraftBottomSheetDialog.kt |
Renames and updates rescheduling UI. |
d726ad9 to
cadfe60
Compare
| <dimen name="maxHorizontalSwipeTolerance">100dp</dimen> | ||
| <dimen name="minVerticalSwipeDistance">32dp</dimen> | ||
| <dimen name="marginComplementaryButton">2dp</dimen> | ||
| <dimen name="emptyStatePadding">55dp</dimen> |
There was a problem hiding this comment.
This is a highly suspicious number.
Are you sure it should not be 56 ?
There was a problem hiding this comment.
Why is it named emptyStatePadding ? it's not used for an emptySpate
a71954a to
5bf0778
Compare
| customDelayReminder.setCheckMark(displayCheckMark = false) | ||
| customDelayReminder.removeSubtitle() | ||
| newMessageViewModel.setReminderConfig( | ||
| if (minutes != null && isKnownPreset) { |
There was a problem hiding this comment.
Add reminderConfig = argument name
| .filterIsInstance<SettingRadioButtonView>() | ||
| .firstOrNull { it.associatedValue == scheduleStr } | ||
|
|
||
| when { |
There was a problem hiding this comment.
Extract this when in a function to avoid nested when and simplify the code
| customScheduleOption.setCheckMark(displayCheckMark = false) | ||
| customScheduleOption.removeSubtitle() | ||
| scheduleOptions.check(matchedOption.id) |
There was a problem hiding this comment.
Extract to a function to avoid duplicating code in the when clauses
| @@ -187,33 +182,29 @@ class DraftSendOptionsFragment : Fragment() { | |||
| optionsDelays.onItemCheckedListener { _, value, _ -> | |||
| val minutes = value?.toIntOrNull() | |||
| val isKnownPreset = ReminderPreset.entries.any { preset -> preset.delayMinutes == minutes } | |||
| customDelayReminder.setSubtitle(requireContext().formatDelayText(reminderConfig.delayMinutes)) | ||
| customDelayReminder.setCheckMark(displayCheckMark = true) | ||
| optionsDelays.clearCheck() |
There was a problem hiding this comment.
Same, factorize in one function
…schedule + reminder options)
5bf0778 to
d6a570e
Compare
|



No description provided.