Skip to content

feat(android): add native block inserter (UI shell)#480

Merged
jkmassel merged 1 commit intojkmassel/android-block-pickerfrom
jkmassel/block-picker-organize-impl
Apr 29, 2026
Merged

feat(android): add native block inserter (UI shell)#480
jkmassel merged 1 commit intojkmassel/android-block-pickerfrom
jkmassel/block-picker-organize-impl

Conversation

@jkmassel
Copy link
Copy Markdown
Contributor

@jkmassel jkmassel commented Apr 28, 2026

Summary

Inserter, full-height, light Inserter, full-height, dark
Light mode Dark mode

Test plan

  • Inserter opens, 5-column grid renders, long labels auto-shrink instead of wrapping
  • Dark mode + Android 12+ dynamic color render correctly
  • ./gradlew :Gutenberg:detekt :Gutenberg:assembleDebug passes

@github-actions github-actions Bot added the [Type] Enhancement A suggestion for improvement. label Apr 28, 2026
Base automatically changed from jkmassel/block-picker-organize to jkmassel/android-block-picker April 28, 2026 19:52
@jkmassel jkmassel force-pushed the jkmassel/block-picker-organize-impl branch 2 times, most recently from d2a4a4c to b067ac2 Compare April 28, 2026 20:03
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 requested a review from adalpari April 28, 2026 20:13
Copy link
Copy Markdown

@adalpari adalpari left a comment

Choose a reason for hiding this comment

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

Looks good!

@jkmassel jkmassel merged commit d039e12 into jkmassel/android-block-picker Apr 29, 2026
18 checks passed
@jkmassel jkmassel deleted the jkmassel/block-picker-organize-impl branch April 29, 2026 16:18
jkmassel added a commit that referenced this pull request Apr 29, 2026
Adds the `@JavascriptInterface showBlockInserter(String)` entry point on
`GutenbergView` plus the `presentBlockInserter` / `insertBlock` /
`dismissBlockInserter` round-trip back to JS via
`window.blockInserter.insertBlock` / `onClose`. Bad payloads surface a
Toast (from `R.string.gbk_block_inserter_failure`) so a broken tap isn't
silent. Sets `resourcePrefix = "gbk_"` so AGP flags any unprefixed
library resource at lint time.

The dialog itself lands in #480; this commit only wires the bridge so
that PR can build atop it.
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.
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.

2 participants