Page MenuHomePhabricator

Default open behavior for Tabs (from long-press, short press, web browser)
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

See Epic: T384758: [Epic] Add Tabbed Browsing to the iOS App (Tabs)

Requirements
  • Users can open articles in new tabs and go to them, or open them in the background for reading later
  • Update the long-press contextual menu across the app to add two new options
    • ‘Open in new tab’ (opens article link in new tab, and takes the user there)
    • ‘Open in new background tab’ (opens article link in new tab, and does NOT take the user there)
    • These two options always open the article in a new tab (regardless of whether an item is already open).
  • Keep current behavior in when navigating links in articles with a short press
  • Update the default behavior for opening articles with a short press
    • Web browser:
      • Article opens in new tab, user is taken there.
      • If the tab limit is reached (500), the article opens in the current tab.
    • Search input (anywhere in the app)
      • Article opens in the current tab, user is taken there
    • Explore:
      • Article opens in the current tab, user is taken there.
    • Places:
      • Article opens in the current tab, user is taken there.
    • Saved:
      • Article opens in the current tab, user is taken there.
    • History
      • Article opens in the current tab, user is taken there.
    • Anywhere else:
      • Article opens in the current tab, user is taken there.

Nice to have & will be done in a separate task if time

  • Switch to existing tabs when an article is already open, instead of opening a new one
    • For web browsers: If the article is open at the top of an existing tab, switch to it
    • For in-app search (anywhere in the app): If the article is open at the top of an existing tab, switch to it
Designs (Figma)
image.png (1×786 px, 523 KB)
Updated contextual menu
  • We aren’t complicating things for existing users who haven’t dealt with tabs before. Tabs are here when you use them, but stay out of the way if you don’t.
Engineering Notes
  • Check the tabs data controller to ensure feature is available. (Will be the same developer settings check as the overview entry point for now, eventually we will add a/b testing logic as a part of T390984). If it is available, add "Open in new tab" and "Open in new background tab" options to ArticlePeekPreviewViewController.
  • When "Open in background tab" is tapped, we will tell data controller to add article to a brand new tab (method will already be available to call from work in T392916)
  • When "Open in new tab" is called, create an ArticleCoordinator with the new article and tell it to start. ArticleCoordinator will be instantiated with "add to current tab" boolean. (this will already be available from work in T392917)
  • All other requirements should already be handled from work in T392917

Details

Other Assignee
Tsevener

Event Timeline

HNordeenWMF raised the priority of this task from Low to Medium.Apr 24 2025, 10:47 PM
Tsevener updated the task description. (Show Details)
Tsevener set the point value for this task to 3.May 6 2025, 3:54 PM

Part 2 navigation PR affects this work - https://github.com/wikimedia/wikipedia-ios/pull/5284

Remaining work to do for this task:

Deep link navigation logic + tab limit logic

Web browser:
Article opens in new tab, user is taken there.
If the tab limit is reached (500), the article opens in the current tab.

Long press > open in new tab from Explore Search
This path seems broken. No navigation happens, no new tab is created.

@Tsevener @GOlson-WMF

Please change the order and wording for the long-press menu:

ImplementationvsDesign
CleanShot 2025-05-16 at 11.58.27.png (2×1 px, 1 MB)
image.png (1×786 px, 517 KB)

Changes:

  • Read → Open
  • Order:
    • Open
    • Open in new tab
    • Open in new background tab
Seddon updated Other Assignee, added: Tsevener.

@Tsevener @Mazevedo still seing this order:

@Tsevener @GOlson-WMF

Please change the order and wording for the long-press menu:

ImplementationvsDesign
CleanShot 2025-05-16 at 11.58.27.png (2×1 px, 1 MB)
image.png (1×786 px, 517 KB)

Changes:

  • Read → Open
  • Order:
    • Open
    • Open in new tab
    • Open in new background tab

... in 247 and the latest build (257)? See screenshot below:

image.png (2×1 px, 1 MB)

@scblr this fix was still under code review, I'll get a new build later with the updates

Can be tested Wikipedia 7.7.6 (5357)