# ui: Add configurable scrollbar reveal behavior \(\#62282\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/6b2aa1c90aeb72cadfd30ed12141ed9e2569eded)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 6b2aa1c90aeb72cadfd30ed12141ed9e2569eded

Requested commit: 6b2aa1c90aeb72cadfd30ed12141ed9e2569eded

Commit: 6b2aa1c90aeb72cadfd30ed12141ed9e2569eded

Tree: b51a79beceb9a657bf83ee8ce7576a153f0388d7

Author: Conrad Irwin

Committer: GitHub

## Message

```
ui: Add configurable scrollbar reveal behavior (#62282)

Auto-hiding scrollbars currently reveal whenever their prepaint geometry
changes. That matches browser behavior, but it causes continuously
updating views to restart the visibility timer on every content change
even when the user has not scrolled.

Add a per-instance `ScrollbarRevealPolicy`. The default
`ScrollOrContentChange` policy preserves the existing behavior for all
current callers. Views with continuously growing content can opt into
`ScrollOnly`, which reveals only when the offset changes independently
of content size, including when a view remains anchored to the bottom.

Tests pin the default behavior, the opt-in behavior, ordinary scrolling,
stationary content growth, bottom-anchored growth, and scrolling while
content is growing.

Release Notes:

- N/A
```

## Parents

- [101ca00a1352ed71ef398f21b47836565d1998e3](https://git.cafe/gitcafe/zed/commit/101ca00a1352ed71ef398f21b47836565d1998e3?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/6b2aa1c90aeb72cadfd30ed12141ed9e2569eded?format=markdown)
