Skip to content

Conversation

CDRussell
Copy link
Member

@CDRussell CDRussell commented Sep 23, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/project/608920331025315/task/1211407036705134?focus=true

Description

Adds UI to the bookmarks import flow, as well as a few more options in internal dev settings for testing them.

  • This is still only accessible via Autofill Dev Settings screen (i.e., doesn't allow for flow to start in production)
Screenshot_20251007_125809

Steps to test this PR

  • Suggested logcat filter: Bookmark-import
  • Perform a clean install on this branch, using internal build type

Pre-import dialog

  • In Autofill Dev Settings, tap on Launch Bookmarks import flow (with preimport dialog)
  • Verify you see the dialog
Screenshot_20251007_125940
  • Verify you can cancel the dialog using the back button, the X button and by tapping outside of it
  • In the dialog, tap Import Now and verify it launches the web flow

Web Flow, cancellations

Carrying on from the previous test

  • Tap the X button, verifying you are prompted if you're sure you want to cancel. Choose Cancel Import
  • Verify the web flow ends, and you still see the pre-import dialog
  • Tap Import Now again, and this time use the back button, confirming you see the cancellation confirmation prompt

Web flow, from a logged out state

You should not be logged in to a Google account already (which should be true if you're following these steps)

  • Launch the web flow, verifying you can see the WebView asking you to sign into your Google account
  • Sign in, verifying the WebView is no longer visible and an in progress page shows instead
  • Wait for the flow to complete
  • (Optionally) You may be asked to sign in as the final step; if this happens, you should see the WebView again for it
  • Verify you see the success screen telling you how many bookmarks were imported

Web flow, from a signed in state

You should be logged in already to a Google account

  • Launch the web flow, verifying you do NOT see the WebView, and instead jump straight to the in-progress flow
  • Wait for the flow to complete
  • (Optionally) You may be asked to sign in as the final step; if this happens, you should see the WebView again for it
  • Verify you see the success screen telling you how many bookmarks were imported

Web flow, dev-only peeking at the WebView

  • Launch the web flow and while in the in-progress screen tap on the overflow debug menu to see the WebView
  • Verify the overlay hides and you can see the WebView automation

Copy link
Member Author

CDRussell commented Sep 23, 2025

@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 2 times, most recently from a039a47 to 3f8950c Compare September 23, 2025 13:25
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch from b3fac77 to a14e381 Compare September 24, 2025 09:18
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 2 times, most recently from 77c3176 to 791ae21 Compare September 24, 2025 10:44
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch 2 times, most recently from 1713a4f to cb2b5cb Compare September 24, 2025 10:49
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 2 times, most recently from 4614087 to 9f3b412 Compare September 24, 2025 10:54
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch from cb2b5cb to bde236b Compare September 24, 2025 10:54
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch from 9f3b412 to 17a6c44 Compare September 24, 2025 10:59
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch from bde236b to dfbcd8e Compare September 24, 2025 10:59
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch from 17a6c44 to e890ed7 Compare September 24, 2025 11:18
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch 2 times, most recently from 7f7ff4b to 2e9a36c Compare September 24, 2025 13:45
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch from e890ed7 to b217c11 Compare September 24, 2025 13:45
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch from 2e9a36c to 7ac6dca Compare September 24, 2025 14:18
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 2 times, most recently from 0003be7 to a714667 Compare September 25, 2025 13:35
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch from 7ac6dca to 49ab43d Compare September 25, 2025 13:35
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch from a714667 to a8e4b48 Compare September 26, 2025 10:49
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch 2 times, most recently from 566d0e5 to 2575f8d Compare September 26, 2025 14:15
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch from a8e4b48 to 8393d44 Compare September 26, 2025 14:15
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch from 2575f8d to ad5d7bf Compare September 26, 2025 14:22
@CDRussell CDRussell requested a review from Copilot October 3, 2025 15:35
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Implements the UI flow for importing bookmarks (pre‑import prompt, automated web flow progress overlay, success/error result screens) and wires it into internal dev settings plus supporting view models, navigation params, and tests.

  • Adds pre-import dialog, progress overlay, success/failure result fragments, and related string/drawable resources.
  • Updates web flow ViewModel/Fragment/Activity logic (page visibility handling, cancellation confirmation, result handling, new launch sources).
  • Extends tests and API enums to support bookmark import launch sources.

Reviewed Changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
autofill-internal/src/main/res/values/donottranslate.xml Added string for new pre-import dialog launch entry.
autofill-internal/src/main/res/layout/activity_autofill_internal_settings.xml Added dev settings entries for new bookmark import flows and simulated result screens.
AutofillInternalSettingsActivity.kt Integrated pre-import dialog, result handling, and success/error simulation launchers.
ImportGoogleBookmarksWebFlowViewModelTest.kt Added tests for URL handling visibility logic and revised back navigation behavior.
autofill-impl/src/main/res/values/donottranslate.xml Added comprehensive bookmark import UI strings (pre-import, progress, success, error).
fragment_import_bookmarks_result.xml New success/error result UI layout.
fragment_import_bookmarks_progress.xml New automation progress overlay layout.
content_import_bookmarks_from_google_success_state.xml Success state content layout.
content_import_bookmarks_from_google_preimport_dialog.xml Pre-import dialog layout.
info_24.xml New vector drawable (info icon).
bookmarks_import_128.xml New vector drawable (bookmark import artwork).
ImportPasswordsPixelSender.kt Formatting/parameter layout adjustments.
ImportFromGoogleBookmarksPreImportDialogViewModel.kt New ViewModel scaffolding (states for pre-import / success / error).
ImportFromGoogleBookmarksPreImportDialog.kt New pre-import bottom sheet dialog.
ImportGoogleBookmarksWebFlowViewModel.kt Added page visibility logic & cancellation prompt command.
ImportGoogleBookmarksWebFlowFragment.kt Added progress overlay communication, cancellation confirmation, and result emission adjustments.
ImportGoogleBookmarksWebFlowActivity.kt Orchestrates web flow, progress overlay, and result fragments; adds result activity params.
ImportGoogleBookmarksAutomationInProgressViewFragment.kt Progress overlay fragment.
ImportGoogleBookmarkResult.kt Added Unknown reason and parcelization adjustments.
ImportFinishedFragment.kt Result (success/error) fragment implementation.
AutofillCredentialDialogs.kt Added AutofillImportBookmarksLaunchSource enum & minor formatting.

@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch 9 times, most recently from 14c617a to 39a6424 Compare October 6, 2025 12:58
@CDRussell CDRussell requested a review from Copilot October 6, 2025 13:06
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 22 out of 23 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

autofill/autofill-impl/src/main/res/values/donottranslate.xml:1

  • Label 'Cancel' for the destructive action can be ambiguous alongside 'Continue'; consider changing it to 'Cancel Import' to make the consequence explicit.
<?xml version="1.0" encoding="utf-8"?><!--

@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch 4 times, most recently from 289bf6e to 4d28998 Compare October 6, 2025 15:00
@duckduckgo duckduckgo deleted a comment from Copilot AI Oct 6, 2025
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch 8 times, most recently from f942c31 to d2f84e9 Compare October 7, 2025 12:30
@CDRussell CDRussell marked this pull request as ready for review October 7, 2025 12:46
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_webview_ui branch from d2f84e9 to 2e82169 Compare October 7, 2025 16:16
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.

2 participants