Skip to content

Bug 2032587 - Added UI for importing bookmarks#220

Closed
fmasalha wants to merge 1 commit intomozilla-firefox:autolandfrom
fmasalha:feature/import-bookmarks-ui
Closed

Bug 2032587 - Added UI for importing bookmarks#220
fmasalha wants to merge 1 commit intomozilla-firefox:autolandfrom
fmasalha:feature/import-bookmarks-ui

Conversation

@fmasalha
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

View this pull request in Lando to land it once approved.

@fmasalha fmasalha force-pushed the feature/import-bookmarks-ui branch from e636f03 to 2ac3c42 Compare April 16, 2026 20:25
Copy link
Copy Markdown
Contributor

@segunfamisa segunfamisa left a comment

Choose a reason for hiding this comment

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

I think we're almost there, but there are a couple of changes I would like to recommend.

I also think we should move this over to phabricator, since it touches strings.xml files. Or is that no longer applicable?

data object SelectFolderFailed : SnackbarAction()
}

internal data object RootMenuClicked : BookmarksAction
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's root menu in this case? I think "overflow menu" is probably more common so maybe "RootOverflowMenu...." is best here.

Comment on lines +291 to +301
val filePickerLauncher = rememberLauncherForActivityResult(
contract = ActivityResultContracts.GetContent(),
) { _ -> }

LaunchedEffect(state.launchFilePicker) {
if (state.launchFilePicker) {
filePickerLauncher.launch("text/html")
store.dispatch(FilePickerDismissed)
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can make this into a FilePicker.kt file and move it out of BookmarksScreen.kt. This file is already way too big.

tint = MaterialTheme.colorScheme.onSurface,
)
}
} else if (LocalContext.current.settings().importBookmarksFeatureFlagEnabled) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's put something like showBookmarksImport in the state. We should not be accessing settings or data sources directly in the UI.


if (state is EmptyListState.NotAuthenticated) {
Spacer(modifier = Modifier.height(FirefoxTheme.layout.space.static300))
if (LocalContext.current.settings().importBookmarksFeatureFlagEnabled) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here. Let's put this in the state instead.

<!-- Label for button to sort bookmarks in reverse alphabetical order in the bookmark sorting overflow menu. -->
<string name="bookmark_sort_menu_z_to_a">Sort by Z to A</string>
<!-- Label for button to import bookmarks from file. -->
<string name="bookmark_import_menu_button">Import from file</string>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR should go on phabricator because it touches strings.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ahhh I forgot lol. I wonder how much longer we are gonna forced to use phab for patches that touch strings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LOL. I hope not for too long!

@fmasalha fmasalha closed this Apr 17, 2026
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