# settings ui: Move selected nav bar entry on scroll \(\#39633\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 669db62e3317433e8cc8e91082e539a66a4be1a9

Requested commit: 669db62e3317433e8cc8e91082e539a66a4be1a9

Commit: 669db62e3317433e8cc8e91082e539a66a4be1a9

Tree: 9b69ca67f0fd12d0c87210a47ab2bbbd2d20097e

Author: Anthony Eid

Committer: GitHub

## Message

```
settings ui: Move selected nav bar entry on scroll (#39633)

This PR makes selecting a sub-entry in the settings UI nav bar scroll to
that section in the settings page. It also updates the selected
sub-entry when scrolling through a settings page to match what a user is
viewing on the page.

I also added a new helper method to `ScrollHandle` type called
`scroll_to_top_of_item` that scrolls until an item is the top element
visible.

Release Notes:

- N/A
```

## Parents

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

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