# ui: Improve submenu rendering when there's not enough space \(\#54773\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 77805330c029befe0ba9ec4f81918fe1b4140226

Requested commit: 77805330c029befe0ba9ec4f81918fe1b4140226

Commit: 77805330c029befe0ba9ec4f81918fe1b4140226

Tree: 2483fd0210acd02821c7aae1700272c992f5a7da

Author: Danilo Leal

Committer: GitHub

## Message

```
ui: Improve submenu rendering when there's not enough space (#54773)

This PR makes the submenu render on the left of the trigger if there's
not enough space (200px of available width) on the right. This improves
the rendering overall, I believe, as it's better than the submenu
rendering _on top_ of the parent menu.

Release Notes:

- N/A
```

## Parents

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

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