Conversation
Introduces a server filter in the EntityPicker UI, allowing users to filter entities by server when multiple servers are available. Adds the corresponding localization key and updates Swiftgen string accessors. Also adds top padding to the MagicItemAddView segmented picker for improved layout.
Replaces the hardcoded search placeholder in EntityPicker with a localized string and adds the corresponding key to Localizable.strings.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modifies the entity picker and magic item add view to display as bottom sheets instead of full-screen modals on iOS 16+. It also adds a server filter option to the entity picker when multiple servers are configured.
Changes:
- Adds iOS 16+ presentation detents to show entity picker and magic item add views as bottom sheets with .medium and .large sizes
- Replaces searchable modifier with inline TextField search UI in entity picker
- Adds server filter picker to entity picker filters when multiple servers exist
- Makes close button macCatalyst-only in both views
- Adds localization for new "Servers" filter title
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| Sources/Shared/Resources/Swiftgen/Strings.swift | Adds localization key for server filter title |
| Sources/App/Resources/en.lproj/Localizable.strings | Adds "Servers" string for entity picker server filter |
| Sources/App/Settings/EntityPicker/EntityPicker.swift | Converts to bottom sheet presentation, adds inline search field, adds server filter, removes NavigationView wrapper |
| Sources/App/Settings/MagicItem/Add/MagicItemAddView.swift | Adds bottom sheet presentation detents and makes close button macCatalyst-only |
Introduces a reset filters button that appears when filters are active, allowing users to quickly revert filters (except server) to their default values. Also updates EntityRowView to use a gray icon color instead of the primary color.
Introduced a Style enum to EntityFilterPickerView, allowing for 'compact' and 'descriptionContent' display modes. Updated the view's initializer and body to support the new style, and refactored the preview to showcase both styles. Also added a transition to the resetFiltersButton in EntityPicker for smoother UI updates.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4278 +/- ##
=======================================
Coverage ? 43.11%
=======================================
Files ? 261
Lines ? 15094
Branches ? 0
=======================================
Hits ? 6508
Misses ? 8586
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes