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

Edition tool takes too much space on large screens #9

Open
SalomonBrys opened this issue Jan 11, 2022 · 3 comments
Open

Edition tool takes too much space on large screens #9

SalomonBrys opened this issue Jan 11, 2022 · 3 comments
Assignees

Comments

@SalomonBrys
Copy link

SalomonBrys commented Jan 11, 2022

This bug started at 0.5.3

Screenshot 2022-01-11 at 13 05 20

As you can see in the screenshot, on large (2K) monitors, the code medium UI now takes more space than it needs, shrinking unnecessarily the Medium blog editor.

Clicking anywhere in the gray space around the code editor closes the editor.

@Maluen
Copy link
Owner

Maluen commented Jan 11, 2022

That part of the code wasn't changed in v0.5.3, the feature was requested in #2 and implemented in 6083535#diff-84b7cee7bfd122a4066f77c9922422bde6e5e0c4e25aa5060d42a7f812299896R44-R62

It leaves 740px for the medium UI and the rest is used by code-medium.

Maybe we could set a max-height or different breakpoints. Do you have any suggestion? @SalomonBrys

@Maluen Maluen self-assigned this Jan 11, 2022
@SalomonBrys
Copy link
Author

My bad.
I probably never noticed it because I usually take time to write when I'm on the move, so not on a large screen.

I think these big gray spaces are useless, so ideally, I'd like the code-medium popup to take its regular 900px and leave the rest to Medium.

In essence:

if (windowWidth < 1640) {
    mediumWidth = 740;
    codeWidth = windowWidth - 740;
} else {
    codeWidth = 900;
    mediumWidth = windowWidth - 900
}

What I am requesting is clearly a feature, not a bug, so feel free to tell me that it's a bad idea and close it without fixing it ;)
Your tool is still a must have for me!

@Maluen
Copy link
Owner

Maluen commented Jan 13, 2022

The medium UI has a max-width of 740px regardless of screen size. You can check the .postArticle-content .sectionLayout--insetColumn element to see

screenshot_18

Which is why code-medium is using "100% - 740px". In the end it is a matter of "grey" bars of code-medium VS "white bars" of the medium UI. FYI you can click on the grey bars to close the code-medium UI, instead of having to click on the small X on top right.

Even though I agree that in large screens the very big grey bars are ugly and not really useful.

That being said, I can change the CSS to increase the max-width of the medium-ui, but it will stretch the content, meaning for example a paragraph that wraps 3 lines will be stretched into a single line, which in a way will break the "preview" of how the finished published article will look like.

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

No branches or pull requests

2 participants