Page MenuHomePhabricator

Dialog: hide subtitle when scrolling
Open, Needs TriagePublic

Description

Background

In T324708#8694562 we decided to implement different styles for the dialog when scrolling. When scrolling, we should save as much space as possible for the long content, so we propose to hide the subtitle when scrolling. So subtitle would be visible when the dialog contains scroll, but it would be hidden once the user starts scrolling.

Captura de pantalla 2023-05-08 a las 11.10.40.png (1×2 px, 494 KB)

Design spec

Open questions

Add here the questions to be answered in order to design and implement the component

Acceptance criteria (or Done)

Design

  • Design the Figma spec sheet and add it in this task
  • Update the component in the Figma library. This step will be done by a DST member.

Code

  • Implement the component in Codex

Event Timeline

Cross-posting for context:

I still have some questions about how the subheading would appear and disappear in this design:

  • If the heading is fixed with a subheading below it, I assume that we don't want it to slide out of the top of the dialog frame as the user scrolls – the two lines of text would collide and it would look jarring. So would the subheading just disappear immediately (maybe with a quick fade) on scroll?
  • I assume we want to keep the text inside the main dialog content area from jumping around when the subheading disappears and later re-appears. This means that we probably will need to use fixed positioning for the header and footer sections of the dialog – this ensures that these elements won't impact the layout of the main content area as they change. But using fixed positioning for the header and footer might cause other issues, and could complicate the ability of users to provide custom header/footer content and have things just work as expected.

My gut feeling is that this proposed design is going to require a lot of effort to implement and may produce side-effects that force us to re-think other aspects of the Dialog component. My recommendation would be to consider an alternative (simpler) approach that does not necessitate multiple elements appearing and disappearing on scroll. Maybe we should just re-introduce the optional dividers and avoid other changes for now?