generated from StanfordBDHG/SwiftPackageTemplate
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve ContactList layout and improve subtitle line breaking (#18)
# Improve ContactList layout and improve subtitle line breaking ## ♻️ Current situation & Problem Currently, the `ContactsList` view is built using a custom ScrollView implementation and drawing custom backgrounds with shades around the `ContactView`s. This doesn't really feel native on iOS. Instead, this PR rethinks the implementation by rebuilding the `ContactsList` view using SwiftUI standard components like `List`. This makes the `ContactsList` now feel right at home. Further, previously the subtitle, consisting of the Person's title and organization, was built using multiple distinct `Text` instances. This caused problems when the text was longer than the view was capable of displaying. This PR ensures that a persons title and organization are combined into a single `Text` view and allows to to wrap into a second line. Lastly, this PR migrates the PR to use String catalogs, optimizes key naming and bumps the target to iOS 17. Below are two screenshots comparing the previous implementation to the updated one. <img width="380" alt="Bildschirmfoto 2023-11-01 um 22 13 11" src="https://github.com/StanfordSpezi/SpeziContact/assets/9783857/18eff6c1-b105-4f92-b0ae-19b28e9dc044"> <img width="380" alt="Bildschirmfoto 2023-11-01 um 22 12 14" src="https://github.com/StanfordSpezi/SpeziContact/assets/9783857/1111a371-8193-4724-9d10-f1feaed28d7f"> ## ⚙️ Release Notes * New updated visuals for the `ContactsView` that feel way more native to iOS * Updated line breaking behavior for too long contact subtitles (title and organization) * Migrated to use String Catalogs for localization ## 📚 Documentation -- ## ✅ Testing Tests were slightly adjusted, due to issues with line breaks in the labels. ## 📝 Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
- Loading branch information
Showing
12 changed files
with
264 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.