StanfordSpezi / SpeziOnboarding

Spezi Onboarding module to inform a user or retrieve consent for a study participation
https://swiftpackageindex.com/StanfordSpezi/SpeziOnboarding/documentation/
MIT License
11 stars 5 forks source link

Allow custom views as icons in OnboardingView #28

Closed vishnuravi closed 8 months ago

vishnuravi commented 8 months ago

Allow custom views as icons in OnboardingView

:recycle: Current situation & Problem

The OnboardingView has areas comprised of OnboardingInformationViews. Each OnboardingInformationView can have an icon, which must be an Image. However, this means we cannot currently add modifiers to the icon or use other types of views as icons, which limits the customizability. See #27.

:gear: Release Notes

Added a new initializer in the Content struct that accepts any View as an icon using @ViewBuilder.

:pencil: Code of Conduct & Contributing Guidelines

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

codecov[bot] commented 8 months ago

Codecov Report

Merging #28 (55bb470) into main (0ea46a6) will not change coverage. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/StanfordSpezi/SpeziOnboarding/pull/28/graphs/tree.svg?width=650&height=150&src=pr&token=tVwIFVPdJG&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi)](https://app.codecov.io/gh/StanfordSpezi/SpeziOnboarding/pull/28?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ```diff @@ Coverage Diff @@ ## main #28 +/- ## ======================================= Coverage 73.72% 73.72% ======================================= Files 22 22 Lines 1050 1050 ======================================= Hits 774 774 Misses 276 276 ``` | [Files](https://app.codecov.io/gh/StanfordSpezi/SpeziOnboarding/pull/28?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | Coverage Δ | | |---|---|---| | [...es/SpeziOnboarding/OnboardingInformationView.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziOnboarding/pull/28?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aU9uYm9hcmRpbmcvT25ib2FyZGluZ0luZm9ybWF0aW9uVmlldy5zd2lmdA==) | `52.06% <100.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/StanfordSpezi/SpeziOnboarding/pull/28?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/SpeziOnboarding/pull/28?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Last update [0ea46a6...55bb470](https://app.codecov.io/gh/StanfordSpezi/SpeziOnboarding/pull/28?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).
vishnuravi commented 8 months ago

Thank you, this looks great @vishnuravi! Good to see that this is a non-breaking change!

I would also suggest to use the chance to directly add the URL link check to this PR. Similar to the Storage & other Spezi packages, I would suggest to also run the workflow on a schedule: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule

Thanks! I added the markdown link checker and set it to a schedule to run on the first of every month.