Repository navigation
Problems with Merge Confidence PR styling #10
Replies: 13 comments
|
Is this possible to fix though? The browser appears to be adapting based on a combination of column header with / badge width. |
I've tested this, badge size is based on column header size. Reproduction:
|
|
Given a small enough viewpoint, won't all badges shrink? Or there is there some minimum based on the column header width? |
|
There is a minimum width based on the column header width. Badges more or less keep normal size with larger column text:I also noticed something else when I was changing the column header text. You can use | Package | Change | Age | Adoption | Passing | Confidence |
| :---: | :---: | :---: | :---: | :---: | :---: |
| [@mdx-js/react](https://mdxjs.com) ([source](https://togithub.com/mdx-js/mdx)) | [`1.6.21` -> `1.6.22`](https://renovatebot.com/diffs/npm/@mdx-js%2freact/1.6.21/1.6.22) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |Live example of fix:
Picture of badges not center aligned: |
|
Great finding! We serve the badges on all platforms so need to determine:
And then the other part of what you've found is whether we should use deliberately more verbose column headings in order to get more predictability for badge sizes. |
Platform support for Markdown center aligned tables
GitHub supports centering Markdown tablesQuote from GitHub Flavored Markdown Spec, 4.10 Tables:
GitLab supports centering Markdown tablesQuote from GitLab Markdown guide, tables:
Azure DevOps supports centering Markdown tables:Azure DevOps, Markdown Guidance, tables
BitBucket uses CommonMark tables only, so cannot use centered tables |
|
I think the Package column should be left-aligned. Also the badge content itself can grow, if Age becomes say Maybe you're better of doing the table in plain HTML and then add some CSS Grid magic to align everything nicely. |
|
Most platforms don't allow any custom CSS, so that's not an option. |
But you can embed HTML in a Markdown file, and then add inline CSS maybe? This is a regular paragraph.
<table>
<tr>
<td style="center-align: true, or whatever works in CSS">Foo</td>
</tr>
</table>
This is another regular paragraph. |
This will work for most cases, but word-wrap is causing problems. In some cases the words are being put below each other in the column, that causes the column to shrink again... |
I believe GitHub and probably others strip out inline CSS. So maybe we skip center-aligning so that the badges left-align with each other? That leaves column width remaining. The Age badge is probably narrow because the column heading is only 3 characters and the badge itself is not wide either. Another possibility could be to add invisible I think Passing looks too small because the badge itself is wide due to the text "low data". An alternative would be to use the ⏳ symbol(s) in place. Although it's less intuitive than "low data", if the badge links to documentation explaining that's what it means then people only really need to learn that once. |
Ok, inline CSS is out then. 😄
If we cannot be consistent for all platforms, it's probably better to just use the default left-align, and accept that some combinations of badges can look a bit weird in a table with multiple rows.
That's a possibility to fix the Passing badges,, but it's not very descriptive on its own without reading the docs. I hope that the |




Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem:
The badges for Age and Passing shrink down to unreadable sizes when the viewport is made smaller.
This affects the New and Low confidences badges, and might affect other badges in the range as well.
Pictures:
Full viewport:
Small viewport:
How to reproduce:
PR where these pictures are coming from:
HonkingGoose/git-gosling#94
All reactions