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

Code blocks are being created with a fixed height #3

Closed
gustavo-depaula opened this issue Aug 18, 2019 · 6 comments
Closed

Code blocks are being created with a fixed height #3

gustavo-depaula opened this issue Aug 18, 2019 · 6 comments

Comments

@gustavo-depaula
Copy link
Contributor

It seems that every code block is being created with a fixed height. Small blocks get extra padding at the bottom:
image
and large blocks get cut:
image

@Maluen
Copy link
Owner

Maluen commented Aug 18, 2019

I don't think this has anything to do with the extension itself, the dispayed code is handled directly by Medium.

Don't you get the same when pasting directly a gist URL created without the extension (with "add an embed" button)?

@Maluen
Copy link
Owner

Maluen commented Aug 18, 2019

Yes, I tried with a new gist created without the extension, disabled the extension completely and added the gist in a new article. It still shows the bug, so it must be a Medium issue.

By the way, the problem is only visible in the editor itself. For example viewing the draft link shows the full gist.

@Maluen
Copy link
Owner

Maluen commented Aug 18, 2019

It would be nice if the extension would be able to fix this issue.

Basically the problem seems to be that Medium doesn't know the iframe height and thus just uses a fixed height.

In the other end, in the draft / published link uses the correct height, probably Medium calculates it when creating the link.

@gustavo-depaula
Copy link
Contributor Author

oh!
thanks for the answer!
it makes sense to me, i'll close the issue then

@Maluen Maluen reopened this Aug 18, 2019
Maluen added a commit that referenced this issue Aug 21, 2019
@Maluen
Copy link
Owner

Maluen commented Aug 21, 2019

I've just published version 0.4.0 to chrome & firefox extension stores.

It detects the code block real height and sets it accordingly so that there are no extra padding and the content is displayed fully.

It is possible that Medium will fix the bug themselves in the future, in this case we can just remove this feature if needed.

@Maluen Maluen closed this as completed Aug 26, 2019
@esr360
Copy link

esr360 commented Dec 3, 2019

@Maluen amazing!

What's interesting is that this wasn't an issue with Medium until only a few months ago. It was working fine, then they broke it, and never bothered to fix it.

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

3 participants