# markdown: Improve table display \(\#42674\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e1d295a6b4ee0def3d155337818c6e1a5a52a3f3

Requested commit: e1d295a6b4ee0def3d155337818c6e1a5a52a3f3

Commit: e1d295a6b4ee0def3d155337818c6e1a5a52a3f3

Tree: b22cd6595d2d3e25c0c7de10d8a0b416a903c0ed

Author: Danilo Leal

Committer: GitHub

## Message

```
markdown: Improve table display (#42674)

Closes https://github.com/zed-industries/zed/issues/36330
Closes https://github.com/zed-industries/zed/issues/35460

This PR improves how we display markdown tables by relying on grids
rather than flexbox. Given this makes text inside each cell wrap, I
ended up removing the `table_overflow_x_scroll` method, as it was 1)
used only in the agent panel, and 2) arguably not the best approach as a
whole, because as soon as you need to scroll a table, you probably need
more elements to make it be really great.

One thing I'm slightly unsatisfied with, though, is the border
situation. I added a half pixel border to the cell so they all sum up to
1px, but there are cases where there's a tiny space between rows and I
don't quite know where that's coming from and how it happens. But I
think it's a reasonable improvement overall.

<img width="500" height="1248" alt="Screenshot 2025-11-13 at 7  05@2x"
src="https://github.com/user-attachments/assets/182b2235-efeb-4a61-ada2-98262967355d"
/>

Release Notes:

- agent: Improved table rendering in the agent panel, ensuring cell text
wraps, not going off-screen.
```

## Parents

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

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