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

Allow custom views as icons in OnboardingView #28

Merged
merged 6 commits into from
Oct 31, 2023
Merged

Conversation

vishnuravi
Copy link
Member

@vishnuravi vishnuravi commented Oct 28, 2023

Allow custom views as icons in OnboardingView

♻️ 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.

⚙️ Release Notes

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

📝 Code of Conduct & Contributing Guidelines

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

@codecov
Copy link

codecov bot commented Oct 28, 2023

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

@@           Coverage Diff           @@
##             main      #28   +/-   ##
=======================================
  Coverage   73.72%   73.72%           
=======================================
  Files          22       22           
  Lines        1050     1050           
=======================================
  Hits          774      774           
  Misses        276      276           
Files Coverage Δ
...es/SpeziOnboarding/OnboardingInformationView.swift 52.06% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ea46a6...55bb470. Read the comment docs.

@vishnuravi vishnuravi marked this pull request as ready for review October 28, 2023 03:11
@vishnuravi vishnuravi changed the title Allow custom views as icons in OnboardingInformationView Allow custom views as icons in OnboardingView Oct 28, 2023
Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@vishnuravi vishnuravi enabled auto-merge (squash) October 31, 2023 23:17
@vishnuravi vishnuravi disabled auto-merge October 31, 2023 23:21
@vishnuravi
Copy link
Member Author

vishnuravi commented Oct 31, 2023

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.

@vishnuravi vishnuravi enabled auto-merge (squash) October 31, 2023 23:30
Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the improvements! 🚀

@vishnuravi vishnuravi merged commit b281ff6 into main Oct 31, 2023
@vishnuravi vishnuravi deleted the custom-icons branch October 31, 2023 23:37
PSchmiedmayer added a commit that referenced this pull request Nov 1, 2023
# Fix Missing Localized Initializer

## ⚙️ Release Notes 
- Fixes a missing localized initializer with the new functionality
introduced in #28 noted when including it in the template application.



## 📝 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).
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