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

Decompose Nearby Device Row #18

Merged
merged 9 commits into from
Dec 23, 2024
Merged

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented Nov 17, 2024

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 and Contributing Guidelines:

@Supereg Supereg marked this pull request as ready for review December 15, 2024 20:25
Copy link

codecov bot commented Dec 15, 2024

Codecov Report

Attention: Patch coverage is 95.31250% with 3 lines in your changes missing coverage. Please review.

Project coverage is 84.02%. Comparing base (397c0e8) to head (9945569).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...iDevicesUI/Scanning/PeripheralSecondaryLabel.swift 92.31% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #18      +/-   ##
==========================================
+ Coverage   83.11%   84.02%   +0.92%     
==========================================
  Files          55       57       +2     
  Lines        2935     2934       -1     
==========================================
+ Hits         2439     2465      +26     
+ Misses        496      469      -27     
Files with missing lines Coverage Δ
...rces/SpeziDevicesUI/Scanning/NearbyDeviceRow.swift 100.00% <100.00%> (+32.98%) ⬆️
...rces/SpeziDevicesUI/Scanning/PeripheralLabel.swift 100.00% <100.00%> (ø)
Sources/SpeziOmron/Model/OmronLocalName.swift 76.20% <ø> (ø)
...urces/SpeziOmron/Model/OmronManufacturerData.swift 93.82% <ø> (ø)
...iDevicesUI/Scanning/PeripheralSecondaryLabel.swift 92.31% <92.31%> (ø)

... and 3 files with indirect coverage changes


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 397c0e8...9945569. Read the comment docs.

Copy link
Member

@philippzagar philippzagar left a comment

Choose a reason for hiding this comment

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

Looks great! 🚀

Package.swift Outdated Show resolved Hide resolved
Tests/UITests/TestAppUITests/BluetoothViewsTests.swift Outdated Show resolved Hide resolved
@Supereg Supereg merged commit e842a01 into main Dec 23, 2024
9 checks passed
@Supereg Supereg deleted the feature/decompose-nearby-device-row branch December 23, 2024 22:09
@PSchmiedmayer PSchmiedmayer added the enhancement New feature or request label Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

3 participants