Skip to content

feat(widgets): intro and gallery sheet#972

Open
ovitrif wants to merge 22 commits into
masterfrom
feat/add-widget-bottom-sheets
Open

feat(widgets): intro and gallery sheet#972
ovitrif wants to merge 22 commits into
masterfrom
feat/add-widget-bottom-sheets

Conversation

@ovitrif
Copy link
Copy Markdown
Collaborator

@ovitrif ovitrif commented May 26, 2026

Closes #966

Description

This PR:

  1. Adds the one-time Widgets intro screen and in-sheet flow, routeing the drawer Widgets entry to either the intro or the wallet overview widgets section based on whether the intro has been seen.
  2. Moves the Add Widget gallery plus widget preview/edit screens into a large gradient-backed bottom sheet with internal in-sheet navigation.
  3. Updates the Add Widget gallery to match the Figma v61 layout, including large sheet sizing, scrolling behavior, equal picker card heights, reused widget preview components, and reliable full-card taps.
  4. Rewires save/edit/back behavior so selected widgets save through the existing widget flow, append to the current widget set, and navigation lands on the wallet overview widgets section afterwards.
  5. Adds the widget flow journeys for android-cli, Compose/navigation coverage, and the changelog fragment for this user-facing change.

Preview

addwidget.mp4

QA Notes

Hint: Use the new "Reset Widgets intro flag" from Dev Settings to retest the intro screen and its wiring.

Manual Tests

  • 1. Drawer → Widgets with intro unseen: Widgets Intro opens with "Hello, Widgets", "View & Organize", and "Add Widget" visible.
  • 2. Widgets Intro → Add Widget → Bitcoin Weather → Save Widget: Add Widget opens as an in-sheet gallery, the intro remains visible behind the backdrop, Weather preview opens in-sheet, and save lands on the wallet overview widgets section with Bitcoin Weather appended last.
  • 3. Widgets Intro → View & Organize: lands on the wallet overview widgets section.
  • 4. Drawer → Widgets with intro already seen: wallet overview widgets section opens directly and "Hello, Widgets" intro screen is not visible.
  • 5. Wallet Overview widgets section → Add Widget → scroll to Bitcoin Calculator → tap card: the large Add Widget sheet scrolls without content hiding behind the sheet top area, and Calculator preview opens in-sheet.
  • 6. regression: Add Widget gallery → tap the Bitcoin Price chart line and Bitcoin Headlines content: both open their in-sheet preview, with no chart tooltip or external URL open.

Automated Checks

  • Compose UI tests added/updated for Widgets intro actions, drawer Widgets routing, Add Widget gallery layout/scrolling/safe-area behavior, reliable picker taps, and converted sheet previews.
  • Unit coverage added for widget route mapping in app/src/test/java/to/bitkit/ui/sheets/WidgetsRouteTest.kt.
  • Android CLI journeys added under journeys/widgets/ for widgets intro and add widgets flow.
  • Ran ./gradlew compileDevDebugKotlin compileDevDebugAndroidTestKotlin detekt testDevDebugUnitTest.
  • Ran ./gradlew connectedDevDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=to.bitkit.ui.screens.widgets.AddWidgetsSheetContentTest.

@ovitrif ovitrif self-assigned this May 26, 2026
@ovitrif ovitrif changed the title feat: add widget sheet flow feat: add widget gallery sheet May 28, 2026
@ovitrif ovitrif changed the title feat: add widget gallery sheet feat(widgets): intro and galley bottom sheet May 28, 2026
@ovitrif ovitrif changed the title feat(widgets): intro and galley bottom sheet feat(widgets): intro and gallery sheet May 28, 2026
@ovitrif ovitrif marked this pull request as ready for review May 28, 2026 00:41
@ovitrif ovitrif requested review from jvsena42 and piotr-iohk May 28, 2026 00:41
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 786e4c67dd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/src/main/java/to/bitkit/ui/components/DrawerMenu.kt Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0d7a07c0d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/src/main/java/to/bitkit/ui/sheets/WidgetsSheet.kt Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e1242fc8ed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

val navController = rememberNavController()
val onDismiss = app::hideSheet
val onDone = {
app.hideSheet()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid cancelling widget saves on close

When a user saves or deletes a non-price widget from the new sheet, the preview handlers call the ViewModel method and then onClose() immediately (for example SuggestionsPreviewScreen does addWidget() then closes). This app.hideSheet() removes WidgetsSheet, and the sheet-scoped ViewModelStore is cleared on disposal, cancelling those viewModelScope.launch { widgetsRepo.addWidget/deleteWidget(...) } jobs before the suspend DataStore update reliably finishes, so saving/deleting widgets from the sheet can be lost. Keep the sheet alive until the repository operation completes, or move the operation to a scope that is not cleared by dismissing the sheet.

Useful? React with 👍 / 👎.

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.

[Feature]: add widget intro and add-widget grid

1 participant