Page MenuHomePhabricator

Popover: make it possible to always show a bottom sheet
Open, LowPublicFeature

Assigned To
Authored By
AnneT
Wed, Aug 5, 11:48 PM
Referenced Files
F97367270: iPad Pro 11_ - 14.png
Thu, Aug 6, 12:27 PM
F97367269: iPad Pro 11_ - 13.png
Thu, Aug 6, 12:27 PM
F97361523: image.png
Thu, Aug 6, 9:48 AM
F97361517: image.png
Thu, Aug 6, 9:48 AM
F97361267: image.png
Thu, Aug 6, 9:48 AM

Description

Background

The Popover component has a prop, useBottomSheet, that when true, outputs the popover as a bottom sheet until the viewport is 640px or wider (i.e. above the mobile max-width). At that width, the component is displayed as a popover anchored to another element on the page.

In two products currently under development, we've identified use cases for a popover that displays as a bottom sheet regardless of viewport size. For example, the popover that will display when a user presses the bookmark button on an article as part of the Custom Lists project should always be a bottom sheet in the MinervaNeue skin and should be responsive (the current behavior of Popover) in the Vector 2022 skin. Similarly, the post-publish account creation CTA for temp account edits was a mobile-only experiment and the team found that the popover simply does not display over the mobile breakpoint if no anchor point is provided.

We want to enable use of the bottom sheet on all viewport sizes.

Design requirements

Design artifacts to be added

iPad Pro 11_ - 13.png (834×1,194 px, 264 KB)

iPad Pro 11_ - 14.png (1,194×834 px, 250 KB)

Open questions

  1. What is the max width before the bottom sheet is no longer the full width of the viewport?
  2. Can we/should we make that configurable?
  3. What should the border radius of the bottom sheet be when it is not the full width of the viewport?

Requirements

Technical requirements

  1. Figure out a sensible way to add configuration to turn on the bottom sheet all the time, that doesn't disrupt the existing use of use-bottom-sheet="true". In an ideal world we might change that prop to take strings like "responsive" and "always". We could change the prop to accept both boolean values and these strings. Then for a future major Codex release, we could deprecate then remove the boolean usage.
  2. Implement and document the "always" behavior according to the design spec

Acceptance criteria

  • Popover supports displaying as a bottom sheet regardless of viewport size
  • Current responsive behavior is still functional and the default when useBottomSheet is true
  • Existing implementations using useBottomSheet are unchanged (note - it actually looks like this is only being used by the Growth team so far)

QA strategy

  • Risky change? Risk of regressions for existing usages, which are very limited. Not controversial.
  • QA by: QA engineers, engineers, designers, and/or PMs from involved teams
  • QA in: Codex docs site first, locally for new products using the feature, beta or prod for existing products using useBottomSheet
  • Test steps: to be added

Communication criteria

n/a

Rollback plan

Revert the Codex release patch in core if possible, hotfix Codex and perform another release otherwise

This task was created by Version 1.1.0 of the Reader Experience team task template using phabulous.

Event Timeline

Hey @Sneha, could you please update this task with links to/images from your design for the popover bottom sheet on larger viewports? I'm hoping we can work with @AAlhazwani-WMF to finalize the design (if y'all haven't already!)

there is our mobile design using the current popover

image.png (856×1,866 px, 308 KB)

and these are some of the explorations that we did for desktop. things that are still undefined is whether we should display the backdrop on desktop too, the max width, and any animation-related aspect.

image.png (2,560×1,600 px, 815 KB)

image.png (2,560×1,600 px, 695 KB)

I have added images for tablet minerva views. I hope we can adjust the width/height of the pop up for different use cases easily.

Les4353 subscribed.

I claim this! I will impl it after the designation confirmed!
Designer please claim this too (as coassignee), ty.

Personal design suggestions

Use a width cap as default, and it can be configured, the cap may be 20vw?

Les4353 moved this task from Backlog to Ready for Design/Dev on the Codex board.
Les4353 changed the subtype of this task from "Task" to "Feature Request".