Skip to content

Fix: Prevent the code text from sticking out of the div in Settings page documentation #2714

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

Merged
merged 2 commits into from
Mar 10, 2023

Conversation

Dedelweiss
Copy link
Contributor

@Dedelweiss Dedelweiss commented Mar 1, 2023

On the settings page, the code for the -social-links flag is sticking out.
On this PR, I just added a overflow scroll to the p elements with code.
Before:
Screenshot 2023-03-01 at 16 11 04

After:
Screenshot 2023-03-02 at 16 24 15

Reviewed-by: @ckipp01

Copy link
Member

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pr @Dedelweiss! Since this is code, do you think instead of breaking we may just want instead have an overflow that you can scroll left and right with? I typically don't like that, but in this case it might make the most sense since you don't want to potentially break on code in a place that's showing actual code, causing confusion. Wdyt?

@Dedelweiss
Copy link
Contributor Author

Dedelweiss commented Mar 2, 2023

It's true that it's better to avoid any confusion, but I don't know if people will have the intuition to scroll directly.
I have three possible solutions:
Overflow just on the line:
Screenshot 2023-03-02 at 16 24 15
think):

Overflow on the div:
Screenshot 2023-03-02 at 16 24 45

Or like this (Black with the system of copy/paste) and now the break-word is possible:
Screenshot 2023-03-02 at 16 35 14

@ckipp01
Copy link
Member

ckipp01 commented Mar 2, 2023

I think my personal preference is your first one with the overflow on the single line. It may not be super obvious, but at the same time it doesn't break the screen and provides the ability to work.

@Dedelweiss
Copy link
Contributor Author

Desc updated

Copy link
Member

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks @Dedelweiss!

@ckipp01 ckipp01 merged commit 6fe9972 into scala:main Mar 10, 2023
@julienrf
Copy link
Contributor

On Chrome the result does not look good:

Screenshot from 2023-03-13 15-12-09

@julienrf
Copy link
Contributor

It seems overflow: auto is a better fit because the scrollbars are shown only if the content does not fit:

Screenshot from 2023-03-13 15-17-36

@julienrf
Copy link
Contributor

Actually on Firefox I see no scrollbars 🤔

Screenshot from 2023-03-13 15-19-58

@julienrf
Copy link
Contributor

I’ve reverted the PR for now. I am not sure what should be the correct solution.

@Dedelweiss
Copy link
Contributor Author

Okay sorry, I will see for a better solution.

@julienrf
Copy link
Contributor

No problem, thank you for your help! Getting something that works consistently across browsers is not that easy…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants