sindresorhus/refined-github

Github image scaling on comment stream #2935

stdedos posted onGitHub

<!-- Thanks for contributing! 🏓 -->

Example issue: https://github.com/sublimehq/Packages/issues/1781#issuecomment-604070962

The scaling done on the images in issue comments is annoying. Basically, if the image width is bigger than the issue box, then you must open the image to read it on a separate tab.

For me (i.e. my JS level), it is very easy to solve, and I already love it:

image

i.e. disable max-width: 100%; on the element and the class


However, for Refined Github's level:

  • Add a horizontal scrolling bar; the "normal" one or one of those cute round "invisible" gray ones, and/or
  • Add an "expand" button that would widen the issues a little bit (there is more space in WQHD monitors) / pop up the image

It looks fine by me?? misunderstood.

Disagree. nmv

posted by yakov116 about 5 years ago

I see your point, ideally clicking the image would show it full size.

Then clicking it again would reset it.

You're lucky! Clicking the image already does show it as big as possible, in a new tab, automatically, thanks to Markdown's automatic image linking.

Pros:

  • 1 click to open it
  • 1 click to close it (or keyboard shortcut: ctrl+w/cmd+w)
  • fits your whole window without scrollbars
  • lets you easily zoom in and scroll
  • we don't have to write any code for it 🎉

The alternative would be to show it in a lightbox... but what's the advantage? Too much work just to avoid opening a new tab.

... at least as far as Refined GitHub is concerned.

Maybe GitHub will accept your feature if you ask them.

posted by fregante about 5 years ago

For other purposes, I suggest using a browser addon like Imagus that provides a dynamic popup for all images and even special handlers for some sites.

posted by FichteFoll about 5 years ago

Fund this Issue

$0.00
Funded

Pull requests