StanfordSpezi / SpeziKt

Kotlin & Android Version of the Stanford Spezi Framework
http://spezi.health/SpeziKt/
MIT License
8 stars 1 forks source link

Consent Dark Mode & Smaller UI Improvements #62

Closed PSchmiedmayer closed 1 month ago

PSchmiedmayer commented 1 month ago

Description

Consent View

The consent view is not properly rendering in dark mode making it hard to identify the text and content on device. In addition, the consent view's name fields, signature field, and consent buttons should be attached to the bottom of the screen.

Reproduction

Open the application in dark mode on a recent android device.

Expected behavior

The consent text should be rendered in white, signature field in a light gray, and the signature text and color in a white color to provide a good contrast when using the consent view.

In addition, the consent view's name fields, signature field, and consent buttons should be attached to the bottom of the screen if the consent document is shorter than a page and doesn't require any scrolling. The view should scroll to the respective fields if the user selects a field to avoid the keyboard overlapping with any text fields.

Additional context

No response

Code of Conduct

PSchmiedmayer commented 1 month ago

@Basler182 Quick check here to see in which change this has been addressed. GitHub also has the feature to automatically close an issue with a PR if it is attached to a PR 👍

https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue

Basler182 commented 1 month ago

oh sorry, @PSchmiedmayer . i could have sworn i mentioned the issue in a commit message. maybe it got lost in the squash and merge we are doing? is that possible? because the branch itself doesn't exist anymore - so does the commit message. basically the two changes happened in these files (MarkdownComposable and ConsentScreen) . i replaced the basic text with normal text which automatically converts to dark mode and the rest happens in the consent screen:

b1363bbd952b40ed6b6c38d1d6e4efd2a4946e144cacaba85759bf5c30dd98b1

I also added a new annotation class (ThemePreviews) which will allow us to Preview light and dark mode with a single annotation so that we can make sure when we use them that we have both in mind for the future

but that's good to know, it means that we should create a separate branch for each issue no matter how small it is, so that we have a better overview of the solved issues

PSchmiedmayer commented 1 month ago

Ah, thank you! Didn't find this! Thank you for working on all of that, I like the idea that we preview in dark and light mode at the same time, we do a similar thing on iOS and it is really helpful.

Yes, that's helpful or just linking an issue to a PR that closes it when merged. I will re-open it for now as it is not yet in main but attach it to #53 so this is automatically closed when #53 is merged 🚀