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

Implement swipe-to-delete for history treatments + Change alerts #314

Merged
merged 10 commits into from
Nov 19, 2023

Conversation

dnzxy
Copy link
Contributor

@dnzxy dnzxy commented Nov 9, 2023

This PR builds on existing behaviours for glucose history and introduces swipe-to-delete behaviour for history treatments. The work of this PR is based on a "poll" type question Discord (see here on Discord and the conversation that evolved from here).

Contents

  • Add swipe-to-delete to treatment history
  • Changes alert messages: <formatted timestamp>, <item amount text>
  • Adds alert behaviour to glucose deletion (as requested on Discord), to make deletion feel consistent for all historic data entries, regardless of type

To avoid a certain UI glitch, the swipe-to-delete was altered and now uses custom .swipeActions and no longer SwiftUI's standard List .onDelete behaviour. Deletion works exactly like before but the animation does no longer for the full row item, it stops at 50%. This fixes an apparent issue.

The features introduced with this PR have been tested by @Marvout, @AndreasStokholm and myself. There is a bug around deleted insulin entries that originates from Loop which has been documented with issue #305 and does not originate or affect any of the features or behaviours this PR introduces.

UI Look & Feel

Disclaimer: the big gray circle you see is from making screenshots for a swipe gesture in a simulator. This is not really visible to the user on a real phone.

Dark theme Light theme
image image
image image
image image
image image
image image
image image
image image
image image

@Jon-b-m
Copy link
Member

Jon-b-m commented Nov 19, 2023

Added localisation code to your PR and new strings

@Jon-b-m Jon-b-m marked this pull request as ready for review November 19, 2023 18:05
@Jon-b-m Jon-b-m merged commit 2e3bd3c into Artificial-Pancreas:dev Nov 19, 2023
mountrcg added a commit to mountrcg/iAPS that referenced this pull request Nov 20, 2023
@dnzxy dnzxy deleted the swipe-to-delete branch December 2, 2023 01:42
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