Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postpone tasks and enhanced notifications #107

Merged
merged 15 commits into from
Oct 18, 2023

Conversation

costular
Copy link
Owner

Description

Some enhancements and fixes have been done as part of this PR. Some of them are:

  • Enhanced notification logic moving the code into a module to encapsulate it
  • Use USE_EXACT_ALARM and add rationale when it SCHUDULE_EXACT_ALARM get revoked, just in case in the future we don't have access to USE_EXACT_ALARM you never know when it depends on Google :D
  • Add ability to postpone reminders dynamically, before only one hour was the only choice
  • Fixed an issue that opened the app many times when tapping on notifications
  • Notification permission handling has been improved and now a rationale is shown when the user revokes the permission. Also, it's dynamic, as soon as the permission gets granted even via settings the app will be refreshed
  • Fixed an issue when editing or postponing a reminder
  • Fixed the ability to set reminders for the past which means that the notification is instantly fired

Not only makes no sense but also fires the notification instantly which
we want to avoid
When SCHEDULE_EXACT_ALARM gets denied the app shows a rationale. For now
 it won't be needed since USE_EXACT_ALARM cannot be denied, but just in
 case anything happens
This will be used in the future for generating screenshots per language
supported by the app
Also, as part of this task, some parts of the code were refactored like:
 - The notifications that were moved to a specific module to keep the
single responsibility.
- Some folder organization for better understanding purposes
- Added a Hilt convention plugin for better handling the plugin
management and its dependencies

And other minor things :)
Now a rationale is shown when the permission is not granted and only the
 reminder datetime picker is shown when the permission is granted, not
 before
Displaying should be done by screenshot testing not asserting via the
node list. A good unit test of Composable is to check its semantics or
the lambda calling verifications
Becuase of the database the reminders were broken D: so now they're
updated correctly in the edit screen or when postponing them
@costular costular enabled auto-merge (squash) October 15, 2023 20:12
@costular costular merged commit 3830a41 into develop Oct 18, 2023
5 checks passed
@costular costular deleted the feature/improve_notifications branch October 18, 2023 11:16
costular added a commit that referenced this pull request Jan 17, 2024
* 2.0 Version (#101)

* Rename common UI module to design system

* Add material window size class dependency

* Add preview to home and agenda

* Rename AtomRemindersTheme to AtomTheme for simplicity

* Make horizontal calendar show the whole week and apply a re-style

* Make horizontal calendar day use day of week short format

* Create and record horizontal calendar screenshot tests

* Show day of week above of the day of month

* Change task empty space

Stop using lottie animation in favor of an static empty space

* Rename to Draggable to use it anywhere

* Re-design the agenda

Now it supports phones and foldables without any problem

* Adapt header to medium and expanded width sizes

* Make date picker compatible with surface elevation

* Make date picker day container smaller

* Add missing theme for themed preview

* Add reminder for better preview

* Add VariantsPreview for different previews

Large font and dark theme

* Use Rubik and Roboto Slab as new fonts

* Fix Text import to use Material 3

* Update expanded margin

200dp as content margin was extreme and made no sense

* Replace old accompanist insets with official API

* Make Task use material 3 theming

* Fix wide screen max width

* Make improvements on adaptative design

* Refactor and move files around to improve the module organization

* Introduce Material3 date picker and time picker

* Add auto-postpone tasks feature

Due to the outdated code this commit also includes some refactoring in
order to keep the code clean.

* Fix edit screen padding

* Handle post notification permission

* Fix lint errors

* Animate header calendar transition

* Improve spacing on create task screen

* Improve clearable chip component

* Move property on top of the preview functions

* Improve task card visuals

The title now uses a bolder typography. Also, a space was added between
the title and the reminder when it applies

* Set icon instead of image composable

* Improve multi preview

* Update database schema to add the position field

* Add ability to order tasks

* Upgrade MockK and KSP

* Update screenshot testing device config and re-record screenshots

* Fix lint errors

* Remove Ktlint

* Configure Detekt

* Add baselines

* Run checks on every PR

* Use Java 17 on the CI

* Upgrade checkout action to V3

* Make HorizontalCalendar stateless to avoid flakiness

* Add missing Java setup for detekt job

* Fix lint error

* Use setup java v3

* Add missing dependencies for instrumented tests

* Configure instrumented tests for CI

* Add missing module

* Increase timeout for unit tests

* Add strikeThrough animation

* Add markable animation

* Haptic only when the task is finished

* Remove repeated gitignore

* Remove unnecessary Hilt & KAPT

* Remove unused scripts

* Undo markable animation

* Vibrate in the lambda instead of in the Composable

* Reduce unnnecessary recompositions

* Add loading for agenda screen

* Show unfinished tasks at the top

* Upgrade Compose Destinations

* Show task actions as a bottom sheet instead of a dialog

* Re-record screenshot tests after some library upgrade

* Show error when reminder is set for the past

* Set max lines for create task input to 5

* Set max lines for create task input to 5

* Remove unused string

* Use kotlin Parcelize instead of Serializable

* Fix lint errors

* Fix UI tests

* Re-record screenshot tests

* Add error variant to the clearable chip

* Fix lint errors

* Remove unnecessary safe call

* Fix instrumented test

* Remove unused receiver

* Fix qualifier for receivers

* Enhance notification copy

* Use user's locale to format the time

Also, it will recompose when the locale changes in order to update the
time accordingly when needed

* Record screenshots with new naming

* Rename UI test

* Pass scaffold's fab callback to children

This fixes the issue with passing the selected day to create the task so
 the user doesn't need to pay attention to the day picker on create new
 task screen

* Add basic analytics

* Add basic analytics

* Fix lint errors

* Record screenshot tests

* Move time formatter out of the composable

* Remove UI tests that only assert if it's displayed

Since we have screenshot tests covering the UI of that component we
actually don't need to test it

* Remove header's tonal elevation to reduce excess of colors

* Disable order until we fix it properly :(

* Update changelog

* Add screenshots and include them on the README

* Update Gradle CI caching to write on develop branch instead

* Merge main into develop (#105)

* Fix strike throguh for multi line tasks (#106)

* Postpone tasks and enhanced notifications (#107)

* Add donation option (#108)

* Merge release into develop (#111)

* Fix order task (#112)

* Add themed icon (#115)

* Update task's due date when postponing a reminder (#114)

* Fix calendar localization (#113)

* Add logger (#116)

* Configure build variants (#117)

* Enhance some minor UI things (#120)

* Add today indicator on horizontal calendar

* Fix edit task's day issue with position (#121)

* Enhance performance with baseline profiles (#122)

* Merge master into develop (#123)

* Merge main into develop (#125)

* Add In-App Reviews (#126)

* Merge main into dev (#128)

* Repetitive tasks and other enhancements (#129)

* Refactor get task by id usecase

* Add index for date to fetch tasks faster

* Upgrade libraries and AGP

* Re-arrange files of :core and :core:ui modules

* Improve ClearableChip functionality to clear only when tapping on the X

In the previous design, selecting the chip and tapping anywhere on it
would clear the content, which could lead to unintentional clearing

* Record screenshot tests

* Add recurrence UI

Also improve create task layout reducing paddings and the UI overall

* Upgrade compose destinations to latest version

* Add recurrence when creating a task

* Create next occurrence when mark recurrent task as done

* Add remove logic for recurring tasks

As Google Calendar does, the user will be able to choose between
removing only a single recurring tasks, the chosen one plus its
following occurrences and the last one all the recurring tasks related

* Add fake tasks

* Add recurrence info to the TaskCard

* Fix remove recurring task by the parent one

* Create next occurrences for recurring tasks

* Improve files structure adding UI package

* Remove balloon library

* Upgrade some libs

* Make expanded header calendar scrollable and improve agenda structure

* Remove compose activity dependency from feature plugin

* Make month and week calendar scrollable for better navigation

* Rename interactor folder to usecase

* Increase minimum Android version to API 26 (Android 8)

* Record screenshot tests

* Remove tests that were checking recurrence when mark tasks as done

* Add daily job to populate recurring tasks when needed

* Rename UpdateTaskUseCase.kt to EditTaskUseCase.kt

* Fix week calendar scrolling to selected day when day is updated

* Remove unused mapper

* Fix flaky tests

* Fix edit recurring tasks

* Add progress indicator when saving on the create task expanded screen

* Handle and test Room migrations

* Disable TooGenericExceptionCaught rule

* Fix lint errors

* Fix package id for different build variants

Specifically, baseline profile tests were fixed

* Upgrade Gradle to 8.5

* Upgrade AGP to 8.2.1

* Upgrade MockK and fix tests

* Remove horizontal calendar screenshot test

* Bump version

* Update whats new

* Update changelog
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.

2 participants