# ui: Make docs aside in pickers and context menu render centered to its trigger \(\#45868\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 189b5ff3a27bea0f07e64787d9f421eefe273d3f

Requested commit: 189b5ff3a27bea0f07e64787d9f421eefe273d3f

Commit: 189b5ff3a27bea0f07e64787d9f421eefe273d3f

Tree: bc86f72b53e6e748442cf395dcafc8afa9a25000

Author: Danilo Leal

Committer: GitHub

## Message

```
ui: Make docs aside in pickers and context menu render centered to its trigger (#45868)

This has been something we've wanted to do for a long time since docs
aside thus far have been hard-anchored either at the top or bottom of
the container that their trigger is sitting in. This PR introduces the
change so that they're centered with their trigger, regardless of
whether it's on a context menu or picker, by including a canvas element
in both the container and the trigger to calculate where the docs aside
should precisely sit on. Here's the result:


https://github.com/user-attachments/assets/8147ad05-1927-4353-991d-405631de67d0

Note that at the moment, docs aside are only visible through _hovering_,
and ideally, they should be available on both hover and selection
(keyboard nav). But I'll leave that for later.

Release Notes:

- N/A
```

## Parents

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

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