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

Add new OptionSetPicker #53

Merged
merged 9 commits into from
Jan 22, 2025
Merged

Add new OptionSetPicker #53

merged 9 commits into from
Jan 22, 2025

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented Jan 8, 2025

Add new option set picker

♻️ Current situation & Problem

This PR adds a new view that makes it easier to work with OptionSet as the selection of a Picker view. SwiftUI Picker doesn't natively support multi-selection picker. The OptionSetPicker does that by facilitating the OptionSet protocol.
Sadly we cannot fully re-use PickerStyles and needed to create our own enum-based solution. Currently we support rendering the picker as a menu or a inline view like, e.g., in a List.

⚙️ Release Notes

  • Added new OptionSetPicker view.

📚 Documentation

Added documentation and added it to the DocC catalog.

✅ Testing

Added new UI tests.

📝 Code of Conduct & Contributing Guidelines

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

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.

Nice job, looks really cool!

@PSchmiedmayer PSchmiedmayer added the enhancement New feature or request label Jan 19, 2025
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 fantastic! 🚀 Only some super nitty styling things.

@Supereg Supereg force-pushed the feature/option-set-picker branch from ca942f3 to 7be65b5 Compare January 20, 2025 08:32
@Supereg Supereg changed the title Add new option set picker Add new OptionSetPicker Jan 20, 2025
@Supereg
Copy link
Member Author

Supereg commented Jan 20, 2025

@PSchmiedmayer some runners (in this case runner 7) seem to have a problem with the software keyboard not popping up. We had that on iPhone sometimes too.

see https://github.com/StanfordSpezi/SpeziViews/actions/runs/12877056182/job/35900963614?pr=53

any chance to his might be a configuration issue?

@PSchmiedmayer
Copy link
Member

Hmm, good question. Let me double-check this on the runner 👍

@PSchmiedmayer
Copy link
Member

@Supereg I took a look at the runners and ensured that the connection to a hardware keyboard is disabled across all iOS simulators. Hope this fixes the issue.

@Supereg Supereg enabled auto-merge (squash) January 22, 2025 07:58
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 87.77778% with 22 lines in your changes missing coverage. Please review.

Project coverage is 76.68%. Comparing base (540010e) to head (a10babb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...es/SpeziViews/Views/Controls/OptionSetPicker.swift 87.78% 22 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   75.46%   76.68%   +1.22%     
==========================================
  Files          54       55       +1     
  Lines        1642     1822     +180     
==========================================
+ Hits         1239     1397     +158     
- Misses        403      425      +22     
Files with missing lines Coverage Δ
...es/SpeziViews/Views/Controls/OptionSetPicker.swift 87.78% <87.78%> (ø)

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 540010e...a10babb. Read the comment docs.

@Supereg Supereg merged commit 80c7cdf into main Jan 22, 2025
13 checks passed
@Supereg Supereg deleted the feature/option-set-picker branch January 22, 2025 08:09
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: Done
Development

Successfully merging this pull request may close these issues.

3 participants