Skip to content
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

[bug] Codeblocks break responsivness of the page #1952

Closed
web110010 opened this issue Jul 6, 2023 · 1 comment · Fixed by #1956
Closed

[bug] Codeblocks break responsivness of the page #1952

web110010 opened this issue Jul 6, 2023 · 1 comment · Fixed by #1956
Labels
bug Something isn't working frontend Frontend-related stuff

Comments

@web110010
Copy link

Describe the bug with a clear and concise description of what the bug is. Please include screenshots of any visual issues.

Inside a codeblock if the text is too long on one specific line the length of all the posts increase with it.
chromium

What's your GoToSocial Version?

GoToSocial 0.9.0 git-282be6f

Browser version

Mozilla Firefox(fedora) 115.0, Chromium(flatpak) 114.0.5735.198, Firefox for android, Chrome for android

What happened?

I was trying out what works for markdown, support for extended syntax elements(which isn't completely there yet), when I noticed that that due to the codeblock the recent posts were pulled bellow the About section. So I opened it on my phone to check it and the page wasn't readable on the phone.

A little investigation into it and the culprit was a line of code which was pretty long inside the codeblock.
This seems to happen with both the basic(4 spaces or 1 tab indentation) and extended(code between (```)) markdown syntax.

What you expected to happen?

One of two things:

  • line wrapping (not at all desirable)
  • a scroll bar specific to codeblock to appear allowing for scrolling the codeblock (this is what I hoped for)

How to reproduce it?

A long line of code inside a codeblock.

Anything else we need to know?

No response

@web110010 web110010 added bug Something isn't working frontend Frontend-related stuff labels Jul 6, 2023
@tsmethurst
Copy link
Contributor

Ah right this bug! Thanks! Forgot to open an issue for it earlier.

daenney added a commit to daenney/gotosocial that referenced this issue Jul 7, 2023
If someone makes a post with a long, uninterrupted piece of text in a
code snippet, we would stretch the column to fit it, resulting in the
UI going a bit whacky.

By setting min-width: 0% this fixes it, and we now automatically get a
scrollbar on overflow instead.

Fixes: superseriousbusiness#1952
tsmethurst pushed a commit that referenced this issue Jul 8, 2023
If someone makes a post with a long, uninterrupted piece of text in a
code snippet, we would stretch the column to fit it, resulting in the
UI going a bit whacky.

By setting min-width: 0% this fixes it, and we now automatically get a
scrollbar on overflow instead.

Fixes: #1952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Frontend-related stuff
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants