Skip to content

Fix ConfirmationDialog preview and add a preview default for LocalTextureStore - #138

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_1028496274
Nov 26, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_1028496274

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Fix ConfirmationDialog preview and add a preview default for LocalTextureStore

  • LocalTextureStore.kt: switch staticCompositionLocalOf to
    compositionLocalWithComputedDefaultOf so Compose previews (LocalInspectionMode)
    fall back to CahierTextureBitmapStore(LocalContext.currentValue) without a
    provider, while the app continues to fail fast with "No TextureStore provided"
    at runtime. (DrawingCanvasPreview renders with this default, whereas the two
    Ink previews DrawingSurfacePreview and DrawingDetailThumbnailPreview do
    not render yet because host-JVM Compose previews cannot load libink.so.)
  • ConfirmationDialog.kt: wrap ConfirmationDialogPreview in CahierAppTheme
    and set explicit preview dimensions (@Preview(widthDp = 360, heightDp = 280))
    so the Material 3 AlertDialog window renders inside the preview canvas with
    zero changes to production ConfirmationDialog.

@copybara-service
copybara-service Bot force-pushed the test_1028496274 branch 3 times, most recently from 9ac547d to 252fff8 Compare November 26, 2026 06:10
@copybara-service copybara-service Bot changed the title Fix Compose previews for ConfirmationDialog and LocalTextureStore. Fix ConfirmationDialog preview and add a preview default for LocalTextureStore Nov 26, 2026
…tureStore

- `LocalTextureStore.kt`: switch `staticCompositionLocalOf` to
  `compositionLocalWithComputedDefaultOf` so Compose previews (`LocalInspectionMode`)
  fall back to `CahierTextureBitmapStore(LocalContext.currentValue)` without a
  provider, while the app continues to fail fast with `"No TextureStore provided"`
  at runtime. (`DrawingCanvasPreview` renders with this default, whereas the two
  Ink previews `DrawingSurfacePreview` and `DrawingDetailThumbnailPreview` do
  not render yet because host-JVM Compose previews cannot load `libink.so`.)
- `ConfirmationDialog.kt`: wrap `ConfirmationDialogPreview` in `CahierAppTheme`
  and set explicit preview dimensions (`@Preview(widthDp = 360, heightDp = 280)`)
  so the Material 3 `AlertDialog` window renders inside the preview canvas with
  zero changes to production `ConfirmationDialog`.

PiperOrigin-RevId: 1030431100
@copybara-service
copybara-service Bot merged commit 4034c85 into main Nov 26, 2026
2 checks passed
@copybara-service
copybara-service Bot deleted the test_1028496274 branch November 26, 2026 06:41
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.

0 participants