Closed tmp-hallenser closed 4 years ago
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities (and 0 Security Hotspots to review)
0 Code Smells
No Coverage information
0.0% Duplication
:astonished: Congrat for finding that one.
Btw, I am across a couple of code snipped where I didn't see the logic:
What's the purpose of this line? https://github.com/LycheeOrg/Lychee-front/blob/fe0cb5415748340fc6529f5c623bf289c1cdd33f/scripts/main/init.js#L102 The events in the next section will not be triggered if you don't have a touch device.
Duplicates There seem to be a duplicates: https://github.com/LycheeOrg/Lychee-front/blob/fe0cb5415748340fc6529f5c623bf289c1cdd33f/scripts/view/main.js#L191 https://github.com/LycheeOrg/Lychee-front/blob/fe0cb5415748340fc6529f5c623bf289c1cdd33f/scripts/main/init.js#L28 and https://github.com/LycheeOrg/Lychee-front/blob/7b21ec0b5fc573ddf72f02f7f80a5a9aee51ea80/scripts/main/lychee.js#L659 https://github.com/LycheeOrg/Lychee-front/blob/7b21ec0b5fc573ddf72f02f7f80a5a9aee51ea80/scripts/frame/main.js#L60
Hybrid devices We bind many event to either click or touchend by this function: https://github.com/LycheeOrg/Lychee-front/blob/7b21ec0b5fc573ddf72f02f7f80a5a9aee51ea80/scripts/frame/main.js#L60 This falls short in case of convertible laptops, e.g. the X1 Carbon Yoga series. Why do we need this function at all? Shouldn't click be also triggered on a touch device (although a bit later in the event cascade). Furthermore, as a convertible user, I would expect the app to behave the same if I use the mouse of my finder to navigate (in particular these lines https://github.com/LycheeOrg/Lychee-front/blob/fe0cb5415748340fc6529f5c623bf289c1cdd33f/scripts/main/init.js#L104-L117)
Tested. Did not see any problem.
Btw, I am across a couple of code snipped where I didn't see the logic:
What's the purpose of this line? https://github.com/LycheeOrg/Lychee-front/blob/fe0cb5415748340fc6529f5c623bf289c1cdd33f/scripts/main/init.js#L102
The events in the next section will not be triggered if you don't have a touch device.
No clue.
Duplicates There seem to be a duplicates: https://github.com/LycheeOrg/Lychee-front/blob/fe0cb5415748340fc6529f5c623bf289c1cdd33f/scripts/view/main.js#L191
Gotta remove them then.
Hybrid devices We bind many event to either click or touchend by this function: https://github.com/LycheeOrg/Lychee-front/blob/7b21ec0b5fc573ddf72f02f7f80a5a9aee51ea80/scripts/frame/main.js#L60
This falls short in case of convertible laptops, e.g. the X1 Carbon Yoga series. Why do we need this function at all? Shouldn't click be also triggered on a touch device (although a bit later in the event cascade). Furthermore, as a convertible user, I would expect the app to behave the same if I use the mouse of my finder to navigate (in particular these lines https://github.com/LycheeOrg/Lychee-front/blob/fe0cb5415748340fc6529f5c623bf289c1cdd33f/scripts/main/init.js#L104-L117 )
Feel free to refactor that, I don't have a strong opinion. :smiley:
Fix toggling of header in 2 cases
single touch does not toggle header (#174) Event 'mousemove' gets called after a single touch and 'mousemove' makes header appear; Solution is to prevent event 'mousemove' to be called after 'touchend'
swipe forward / backward toogles header Swiping forward / backward triggers 'touchend' event, which toggles the header. Solution is to prevent toggling if 'swipeend' triggered loading of previous/next photo