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

feat(repository): lazy loading, range selection + fix(repository): fix endless force delete #838

Merged
merged 4 commits into from Jun 23, 2017

Conversation

Projects
None yet
3 participants
@azanov
Copy link
Contributor

azanov commented Mar 6, 2017

Lazy loading for thumbnails in repository (image browser)

On websites with a large amount of images (1000+) the image browser by default loads all thumbnails. This takes a lot of times and blocks further web requests until all images are loaded. To prevent this, I implemented lazy loading. Now only the thumbnails for currently visible images are loaded. Once the user resizes the window, scrolls it, uses the search function or uploads a new image, additional thumbnails are loaded on demand.

For reference see #800

Allow selecting of multiple images/files in repository (image browser) when holding the shift key

Sometimes you need to delete many images at once and selecting them one by one would take a lot of time. I added the possibility to select many images at once when holding the SHIFT key. A short demo is available here: http://recordit.co/UlMSj0cORr

Fix force-delete of images/files in repository (image browser)

The default delete function of the repository component supports deleting of multiple files and can handle the situation when one or multiple of the requested files could not be deleted for some reason. The user is then prompted to force delete the file, however, instead of requesting the deleting of only failed files, the repository component sends the whole list, including already deleted files to the server. This causes an endless loop as the server will always fail to delete some files as they have been removed in a previous request. I fixed this by filtering the file list sent to the server on force delete.

@azanov

This comment has been minimized.

Copy link
Contributor

azanov commented Mar 12, 2017

Added the possibility to select multiple images/files at once and also fixed a bug in the force delete logic.

@jankus

This comment has been minimized.

Copy link
Contributor

jankus commented Mar 12, 2017

You've mixed too many things here. You can already select multiple files at once. Why you need to hold a shift key if you can achieve the same thing without it?

@azanov

This comment has been minimized.

Copy link
Contributor

azanov commented Mar 12, 2017

Unfortunately no one reviewed the previous commit, so I pushed more changes.

Of course, currently it is possible to select multiple files. The point here is that at the moment you need to click on each individual file to select it. Try selecting 100+ files like this and you will wish to have the possibility to select ranges of files by holding the shift key. You can have a look at the video I recorded to demonstrate the change.

The change doesn't break the old logic. You still are able to select multiple files by clicking on each of them. The range selection is just an additional feature.

@azanov azanov changed the title feat(repository): add lazy loading for image thumbnails feat(repository): lazy loading, range selection + fix(repository): fix endless force delete Mar 12, 2017

@azanov

This comment has been minimized.

Copy link
Contributor

azanov commented Jun 21, 2017

Any updates on reviewing my pull request?

@maskas maskas changed the base branch from master to develop Jun 23, 2017

@maskas maskas merged commit aa574d5 into impresspages:develop Jun 23, 2017

@maskas

This comment has been minimized.

Copy link
Member

maskas commented Jun 23, 2017

Thanks, man, great addition. And sorry for me being slow.

@maskas

This comment has been minimized.

Copy link
Member

maskas commented Jun 23, 2017

It has been merged to the "dev", so will be included in next release.

@azanov

This comment has been minimized.

Copy link
Contributor

azanov commented Jun 23, 2017

Great! Thank you!

@maskas

This comment has been minimized.

Copy link
Member

maskas commented Jul 9, 2017

I've tested your improvements now. Everything seems to be working fine. Preparing ImpressPages 5.0.3

@azanov

This comment has been minimized.

Copy link
Contributor

azanov commented Jul 9, 2017

Thanks, sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment