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 SwiftUI `Binding` Negation #32

Closed philippzagar closed 7 months ago

philippzagar commented 7 months ago

Add SwiftUI Binding Negation

:recycle: Current situation & Problem

We currently use the negation of a SwiftUI Binding in lots of different Spezi modules. Each module needs to define the Binding extension on their own.

:gear: Release Notes

:books: Documentation

Proper documentation of added code

:white_check_mark: Testing

No test cases added

: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 7 months ago

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 79.48%. Comparing base (d49f716) to head (a012d0f).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/32/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/32?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ```diff @@ Coverage Diff @@ ## main #32 +/- ## ========================================== - Coverage 79.87% 79.48% -0.39% ========================================== Files 39 40 +1 Lines 1222 1228 +6 ========================================== Hits 976 976 - Misses 246 252 +6 ``` | [Files](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/32?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | Coverage Δ | | |---|---|---| | [Sources/SpeziViews/Utilities/Binding+Negate.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/32?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVZpZXdzL1V0aWxpdGllcy9CaW5kaW5nK05lZ2F0ZS5zd2lmdA==) | `0.00% <0.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/32?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/32?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Last update [d49f716...a012d0f](https://app.codecov.io/gh/StanfordSpezi/SpeziViews/pull/32?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).
philippzagar commented 7 months ago

@PSchmiedmayer Please force-merge the PR, I didn't do testing for this one as it's really basic functionality