jasp-desktop icon indicating copy to clipboard operation
jasp-desktop copied to clipboard

Image resizer for JASP editor [DO NOT MERGE]

Open akashrajkn opened this issue 4 years ago • 16 comments

Description

Allow adding and resizing images in the JASP editor. The resizing module is based on the code module available here: https://github.com/kensnyder/quill-image-resize-module (commit: kensnyder/quill-image-resize-module@60a43a2)

Related Issues

Fixes jasp-stats/INTERNAL-jasp#734

jasp-resize

akashrajkn avatar Aug 22 '20 07:08 akashrajkn

@akashrajkn could you get this branch back up to date so we can get it into 0.15?

JorisGoosen avatar Feb 03 '21 11:02 JorisGoosen

The string translations could be done later.

JorisGoosen avatar Feb 03 '21 11:02 JorisGoosen

Yes! I will do that ~today~ over the weekend

akashrajkn avatar Feb 04 '21 09:02 akashrajkn

The weekend was quite long wasn't it? ;)

JorisGoosen avatar Feb 11 '21 11:02 JorisGoosen

Can I test this and if it works merge it?

JorisGoosen avatar Feb 11 '21 15:02 JorisGoosen

@JorisGoosen I am testing this right now, shall I get back to you in a few minutes?

akashrajkn avatar Feb 11 '21 15:02 akashrajkn

Well Im not in any hurry, let me know when I can check it out! I just thought that maybe the rebase was all you needed to do still ;)

JorisGoosen avatar Feb 11 '21 16:02 JorisGoosen

@JorisGoosen I am testing this right now, shall I get back to you in a few minutes?

I tested it on Mac Catalina and it works as intended

akashrajkn avatar Feb 11 '21 17:02 akashrajkn

If you click outside quill however it stays in resizing-mode which looks a bit weird. Shouldnt Quill be unselected then and resizing stopped?

Nice catch! I will take a look at it.

akashrajkn avatar Feb 15 '21 11:02 akashrajkn

Ok nice!

Could you also add the commit you used from https://github.com/kensnyder/quill-image-resize-module to the comment? That way we can check in the future whether we need to update it or not.

JorisGoosen avatar Feb 15 '21 12:02 JorisGoosen

Update: This is an issue with the image resizer module (link). The overlay is a new div element that is created when the image is clicked. This makes the editor lose focus.

akashrajkn avatar Mar 12 '21 08:03 akashrajkn

Update: This is an issue with the image resizer module (link). The overlay is a new div element that is created when the image is clicked. This makes the editor lose focus.

Which means you cannot fix it? Well, Im not sure what the repercussions would be from that...

JorisGoosen avatar May 17 '21 10:05 JorisGoosen

Which means you cannot fix it? Well, Im not sure what the repercussions would be from that...

I forked the module and made changes to fix this issue. (But it will not be done before v0.15 release) I will pick it up after I submit key navigation in analysis forms PR.

akashrajkn avatar May 17 '21 10:05 akashrajkn

I would love to see this feature merged. I could then transition away from ppt slides to jasp files dor my stats seminars.

tomtomme avatar May 20 '22 20:05 tomtomme

@tomtomme I put this quite low on the priority list, so I didn't fix it for a while. I'll review it again sometime this month

akashrajkn avatar May 21 '22 12:05 akashrajkn

Just wanted to say that this feature would still be massively useful :D

tomtomme avatar Sep 07 '22 07:09 tomtomme

Hi @akashrajkn @JorisGoosen Any news on the progress of this PR? if it can be pushed or someone picks it up, we will have series improvements for JASP note in the next release:-)

shun2wang avatar Jun 01 '23 11:06 shun2wang

@shun2wang There is still one issue with the image resizer module:

If you click outside quill however it stays in resizing-mode which looks a bit weird. Shouldnt Quill be unselected then and resizing stopped?

The github project (https://github.com/kensnyder/quill-image-resize-module) hasn't been updated since a few years, I think this issue still occurs. Can you take a look at it?

akashrajkn avatar Jun 01 '23 12:06 akashrajkn

I was waiting for @akashrajkn to have time again, im not exactly a js wizard so if @shun2wang wants to have a look?

JorisGoosen avatar Jun 01 '23 12:06 JorisGoosen

Ah, I see... I will have a try if i could. thanks.

shun2wang avatar Jun 01 '23 12:06 shun2wang

Well, I can help out later, but Im going to be on vacation all of july and rather want to focus on the data-editing release before then. This would definitely be a nice feature to have.

And if the only problem is unselecting the resizer when clicking out I think it will fall within my JS skillset :p

JorisGoosen avatar Jun 01 '23 13:06 JorisGoosen

Replaced by https://github.com/jasp-stats/jasp-desktop/pull/5285

Hi @akashrajkn I improved it in https://github.com/jasp-stats/jasp-desktop/pull/5285 if you want have a look you can review that, thanks:-)

shun2wang avatar Oct 13 '23 06:10 shun2wang