Skip to content

Display entity picker as bottom sheet#4278

Merged
bgoncal merged 13 commits intomainfrom
picker-sheet
Jan 30, 2026
Merged

Display entity picker as bottom sheet#4278
bgoncal merged 13 commits intomainfrom
picker-sheet

Conversation

@bgoncal
Copy link
Copy Markdown
Member

@bgoncal bgoncal commented Jan 29, 2026

Summary

Screenshots

CleanShot 2026-01-30 at 11 00 58@2x

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

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.
@bgoncal bgoncal marked this pull request as ready for review January 30, 2026 09:10
Copilot AI review requested due to automatic review settings January 30, 2026 09:10
@bgoncal bgoncal self-assigned this Jan 30, 2026
@bgoncal bgoncal added watch The Apple Watch app and complications CarPlay widgets labels Jan 30, 2026
Replaces the hardcoded search placeholder in EntityPicker with a localized string and adds the corresponding key to Localizable.strings.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

Comment thread Sources/App/Settings/EntityPicker/EntityPicker.swift
Comment thread Sources/App/Settings/MagicItem/Add/MagicItemAddView.swift
Comment thread Sources/App/Settings/EntityPicker/EntityPicker.swift
Comment thread Sources/App/Settings/EntityPicker/EntityPicker.swift
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.
@bgoncal bgoncal enabled auto-merge (squash) January 30, 2026 10:07
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@fc06463). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bgoncal bgoncal merged commit cd502a3 into main Jan 30, 2026
15 checks passed
@bgoncal bgoncal deleted the picker-sheet branch January 30, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CarPlay cla-signed watch The Apple Watch app and complications widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants