StanfordSpezi / SpeziViews

A common set of SwiftUI views and related functionality used in Spezi modules
https://swiftpackageindex.com/StanfordSpezi/SpeziViews/documentation/
MIT License
4 stars 3 forks source link

Add `DefaultErrorDescription` environment key; Localization features; restructure project; fix spelling #7

Closed Supereg closed 1 year ago

Supereg commented 1 year ago

Add DefaultErrorDescription environment key; Localization features; restructure project; fix spelling

:recycle: Current situation & Problem

The current situation is as follows:

Further, the current API design imposes some inconveniences or could be improved in regard to usability and flexibility.

:bulb: Proposed solution

This PR addresses the above-introduced situation as follows:

:gear: Release Notes

The PR introduces the following breaking changes:

:heavy_plus_sign: Additional Information

Related PRs

--

Testing

New UI tests were added. The TestApp was updated to adapt to the breaking changes.

Reviewer Nudging

Look altho eDefaultErrorDescription type and at AnyLocalizedError. Refer to the DefaultErrorDescriptiontestView to see how it is used.

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

Supereg commented 1 year ago

Ping @PSchmiedmayer CI help 🙈

Supereg commented 1 year ago

I'm at a point where I think I have fixed some issue with a timeout on the HTTP view tests, but am now at a point where the CI is completely broken. Can't event view the TestApp.xresult anymore because it seems to be incomplete 🙃

PSchmiedmayer commented 1 year ago

@Supereg Yes, seems like the simulator is not starting which is strange. I will take a look at that ...

PSchmiedmayer commented 1 year ago

@Supereg restated the build agents and restarted everything. Seems to pass now 👍

codecov[bot] commented 1 year ago

Codecov Report

Merging #7 (c1d6af5) into main (c6975e8) will increase coverage by 0.71%. The diff coverage is 94.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7/graphs/tree.svg?width=650&height=150&src=pr&token=7UbLX71dAO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi)](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ```diff @@ Coverage Diff @@ ## main #7 +/- ## ========================================== + Coverage 77.40% 78.11% +0.71% ========================================== Files 16 19 +3 Lines 584 612 +28 ========================================== + Hits 452 478 +26 - Misses 132 134 +2 ``` | [Impacted Files](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | Coverage Δ | | |---|---|---| | [Sources/SpeziViews/ViewModifier/OnTapFocus.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdNb2RpZmllci9PblRhcEZvY3VzLnN3aWZ0) | `60.87% <ø> (ø)` | | | [...urces/SpeziViews/ViewModifier/ViewStateAlert.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdNb2RpZmllci9WaWV3U3RhdGVBbGVydC5zd2lmdA==) | `100.00% <ø> (ø)` | | | [Sources/SpeziViews/Views/DescriptionGridRow.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdzL0Rlc2NyaXB0aW9uR3JpZFJvdy5zd2lmdA==) | `27.78% <ø> (ø)` | | | [Sources/SpeziViews/Views/Drawing/CanvasView.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdzL0RyYXdpbmcvQ2FudmFzVmlldy5zd2lmdA==) | `88.61% <ø> (ø)` | | | [...es/SpeziViews/Views/HorizontalGeometryReader.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdzL0hvcml6b250YWxHZW9tZXRyeVJlYWRlci5zd2lmdA==) | `100.00% <ø> (ø)` | | | [...SpeziViews/Views/ProfileView/UserProfileView.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdzL1Byb2ZpbGVWaWV3L1VzZXJQcm9maWxlVmlldy5zd2lmdA==) | `53.74% <ø> (ø)` | | | [Sources/SpeziViews/Views/Text/DocumentView.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdzL1RleHQvRG9jdW1lbnRWaWV3LnN3aWZ0) | `69.57% <ø> (ø)` | | | [Sources/SpeziViews/Views/Text/HTMLView.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdzL1RleHQvSFRNTFZpZXcuc3dpZnQ=) | `97.30% <ø> (ø)` | | | [Sources/SpeziViews/Views/Text/LazyText.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdzL1RleHQvTGF6eVRleHQuc3dpZnQ=) | `58.07% <ø> (ø)` | | | [Sources/SpeziViews/Views/Text/MarkdownView.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1ZpZXdzL1RleHQvTWFya2Rvd25WaWV3LnN3aWZ0) | `84.62% <ø> (ø)` | | | ... and [9 more](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Last update [c6975e8...c1d6af5](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/7?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi).