-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add InfoButton for list rows #50
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #50 +/- ##
==========================================
+ Coverage 74.91% 75.44% +0.54%
==========================================
Files 52 54 +2
Lines 1586 1657 +71
==========================================
+ Hits 1188 1250 +62
- Misses 398 407 +9
Continue to review full report in Codecov by Sentry.
|
be12cbb
to
d4cc1af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition!
# Decompose Nearby Device Row ## ♻️ Current situation & Problem The `NearbyDeviceRow` was a monolith-style view that encompassed all functionality without a lot of configuration possibilities to vitalizes a nearby device in, e.g., a Bluetooth scanning view. This design is not really flexible if you want to show your own information or want to adjust the layout. Previously you were forced to write your own view completely from scratch. This PR decomposes the view into multiple subview allowing you to build your custom `NearbyDeviceRow`-like experience without reinventing the wheel completely. The new `PeripheralLabel`, `PeripheralSecondaryLabel`, and `InfoButton` views (see StanfordSpezi/SpeziViews#50) allow you to fully customize the appearance of your `NearbyDeviceRow`. ## ⚙️ Release Notes * Decompose the `NearbyDeviceRow` into `PeripheralLabel`, `PeripheralSecondaryLabel`, and `InfoButton` views for greater customizability. ## 📚 Documentation Added new views to the DocC documentation target. ## ✅ Testing The new tests are implicitly tested via the `NearbyDeviceRow`. ## 📝 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).
# improve `onPreferenceChange` closure MainActor handling ## ♻️ Current situation & Problem In response to Apple changing the `onPreferenceChange` API to no longer MainActor-constrain its closure parameter, #48 and #50 updated all `onPreferenceChange` calls to either schedule the change onto the MainActor, or (in some cases) check if the closure is being called on the MainActor, and then run it directly. This PR fixes this, by using the `runOrScheduleOnMainActor` function from SpeziFoundation ## ⚙️ Release Notes - Improve MainActor interactions in `onPreferenceChange` closures. ## 📚 Documentation n/a ## ✅ Testing There are no dedicated new tests but these changes do in fact fix tests elsewhere. ## 📝 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). --------- Co-authored-by: Andreas Bauer <[email protected]>
Add InfoButton for list rows
♻️ Current situation & Problem
This PR adds a new icon-only
InfoButton
that is useful in List views to provide additional context to a row element.⚙️ Release Notes
InfoButton
.📚 Documentation
Added the new button to the documentation catalog.
✅ Testing
Tested via UI tests.
📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: