gpui: Add grid repeat min content API#44973
Merged
smitbarmase merged 1 commit intomainfrom Dec 16, 2025
Merged
Conversation
smitbarmase
added a commit
that referenced
this pull request
Dec 16, 2025
Closes #44306 This PR makes two changes: - Uses the new `grid_cols_min_content` API. See more here: #44973. - Changes Markdown table rendering to use a single grid instead of creating a new grid per row, so column widths stay consistent across rows. Release Notes: - Fixed an issue where Markdown tables wouldn't render in the hover popover.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Required for #44712
We started using
gridfor Markdown tables instead of flex (#42674). This resulted in tables having a width of 0 inside popovers, since popovers are laid out usingAvailableSpace::MinContent.One way to fix this is to lay out popovers using
MaxContentinstead. But that would affect all Markdown rendered in popovers and could change how popovers look, or regress things.The other option is to fix it where the problem actually is:
repeat(count, vec![minmax(length(0.0), fr(1.0))]). Since the minimum width here is0, laying things out withMinContentcauses the Markdown table to shrink completely. What we want instead is for the minimum width to be the min-content size, but only for Markdown rendered inside popovers.This PR does exactly that, without interfering with the
grid_colsAPI, which intentionally follows a TailwindCSS-like convention. See #44368 for context.Release Notes: