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

Slow preview animation #64

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

UtmostCreator
Copy link
Contributor

Commit message "feat: slow appearing of the first image in the image preview added with opacity from 0.1 to 1 in 2.45s; after the slides are initiated transition pushed on to 0.57s"

…th opacity from 0.1 to 1 in 2.45s; after the slides are initiated transition pushed on to 0.57s
@@ -57,6 +57,13 @@ humhub.module('gallery', function (module, require, $) {
});
};

$('#gallery-media-container .panel-body').one('click', function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the gallery.js is only loaded once, so this event handler won't be attached when leaving and reentering the gallery view. Such handlers should be attached within the init function.

Copy link
Contributor Author

@UtmostCreator UtmostCreator Aug 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thank you, @buddh4!

Yeah, for sure, you are right!
I will fix it (by moving this part to init function) today a bit later.

@UtmostCreator
Copy link
Contributor Author

UtmostCreator commented Aug 28, 2020

I fixed this, But I was needed to add some extra code to the main repo file:
static/js/humhub/humhub.ui.gallery.js -- the changes which was made FILE: humhub.ui.gallery.js
Please also see the gallery related PR(in main HumHub repo): PR link

I you will have time try to swtich to another gallery and then go back to see that sometimes the transition did not take place, any ideas?
I will try to analize it one more time it to find the issues.
Thank you!

@UtmostCreator
Copy link
Contributor Author

Most of the code has been moved to static/js/humhub/humhub.ui.gallery.js file to avoid duplication.

I have noticed that .slide-loading class does not work properly; So I believe it was broken somehow at some point because the spinner (which before did not spin around) and even if I add my class with CSS rotation, it does not snip, however, it does work outside of this class.

I would appreciate any ideas if this loader is needed.
Please take a look at this commit along with the gallery related PR(in main HumHub repo):PR link
Thank you!

@buddh4
Copy link
Contributor

buddh4 commented Sep 4, 2020

For me the loader animation works fine, once I click on an gallery image a loader appears until the image is loaded. The spinner should look like the default spinner at: https://blueimp.github.io/Gallery/

Can you recreate your problem in the community?

  • Create a post with some images on your profile
  • On chrome, open the browser console network tab and "Disable cache" so the images are loaded each time
  • Click on one of the images

@UtmostCreator
Copy link
Contributor Author

UtmostCreator commented Sep 4, 2020

Here is the issues url
Please take a look at this PR

What should I do next? Please let me know 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

Successfully merging this pull request may close these issues.

2 participants