-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table cells widths are uneven. #173
Comments
Thanks for reporting this. @tbenning @jakebolam Would you guys know another solution? |
Thanks for reporting this @ehmicky. Any thoughts on approaches to address this? |
Unfortunately not, sorry :/ I've also noticed that the table is horizontally scrolled on mobile, but I'm not sure if this is intentional and/or this is related. |
@ehmicky > I've also noticed that the table is horizontally scrolled on mobile, but I'm not sure if this is intentional and/or this is related. This is definitely not intentional, I'll try fixing that. |
@Berkmann18 you can reproduce by checking the same repository I posted above on a mobile screen. Please let me know if you would like me to post a screenshot. |
@ehmicky Yes I know, I tried something out but since there's more entries on the row than what my (and certainly your) phone can display, there's that horizontal scrolling even when the table's width is set to |
@ehmicky Have you tried rolling back to the |
No I haven't because while this issue does lead to horizontal scrolling, I don't think it justifies rolling back and missing bug fixes and features. |
@ehmicky Well, the If the horizontal scrolling were to re-occur, then either changing the |
Thanks for trying to figure a solution to this issue :) The horizontal scrolling is still an issue (I just tried it), so it will re-occur. I tried decreasing Locking the version back to a previous major version for the foreseeable future does not look like a good practice, as I might miss important bug fixes, features or security patches. The real fix would be to make the table responsive, but I'm not sure if this possible :-/ |
😞.
That's what I thought would happen in case of no responsiveness.
Good point, I was thinking of having either a separate development channel which would be as up-to-date as the upstream but using What are your thoughts about that?
Indeed, however Github's renderer strips out |
Wouldn't it be simpler to re-introduce Markdown rendering in current |
@ehmicky Yeah, that's a better idea. |
Improvement for Better Desktop ViewAfter some trials and errors, I ended up reaching the conclusion that specifying Preview BranchPersonally, the combination of The tag of 2nd table would be like this: <td align="center" width="16.66%">
<a href="#">
<img src="#" width="100" alt="Foo Bar"/><br />
<sub><b>Foo Bar</b></sub>
</a>
<br /><a href="#" title="Code">💻</a>
</td> It requires manual calculation to get the proper percentage value (because we cannot use Unfortunately, it seems it makes no significant visual improvement on the mobile browser. |
Improvement for Mobile ViewThe main factor of this problem is long words that is not line-breakable. (e.g. allcontributors[bot], Greenkeeper[bot]) The only ways to make texts line-breakable is setting inserting `& #8203;`The widths of the cells are still different, but it looks way better. The problem is how to insert it automatically and fitly. In the above example, I inserted it in the words that have more than 8 characters. The other (and very hacky) way I found is using NBSP character ( utilizing `& nbsp;`Yes, it looks terrible 😂. EDIT: I'll add these tables to the above preview repo!
According to my experience, it barely can solve any problem here. I added markdown table to the preview repo for the comparison, too. |
Additionally, setting So I think the best option would be: <!-- with config contributorsPerLine: 6 -->
<!-- I think 6 should be default or at least highly recommended value -->
<td align="center" valign="top" width="16.66%">
<a href="#">
<img src="#" width="100" alt="Foo Bar"/><br />
<sub><b>verylong​nameeven​withouta​singleca​pital</b></sub>
</a>
<br /><a href="#" title="Code">💻</a>
</td> |
@qyurila hi, thanks for suggesting these workarounds. You wanna give this a shot? PRs are very welcome.
|
Sounds good!
It's unfortunate indeed that not only EDIT: Sorry for the referencing commits mess, I didn't remember what happens when I do it 😥 |
@Berkmann18 The visual got somewhat better but the issue is not quite solved, especially on edge cases (when there are some long single-word usernames). You can check this branch of my fork to see what the current generation looks like. |
@qyurila Do you have a solution or suggestion for this? I've tried an approach similar to how I did for HTML emails but GH isn't nice when it comes to (inline) CSS so it's tricky to get the table to look clean. |
@Berkmann18 I couldn't find any solution to improve this. The main (if not only) cause of the issue is that any long single-word username won't be wrapped, and GitHub simply does not provide any way to force-wrap them. The exception was their mobile app, which always had been showed tables with 100% width IIRC, but some time ago they fixed it. |
@qyurila That's unfortunate and yeah the limitations GH puts on HTML/CSS makes stuff like this hard to resolve and they seem fairly slow when it comes to responding to suggestions. |
Problem description: on small screens table cells have uneven widths which looks odd.
This seems to be related to the length of the username and word wrapping.
Reproduction repository: https://github.com/ehmicky/portable-node-guide
Must be looked at on a smartphone.
all-contributors-cli
version:6.1.2
node
version:11.11.0
npm
(oryarn
) version:6.9.0
Relevant code or config
The text was updated successfully, but these errors were encountered: