android: add omni-search entry point and pill morph
Add the fourth Search destination to the floating bottom container and morph that container into the omni-search field. - PipelinesApp: the destination pill gains a Search icon; tapping it animates the icons out and turns the same Surface into a focused text field whose size and position derive from the pill's own layout and the window insets rather than fixed pill sizes. Back, the back gesture and a scrim tap play the reverse and restore the pill with its previous destination still selected. The open field covers the content behind a scrim and shows a results panel above it. - OmniSearch: pure state model (open/focused/query) with the open, dismiss, focus and query transitions and a Bundle-able Saver, so an open field survives a saved-state round trip. - OmniSearchResults / SearchResultsPanel: map the typed search reply to rows and render the ranked results, keeping the last accepted results while a newer query loads and reporting a failure without blanking. - AppViewModel / PipelinesRepository: drive queries over the existing transport with debounce and reply ordering; the server search command arrives in a later item, so a reply is classified by envelope type and a non-search_results reply is reported with a clear message instead of being mis-parsed, never a crash. - Message: SEARCH / SEARCH_RESULTS constants and the SearchRequest, SearchResponse and per-kind result payloads. - AndroidManifest: adjustNothing so the app reads the IME from Compose window insets and the field is not cleared twice by a window resize. - Dimens: spacing for the search surface. - Unit tests for the state model (pill, opening, focused, dismissed and restored after the Saver round trip) and for the result-row mapping.
This commit is contained in:
@@ -18,11 +18,21 @@
|
||||
unencrypted ws:// on a trusted LAN/VPN. It is deliberately broad because
|
||||
the user types an arbitrary host. Do not expose the server to the internet.
|
||||
-->
|
||||
<!--
|
||||
adjustNothing: the app reads the IME from the Compose window insets
|
||||
(paneSafeArea / WindowInsets.safeDrawing) everywhere, so the window
|
||||
must not also be resized or panned for the soft input. The default
|
||||
(adjustUnspecified) resized the window on the Pixel 10 Pro Fold for
|
||||
the omni-search field, which is not inside a scrollable parent, and
|
||||
the field then cleared the IME twice (once by the window resize, once
|
||||
by the Compose inset) and floated above the keyboard.
|
||||
-->
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.Pipelines">
|
||||
android:theme="@style/Theme.Pipelines"
|
||||
android:windowSoftInputMode="adjustNothing">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
||||
Reference in New Issue
Block a user