Skip to content

Large headers offsets the rendering area #256

@TimurKr

Description

@TimurKr

Description

When using a large header—nearly the full height of the scroll area—it causes items to render too late when scrolling up. This appears to be because the drawDistance is applied not from the top of the scroll area, but rather from the bottom of the header.

Observed Behavior

  • Scrolling down causes items to unmount from the top too early.
  • Scrolling up causes items to render with a noticeable delay.
  • The delayed rendering seems to happen because the render buffer begins below the header rather than at the top of the scrollable area.
  • It seems items are rendered unnecessarily early at the bottom, but too late at the top.
  • The header might be pushing down the actual render zone.

Workaround

Setting a large value for drawDistance forces earlier rendering, but this negatively impacts performance.

Demo

  • A simple reproduction can be found in the following video: Demo Video on OneDrive
  • The legend list starts below the calendar and fills the screen.
  • The header of the legend list occupies nearly the entire screen and contains the message "How are you feeling today" and the button "Write down your toughts"
  • The first visible item is “Today” at the bottom-right.
  • For this demo, drawDistance is set to 0 to clearly observe rendering behavior. Modifying the drawDistance moves the position at which the items are rendered at the top as expected.

Expected Behavior

  • Items should begin rendering at the top of the scroll area, regardless of header size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions