You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Android Subscription usage widget can no longer be resized smaller than 4×3 #15225
Add the Subscription usage widget to the home screen. It is placed at 4×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^):
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):
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 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.
Before submitting
Area
apps/mobile
Steps to reproduce
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
mainat 18b2132. Introduced by #12046 (e41755cf8a), first shipped inv0.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
AppWidgetProviderwithexpo-widgets. Its description says the newandroidconfig 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.xmlate41755cf8a^):After (
subscription_usage_info.xml, produced by runningexpo-widgets58.0.11's ownwithAndroidWidgetFilesgenerator against theandroidblock inapps/mobile/app.config.ts):minResizeWidthandminResizeHeightare gone. When they are absent, Android usesminWidth/minHeightas the floor. FromAppWidgetServiceImpl.parseAppWidgetProviderInfoin AOSP:So the floor moved from 180×130dp to 250×180dp.
resizeModeis unchanged, which is why growing still works.This cannot be fixed with plugin options alone:
WidgetConfig.androidinexpo-widgetsonly acceptsminWidth,minHeight,targetCellWidth,targetCellHeight,resizeModeandinitialLayout. The XML template is a fixed string. This is true of 58.0.11 (pinned) and 58.0.12 (currentnext).patches/expo-widgets@58.0.11.patchdoes not touch the Android plugin.The dropped
previewLayoutin the same diff is #15158, so the two share a cause.Options
minWidth/minHeightto 180/130 (suggested)app.config.tstargetCellWidth/targetCellHeighttake precedence. On Android 7–11, wheretargetCell*is ignored, the widget would be placed at the smaller size by default.minResizeWidth/minResizeHeightto the generated XMLexpo-widgets, likewithWidgetLogoAsset.cjspreviewLayoutroute, since that needs the same plugin and both attributes could be set in one place.patches/expo-widgets@58.0.11.patchto add the fields to the pluginplugin/buildJS and typesexpo-widgetsbump (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:
ListView(made scrollable in fix(mobile): make Android subscription usage widgets scrollable #13474), so anything that did not fit could be scrolled.apps/mobile/src/widgets/SubscriptionUsage.android.tsxis a fixedColumnthat always shows up to two quotas per provider plus a footer. Its own comment says it is sized for the 4×3 default cell.getWidgetEnvironmentonly passescolorSchemeand Material colours, not the widget's dimensions.The
expo-widgetsAndroid runtime does supportLazyColumnView, 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-widgets58.0.11, Expo 58.0.2.