libertysoft3 / saidit

The reddit open source fork powering SaidIt
https://saidit.net
Other
228 stars 39 forks source link

Image resize in expando: allow expanding off page to view images very zoomed in #15

Closed libertysoft3 closed 5 years ago

libertysoft3 commented 5 years ago

Basically port the RES implementation of image resizing. The resizer that exists now can only expand the image to the parent container's width.

wizzwizz4 commented 5 years ago

Do you mean click to toggle 100% zoom + native scrollbars? If so, that shouldn't be too hard to do. JavaScript to toggle a class, and a dash of CSS, and we'll be golden.

What browsers should I keep in mind when making my edits to the code? Latest spec? Latest spec + Chrome? Latest spec + Firefox + Chrome + IE11?

IE6? *the sound of screams is faintly heard*

libertysoft3 commented 5 years ago

I mean the RES (image/video) expando interface, on subreddit/post list pages, where you mouse over and get "rotate clockwise", save, reverse image search, etc.

In that interface, when you click and drag on the image, you can make it really big. You can also hold shift and move the image around. You can inspect images pretty well. These two behaviors are what we want.

SaidIt has a simpler version of drag to resize already, except it is used in more places than RES I guess. html changes can be directly made in the templates as opposed to js if it is warranted.

The spec is to match the spec of whatever you are using... reddit is full of jquery so matching that code style and compatibility is good.

wizzwizz4 commented 5 years ago

RES is released under the GPL, so we'd have to re-implement the code anyway.

libertysoft3 commented 5 years ago

@wizzwizz4 Why can't we copy and paste GPL code into here if we want? I think we can, especially if we put some license crap here and there.

wizzwizz4 commented 5 years ago

CPAL isn't compatible with GPL, and the project's released under CPAL.

If we say that the code is multi-license then it gets hideously complicated for other people (and, eventually, you) to use the code, but we can copy and paste GPL code in, so long as it's marked separately. I'm not a lawyer, though, so my expertise (heh) only goes so far.

libertysoft3 commented 5 years ago

@wizzwizz4 I think it's fine. CPAL is more restrictive, but we want to move less restrictive GPL code into a more restrictive CPAL codebase. We still satisfy GPL requirements because we publish the code.

Going the other way, like trying to release some or all CPAL code as GPL, I think that would be a problem. Anyway my recommendation is to focus on code quality and to not worry about it unless it becomes an issue.

With that being said, I don't want the whole RES image manipulation UI, just the resizing bits.

wizzwizz4 commented 5 years ago

You're right. However, if we modify the GPL code at all, we'll have to dual-license our modification in order to satisfy the "no restrictive forks" requirement.

libertysoft3 commented 5 years ago

I'd be cool with dual licensing the code or re-implementing or whatever we need to do to keep it legit. I think the only one people concerned with the license are Reddit Inc. (maybe someday), and f-droid who checks to see if the site you are connecting to is a non-free-resource or something like that.