Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-selection: Selection mode #5623

Open
wants to merge 13 commits into
base: feature/ondrej/tab-multi-selection-menu
Choose a base branch
from

Conversation

0nko
Copy link
Member

@0nko 0nko commented Feb 10, 2025

Task/Issue URL: https://app.asana.com/0/72649045549333/1207969573539955

Description

This PR adds the tab selection UI and allows the tabs to be selected after triggering the selection mode. The selection mode can be cancelled by tapping anywhere outside a tab.

Some menu items and buttons are already functional, namely:

  • New Tab
  • FAB New Tab
  • Select Tabs (triggers the selection mode)
  • Select All (in selection mode)
  • Close All Tabs (in selection mode)

Non-functional items:

  • All sharing menu items and toolbar buttons
  • All bookmarking menu items and toolbar buttons
  • All selection-related tab closing (including the FAB)

Steps to test this PR

Entering and leaving the selection mode

  • Navigate to the tab switcher
  • Make sure you have at least 3 tabs
  • Tap on the More menu button
  • Tap on Select Tabs
  • Verify the selection mode is triggered
  • Verify all tabs are deselected
  • Verify the sharing and bookmark toolbar buttons are disabled
  • Verify the FAB shows "New Tab"
  • Tap on a tab
  • Verify the tab gets selected (both with a checkmark and decoration)
  • Verify the sharing and bookmark toolbar buttons are enabled
  • Verify the FAB shows "Close Tabs"
  • Verify the toolbar title shows the correct number of selected tabs
  • Tap on the empty area
  • Verify the tab switcher goes back to the normal mode

Selecting all tabs

  • Navigate to the tab switcher
  • Make sure you have at least 3 tabs
  • Trigger the selection mode
  • Tap on the more menu and tap on Select All
  • Verify all tabs are selected
  • Verify the toolbar title shows the correct number of selected tabs
  • Tap on the more menu again
  • Verify the sharing, bookmarking and closing menu items show the correct number of selected tabs
  • Verify the Select all menu item is gone
  • Verify the Close Other Tabs item is gone
  • Deselect one tab
  • Tap on the more menu
  • Verify the Select All and Close Other Tabs are back
  • Verify the correct number of tabs is shown in the menu items and the toolbar

Closing all tabs

  • Navigate to the tab switcher
  • Trigger the selection mode
  • Tap on the more menu and tap on Close All Tabs
  • Verify a confirmation dialog is displayed
  • Tap on Close
  • Verify all tabs are removed

Adding a new tab

  • Navigate to the tab switcher
  • Tap on the more menu and tap on New tab
  • Verify a new tab is added (or selected, if a NTP already exists) and the app navigates back to the browser
  • Go back to the tab switcher
  • Tap on the FAB with a New tab title
  • Verify a new tab is added again the same way

List layout selection

  • Navigate to the tab switcher
  • Tap on the list layout toolbar button
  • Tap on the More menu and tap on Select Tabs
  • Verify the selection mode is triggered
  • Smoke test the selection behavior and verify it behaves the same way as grid layout

Demo

Screen_recording_20250213_123419.mp4

Copy link
Member Author

0nko commented Feb 10, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@0nko 0nko mentioned this pull request Feb 10, 2025
7 tasks
@0nko 0nko marked this pull request as ready for review February 10, 2025 10:05
@0nko 0nko changed the title Add item checkbox resources and image view Multi-selection: Selection mode Feb 11, 2025
@0nko 0nko force-pushed the feature/ondrej/tab-multi-selection-menu branch from 974409b to 10a05be Compare February 13, 2025 10:54
@0nko 0nko force-pushed the feature/ondrej/tab-multi-selection-select-mode branch from cedbb62 to 935cf93 Compare February 13, 2025 10:54
@0nko 0nko requested review from mikescamell and removed request for malmstein and nalcalag February 13, 2025 10:59
@0nko 0nko force-pushed the feature/ondrej/tab-multi-selection-select-mode branch from 05dd5c4 to 43b3325 Compare February 14, 2025 09:42
@0nko 0nko force-pushed the feature/ondrej/tab-multi-selection-menu branch from 10a05be to da7bac5 Compare February 14, 2025 09:42
@0nko 0nko force-pushed the feature/ondrej/tab-multi-selection-menu branch from da7bac5 to ad27238 Compare February 14, 2025 14:01
@0nko 0nko force-pushed the feature/ondrej/tab-multi-selection-select-mode branch from 43b3325 to bbcf57e Compare February 14, 2025 14:01
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.

1 participant