Skip to content

feat(android): wire up block inserter search and tab filtering#478

Open
jkmassel wants to merge 1 commit intojkmassel/android-block-pickerfrom
jkmassel/block-picker-search
Open

feat(android): wire up block inserter search and tab filtering#478
jkmassel wants to merge 1 commit intojkmassel/android-block-pickerfrom
jkmassel/block-picker-search

Conversation

@jkmassel
Copy link
Copy Markdown
Contributor

@jkmassel jkmassel commented Apr 28, 2026

Summary

Activates the tab chips and search field shipped as a non-functional shell in #469 — keeps the visual layer untouched, only adds behavior.

  • Tab filter — selecting a category narrows the grid to a fixed id allowlist per InserterTab. The Recent tab surfaces the payload's gbk-most-used section when present, otherwise all blocks.
  • Search — debounced 150ms, runs over the active tab's slice. Fuzzy scorer in BlockSearch.kt weights name/title/keyword/category matches.
  • Empty state — renders No results / No blocks match "X" when the filter yields nothing.

Stacked on #461; rebase onto trunk once that lands.

Test plan

  • Open the inserter on the sample app
  • Verify each tab chip shows appropriate blocks
  • Type a multi-character query quickly — confirm the debounce holds the grid steady mid-type and it settles once after you stop
  • Type a query that matches nothing — confirm empty-state copy renders
  • Clear the search — confirm the active tab's blocks come back
  • ./gradlew :Gutenberg:detekt :Gutenberg:assembleDebug :Gutenberg:testDebugUnitTest passes

@github-actions github-actions Bot added the [Type] Enhancement A suggestion for improvement. label Apr 28, 2026
@jkmassel jkmassel marked this pull request as draft April 28, 2026 19:34
jkmassel added a commit that referenced this pull request Apr 28, 2026
Compose-based bottom sheet that replaces the legacy WebView block picker.
Variation B handoff: drag handle + header, tonal Material 3 palette
(dynamic on API 31+, brand-seeded fallback below), 5-column tile grid
with auto-shrinking labels, scrollable category-tab chips, and a rounded
search field.

Block tiles render plain tonal rounded-rect placeholders for now —
SVG icon rendering lands in #468 (which adds `SvgIconCache` and pipes
`iconForeground` through the JS payload + iOS/Android models). This PR
deliberately stops at the shell so #468 can be reviewed independently.

Tab filter, search filter, photo/camera tiles, and recent-photo strip
ship in #478 / #479 — the chips and search bar are intentionally
non-functional in this PR so the visual shell can be reviewed in
isolation.
@jkmassel jkmassel force-pushed the jkmassel/block-picker-organize branch from 7333438 to 43be5d0 Compare April 28, 2026 19:37
@jkmassel jkmassel force-pushed the jkmassel/block-picker-search branch from 4a59e17 to b376df6 Compare April 28, 2026 19:38
@jkmassel jkmassel force-pushed the jkmassel/block-picker-organize branch from 43be5d0 to bfc85d9 Compare April 28, 2026 19:43
@jkmassel jkmassel changed the base branch from jkmassel/block-picker-organize to jkmassel/block-picker-organize-impl April 28, 2026 19:44
jkmassel added a commit that referenced this pull request Apr 28, 2026
Compose-based bottom sheet that replaces the legacy WebView block picker.
Variation B handoff: drag handle + header, tonal Material 3 palette
(dynamic on API 31+, brand-seeded fallback below), 5-column tile grid
with auto-shrinking labels, scrollable category-tab chips, and a rounded
search field.

Block tiles render plain tonal rounded-rect placeholders for now —
SVG icon rendering lands in #468 (which adds `SvgIconCache` and pipes
`iconForeground` through the JS payload + iOS/Android models). This PR
deliberately stops at the shell so #468 can be reviewed independently.

Tab filter, search filter, photo/camera tiles, and recent-photo strip
ship in #478 / #479 — the chips and search bar are intentionally
non-functional in this PR so the visual shell can be reviewed in
isolation.
@jkmassel jkmassel force-pushed the jkmassel/block-picker-organize-impl branch from 43be5d0 to d2a4a4c Compare April 28, 2026 19:58
@jkmassel jkmassel force-pushed the jkmassel/block-picker-search branch from b376df6 to 85c3e19 Compare April 28, 2026 19:58
jkmassel added a commit that referenced this pull request Apr 28, 2026
Compose-based bottom sheet that replaces the legacy WebView block picker.
Variation B handoff: drag handle + header, tonal Material 3 palette
(dynamic on API 31+, brand-seeded fallback below), 5-column tile grid
with auto-shrinking labels, scrollable category-tab chips, and a rounded
search field.

Block tiles render plain tonal rounded-rect placeholders for now —
SVG icon rendering lands in #468 (which adds `SvgIconCache` and pipes
`iconForeground` through the JS payload + iOS/Android models). This PR
deliberately stops at the shell so #468 can be reviewed independently.

Tab filter, search filter, photo/camera tiles, and recent-photo strip
ship in #478 / #479 — the chips and search bar are intentionally
non-functional in this PR so the visual shell can be reviewed in
isolation.
@jkmassel jkmassel force-pushed the jkmassel/block-picker-organize-impl branch from d2a4a4c to b067ac2 Compare April 28, 2026 20:03
@jkmassel jkmassel force-pushed the jkmassel/block-picker-search branch from 85c3e19 to af3ecac Compare April 28, 2026 20:06
jkmassel added a commit that referenced this pull request Apr 28, 2026
Compose-based bottom sheet that replaces the legacy WebView block picker.
Variation B handoff: drag handle + header, tonal Material 3 palette
(dynamic on API 31+, brand-seeded fallback below), 5-column tile grid
with auto-shrinking labels, scrollable category-tab chips, and a rounded
search field.

Block tiles render plain tonal rounded-rect placeholders for now —
SVG icon rendering lands in #468 (which adds `SvgIconCache` and pipes
`iconForeground` through the JS payload + iOS/Android models). This PR
deliberately stops at the shell so #468 can be reviewed independently.

Tab filter, search filter, photo/camera tiles, and recent-photo strip
ship in #478 / #479 — the chips and search bar are intentionally
non-functional in this PR so the visual shell can be reviewed in
isolation.
@jkmassel jkmassel force-pushed the jkmassel/block-picker-organize-impl branch from b067ac2 to 180a9b7 Compare April 28, 2026 20:12
@jkmassel jkmassel force-pushed the jkmassel/block-picker-search branch from af3ecac to 8b8ad89 Compare April 28, 2026 20:12
jkmassel added a commit that referenced this pull request Apr 29, 2026
Compose-based bottom sheet that replaces the legacy WebView block picker.
Variation B handoff: drag handle + header, tonal Material 3 palette
(dynamic on API 31+, brand-seeded fallback below), 5-column tile grid
with auto-shrinking labels, scrollable category-tab chips, and a rounded
search field.

Block tiles render plain tonal rounded-rect placeholders for now —
SVG icon rendering lands in #468 (which adds `SvgIconCache` and pipes
`iconForeground` through the JS payload + iOS/Android models). This PR
deliberately stops at the shell so #468 can be reviewed independently.

Tab filter, search filter, photo/camera tiles, and recent-photo strip
ship in #478 / #479 — the chips and search bar are intentionally
non-functional in this PR so the visual shell can be reviewed in
isolation.
Base automatically changed from jkmassel/block-picker-organize-impl to jkmassel/android-block-picker April 29, 2026 16:18
jkmassel added a commit that referenced this pull request Apr 29, 2026
Compose-based bottom sheet that replaces the legacy WebView block picker.
Variation B handoff: drag handle + header, tonal Material 3 palette
(dynamic on API 31+, brand-seeded fallback below), 5-column tile grid
with auto-shrinking labels, scrollable category-tab chips, and a rounded
search field.

Block tiles render plain tonal rounded-rect placeholders for now —
SVG icon rendering lands in #468 (which adds `SvgIconCache` and pipes
`iconForeground` through the JS payload + iOS/Android models). This PR
deliberately stops at the shell so #468 can be reviewed independently.

Tab filter, search filter, photo/camera tiles, and recent-photo strip
ship in #478 / #479 — the chips and search bar are intentionally
non-functional in this PR so the visual shell can be reviewed in
isolation.
@jkmassel jkmassel force-pushed the jkmassel/android-block-picker branch from dfaf054 to 4067726 Compare April 29, 2026 17:50
@jkmassel jkmassel force-pushed the jkmassel/block-picker-search branch 3 times, most recently from 1154284 to d8ae56e Compare April 29, 2026 19:51
@jkmassel jkmassel changed the base branch from jkmassel/android-block-picker to jkmassel/svg-render-wire April 29, 2026 19:51
@jkmassel jkmassel requested a review from adalpari April 29, 2026 21:54
@jkmassel jkmassel marked this pull request as ready for review April 29, 2026 22:03
Base automatically changed from jkmassel/svg-render-wire to jkmassel/android-block-picker April 30, 2026 15:33
Activates the chips and search field shipped as a non-functional shell
in the previous PR. Tab selection narrows the grid to a fixed set of
block ids per category (Text/Media/Design/Widgets/Theme/Embeds), and
the Recent tab surfaces blocks from the payload's `gbk-most-used`
section when present, falling back to all blocks otherwise.

Search runs against the active tab's results with a 150ms debounce and
a fuzzy scorer that weights name/title/keyword/category matches. Empty
result sets render the No results / "No blocks match X" copy.
@jkmassel jkmassel force-pushed the jkmassel/block-picker-search branch from d8ae56e to 79c5380 Compare April 30, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant