Page MenuHomePhabricator

[spike] Experiment making link preview bottom sheet no longer modal (allow direct taps underneath)
Open, LowPublic

Description

Problem:

android places 39.png (1×752 px, 543 KB)

  • While working on Places (T351158), @Dbrant and @scblr realized that the current bottom sheet behavior could be optimized app-wide.
  • With the current architecture, clicking directly on background links, e.g., another marker on the map to allow for quick explorations, is impossible.
  • The same applies to the sheet within articles; navigating between articles requires two tabs as the sheet works like a modal

Solution:

android places 38.png (1×752 px, 585 KB)

  • Remove the background overlay when the bottom sheets are active in places
  • Allow direct taps outside of the bottom sheet to make discovering/exploring more intuitive

Investigate

  • The consequences of applying this to the bottom sheet component app-wide (Mainly used for Pages/Articles and in Places)

Event Timeline

Dbrant renamed this task from Bottom sheet: Remove dark overlay and allow direct taps to Make link preview bottom sheet no longer modal (allow direct taps underneath).Jan 31 2024, 2:10 PM
Dbrant renamed this task from Make link preview bottom sheet no longer modal (allow direct taps underneath) to [spike] Experiment making link preview bottom sheet no longer modal (allow direct taps underneath).Feb 6 2024, 7:13 PM

The spike is completed.

The current LinkPreviewDialog uses the DialogFragment, which is more like an independent component.

The new approach will be creating a custom CoordinatorLayout, which is a view inside the main layout.

If we want to move from DialogFramgent to a CoordinatorLayout, the LinkPreviewDialog will require a large code update because of the viewModel, and this is not recommended in a custom view.

@scblr and @JTannerWMF, please let me know if you want to process with the CoordinatorLayout solution.

Thanks @cooltey – I added this as a discussion item to our weekly planning meeting.