Skip to content

Add data type screens to Android example app#1191

Draft
jkmassel wants to merge 13 commits intoadd/wpcom-oauth-loginfrom
add/android-data-screens
Draft

Add data type screens to Android example app#1191
jkmassel wants to merge 13 commits intoadd/wpcom-oauth-loginfrom
add/android-data-screens

Conversation

@jkmassel
Copy link
Contributor

@jkmassel jkmassel commented Feb 24, 2026

Summary

Build out the Android example app's site screen with screens for all major WordPress data types, including error handling and empty states.

  • Add screens for Comments, Media, Search, Settings, Site Health, Themes, and more
  • Add loading states and infinite-scroll pagination across all data type screens
  • Dynamically discover post types and taxonomies from the site's REST API
  • Group site screen items into Posts, Taxonomies, Navigation, and System sections
  • Remove hardcoded Pages screen in favor of dynamic post type discovery
  • Add Application Passwords management screen
  • Add shared ErrorMessage and EmptyState composables with WpRequestResult.errorDescription() for human-readable error messages
  • Surface API errors and empty-but-successful results across all screens

Depends on #1190.

Test plan

  • Android example app builds (./gradlew :example:composeApp:assembleDebug)
  • Data type screens load and paginate correctly
  • Dynamic post types and taxonomies appear on the site screen
  • Error messages appear when API requests fail
  • Empty state text appears for screens with no data

🤖 Generated with Claude Code

@jkmassel jkmassel force-pushed the add/android-data-screens branch from 45ca4a8 to d464811 Compare February 24, 2026 23:25
@jkmassel jkmassel force-pushed the add/wpcom-oauth-login branch from 9d527ca to 8cc368f Compare February 24, 2026 23:39
@jkmassel jkmassel force-pushed the add/android-data-screens branch from d464811 to 672f801 Compare February 24, 2026 23:39
@jkmassel jkmassel force-pushed the add/wpcom-oauth-login branch from 8cc368f to 52a0ea4 Compare February 25, 2026 06:57
@jkmassel jkmassel force-pushed the add/android-data-screens branch from 672f801 to 515ed2e Compare February 25, 2026 06:58
@jkmassel jkmassel force-pushed the add/wpcom-oauth-login branch from 52a0ea4 to 7a5a5dd Compare February 25, 2026 16:25
@jkmassel jkmassel force-pushed the add/android-data-screens branch from 515ed2e to 4dac102 Compare February 25, 2026 16:26
@jkmassel jkmassel force-pushed the add/wpcom-oauth-login branch from 7a5a5dd to e9012f6 Compare February 25, 2026 16:29
@jkmassel jkmassel force-pushed the add/android-data-screens branch from 4dac102 to 70b622a Compare February 25, 2026 16:29
@jkmassel jkmassel force-pushed the add/wpcom-oauth-login branch 4 times, most recently from 4121579 to c0c5a51 Compare February 26, 2026 02:01
@jkmassel jkmassel force-pushed the add/android-data-screens branch from ea6253e to e42e964 Compare February 26, 2026 02:01
@jkmassel jkmassel force-pushed the add/wpcom-oauth-login branch from c0c5a51 to 2afdce4 Compare February 26, 2026 03:14
@jkmassel jkmassel force-pushed the add/android-data-screens branch from 1737088 to bfb70ed Compare February 26, 2026 03:16
@jkmassel jkmassel force-pushed the add/wpcom-oauth-login branch from 2afdce4 to 68fc01e Compare February 26, 2026 17:09
@jkmassel jkmassel force-pushed the add/android-data-screens branch from bfb70ed to 921ceb4 Compare February 26, 2026 17:10
@jkmassel jkmassel force-pushed the add/wpcom-oauth-login branch from 68fc01e to 9c77848 Compare February 26, 2026 17:12
@jkmassel jkmassel force-pushed the add/android-data-screens branch from 921ceb4 to 518cbe1 Compare February 26, 2026 17:12
@jkmassel jkmassel force-pushed the add/wpcom-oauth-login branch from 9c77848 to bf781f0 Compare February 26, 2026 18:26
jkmassel and others added 9 commits February 26, 2026 11:26
Migrate Kotlin example app to AccountRepository with encrypted
credential storage. Add WP.com OAuth login flow, swipe-to-delete
for saved sites, and remove hardcoded site URL from login screen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Me, Site, Bot Conversations, and Support Conversations screens
for WP.com-authenticated sites.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add screens and view models for categories, tags, pages, comments,
media, themes, site settings, search, and site health. Wire them
into the site screen navigation and update App.kt to use a shared
WpApiClient instance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract a reusable LoadingIndicator component and add isLoading
StateFlow to UserListViewModel and PluginListViewModel. Each screen
shows a centered spinner while data is being fetched.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ViewModels now accumulate items across pages using nextPageParams from
the API response. Screens detect when the user scrolls near the bottom
and automatically trigger the next page load. A shared LoadingMoreIndicator
component shows a footer spinner during pagination.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mirrors the iOS app's entity grouping pattern with section headers.
Also extracts repeated ListItem boilerplate into SectionHeader and
NavigationItem composables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fetches post types from the API and filters to those visible in nav
menus that support title, author, and custom fields – matching the
iOS app's behaviour. Each discovered post type appears under the
Posts section header and navigates to a generic post list screen
with infinite-scroll pagination.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace hardcoded Categories/Tags screens with dynamic taxonomy discovery
(filtered by showInNavMenus) and a generic TermListByTypeScreen. Add
Navigation section with screens for Navigations, Menus, Menu Items, and
Menu Locations, bringing the Android app to parity with iOS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pages are covered by dynamic post type discovery. Add Application
Passwords screen under System section, fetching the current user ID
via retrieveMe before listing their passwords.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jkmassel and others added 4 commits February 26, 2026 11:26
… load

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add shared ErrorMessage and EmptyState composables with a
WpRequestResult.errorDescription() extension for human-readable
messages. Surface API errors and empty-but-successful results
across all 16 screens via a new error StateFlow in each view model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…sage.kt

The errorDescription() extension function referenced requestMethod and
requestUrl properties that do not exist on WpRequestResult variants.
These fields were added on a separate branch (add/request-context-in-errors)
but are not yet available here. Remove the references so the Android
example app compiles successfully.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jkmassel jkmassel force-pushed the add/android-data-screens branch from 518cbe1 to a5c3ea3 Compare February 26, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant