markdown_preview: Apply few appearance tweaks for tables - #39190
Conversation
|
@Simek : Great work, just one aesthetic consideration that Gitub doesn't take: you could make the corners rounded on the table, possibly with a flag for those who don't want it. In any case, even if you don't do it, great work. Regarding problem #39152, some initial considerations need to be made. I believe it is best to address it separately. |
danilo-leal
left a comment
There was a problem hiding this comment.
Thank you! I pushed a few small tweaks just left-aligning the header text. I know the centered design is GitHub's markdown table take, but just didn't feel right... subjective to some extent. Let's see how it feels!
|
This makes sense, I was not fully sure about the alignment, but went with original comment suggestion on mentioned PR. I guess ideally the header and column text alignment could be driven by GFM syntax: |
…ies#39190) # Why Refs: * zed-industries#39101 (comment) # How Apply suggested appearance changes in the comment mentioned above. I have also retained the different background for header rows, since it feels to me that it is something that GitHub styling lacks. I have also attempted to shrink the table table element, to fit the content width (so it does not span for the full width of preview), but I have failed on those attempts. Tried to use many various GPUI attributes, but only thing that worked was setting the exact width on table container, also tried to reuse `max_lengths` values, but those are counting characters, not the rendered width. I would like to explore this a bit more, and try to follow up on those changes in a separate PR. Release Notes: - Improved table elements styling in Markdown Preview # Preview <img width="1616" height="582" alt="Screenshot 2025-09-30 at 12 04 30" src="https://github.com/user-attachments/assets/4f1517cb-9046-4e09-a1e1-5223421efb71" /> <img width="1616" height="582" alt="Screenshot 2025-09-30 at 12 04 23" src="https://github.com/user-attachments/assets/61303160-2b62-4213-80fc-ee8432cdf1fa" /> <img width="1616" height="582" alt="Screenshot 2025-09-30 at 12 04 15" src="https://github.com/user-attachments/assets/059a447e-574d-4545-870a-93f1c00b3bb8" /> <img width="1616" height="582" alt="Screenshot 2025-09-30 at 12 04 42" src="https://github.com/user-attachments/assets/8e7c6f9b-672f-4943-aded-1b644d2ff750" /> <img width="1616" height="582" alt="Screenshot 2025-09-30 at 12 04 34" src="https://github.com/user-attachments/assets/6d31f7f3-d0ea-4987-bf8c-78f6b307a2b3" /> --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Why
Refs:
How
Apply suggested appearance changes in the comment mentioned above. I have also retained the different background for header rows, since it feels to me that it is something that GitHub styling lacks.
I have also attempted to shrink the table table element, to fit the content width (so it does not span for the full width of preview), but I have failed on those attempts. Tried to use many various GPUI attributes, but only thing that worked was setting the exact width on table container, also tried to reuse
max_lengthsvalues, but those are counting characters, not the rendered width. I would like to explore this a bit more, and try to follow up on those changes in a separate PR.Release Notes:
Preview