Skip to content

[Bug]: Android Subscription usage widget can no longer be resized smaller than 4×3 #15225

Description

@tris203

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. Install a T3 Code Android build that includes feat(mobile): render the Android subscription widget with expo-widgets #12046 (2.0.0, or any nightly from 2026-10-01 onwards).
  2. Add the Subscription usage widget to the home screen. It is placed at 4×3.
  3. Long-press the widget and drag the resize handles inwards.

Expected behavior

The widget shrinks below its default size, as it did before #12046. The old widget declared a resize floor of 180×130dp.

Actual behavior

The widget can be made larger but not smaller than its default 250×180dp footprint. The resize floor is now the same as the default size.

Impact

Users who kept the widget at a smaller size can no longer do so, and a 4×3 block is the minimum home-screen space it can occupy.

Version or commit

main at 18b2132. Introduced by #12046 (e41755cf8a), first shipped in v0.0.45-nightly.20261001.2552.

This surfaced at the same time as the orchestrator V2 merge (#2829, one day later), but that commit does not touch any widget file.

Root cause

#12046 replaced the hand-written AppWidgetProvider with expo-widgets. Its description says the new android config block mirrors the old widget info XML, but two attributes had no equivalent and were dropped.

Before (apps/mobile/modules/t3-subscription-widget/android/src/main/res/xml/t3_subscription_widget_info.xml at e41755cf8a^):

<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
  android:minWidth="250dp" android:minHeight="180dp"
  android:minResizeWidth="180dp" android:minResizeHeight="130dp"
  android:targetCellWidth="4" android:targetCellHeight="3"
  android:resizeMode="horizontal|vertical" android:widgetCategory="home_screen"
  android:updatePeriodMillis="1800000"
  android:description="@string/t3_subscription_widget_description"
  android:initialLayout="@layout/t3_subscription_widget"
  android:previewLayout="@layout/t3_subscription_widget" />

After (subscription_usage_info.xml, produced by running expo-widgets 58.0.11's own withAndroidWidgetFiles generator against the android block in apps/mobile/app.config.ts):

<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
  android:minWidth="250dp"
  android:minHeight="180dp"
  android:targetCellWidth="4"
  android:targetCellHeight="3"
  android:updatePeriodMillis="0"
  android:initialLayout="@layout/expo_widgets_initial_layout"
  android:description="@string/subscription_usage_description"
  android:resizeMode="horizontal|vertical"
  android:widgetCategory="home_screen" />

minResizeWidth and minResizeHeight are gone. When they are absent, Android uses minWidth/minHeight as the floor. From AppWidgetServiceImpl.parseAppWidgetProviderInfo in AOSP:

info.minResizeWidth = value != null ? value.data : info.minWidth;
...
info.minResizeHeight = value != null ? value.data : info.minHeight;

So the floor moved from 180×130dp to 250×180dp. resizeMode is unchanged, which is why growing still works.

This cannot be fixed with plugin options alone:

  • WidgetConfig.android in expo-widgets only accepts minWidth, minHeight, targetCellWidth, targetCellHeight, resizeMode and initialLayout. The XML template is a fixed string. This is true of 58.0.11 (pinned) and 58.0.12 (current next).
  • patches/expo-widgets@58.0.11.patch does not touch the Android plugin.

The dropped previewLayout in the same diff is #15158, so the two share a cause.

Options

Approach Change Trade-off
Lower minWidth/minHeight to 180/130 (suggested) Two numbers in app.config.ts Restores the old floor exactly. On Android 12+ the default placement stays 4×3 because targetCellWidth/targetCellHeight take precedence. On Android 7–11, where targetCell* is ignored, the widget would be placed at the smaller size by default.
Config plugin that adds minResizeWidth/minResizeHeight to the generated XML New plugin registered before expo-widgets, like withWidgetLogoAsset.cjs Exact restoration on every Android version, but new machinery for two attributes. Worth it if #15158 goes the previewLayout route, since that needs the same plugin and both attributes could be set in one place.
Extend patches/expo-widgets@58.0.11.patch to add the fields to the plugin Patch compiled plugin/build JS and types Has to be re-rolled on every expo-widgets bump (58.0.12 is already out). Better proposed upstream than carried locally.

The layout also needs to cope with the smaller size

Restoring the floor alone will let the widget shrink into a size its content does not fit:

  • The old widget put its rows in a ListView (made scrollable in fix(mobile): make Android subscription usage widgets scrollable #13474), so anything that did not fit could be scrolled.
  • The new layout in apps/mobile/src/widgets/SubscriptionUsage.android.tsx is a fixed Column that always shows up to two quotas per provider plus a footer. Its own comment says it is sized for the 4×3 default cell.
  • It cannot adapt to size from JS: on Android, getWidgetEnvironment only passes colorScheme and Material colours, not the widget's dimensions.

The expo-widgets Android runtime does support LazyColumnView, so wrapping the provider list in a lazy column would bring back scrolling. I have not tested how the current layout renders at 180×130dp.

Environment

Traced from source; I have not captured a device recording. expo-widgets 58.0.11, Expo 58.0.2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions