Skip to content

Conversation

@dojutsu-user
Copy link
Member

@dojutsu-user dojutsu-user commented Nov 4, 2018

Fixes #697

Final result:
dimpledmediocreherald-small

@dojutsu-user
Copy link
Member Author

@Blendify
Copy link
Member

Blendify commented Nov 5, 2018

Oops wrong PR

@Blendify
Copy link
Member

Blendify commented Nov 5, 2018

I think this makes sense but one additional thing that should be added is swipe gesture support

Seems pretty simple, here is a jquery example: http://demos.jquerymobile.com/1.3.2/examples/panels/panel-swipe-open.html#&ui-state=dialog

@dojutsu-user
Copy link
Member Author

@Blendify
I don't know why, but I didn't get it working with jquery.
But it is working fine with vanilla javascript.
Here is the final result

ezgif-5-db0d8c0d67dd

@dojutsu-user
Copy link
Member Author

dojutsu-user commented Nov 6, 2018

@jessetan
I think I have added all the improvements suggested by you.
Also, I have changed the javascript code to jquery, implementing the swiperight and swipeleft events, but for some reason it is still not working.

Copy link
Contributor

@jessetan jessetan left a comment

Choose a reason for hiding this comment

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

Using swipelft and swiperight events do not work because they require jQuery mobile, we only include jQuery at this time.
Using vanilla JS (as you had before) is probably better than adding a whole new library. I suggest you do add some more logic to discern real horizontal swipes from "touches" that have a strong vertical component (e.g. a diagonal swipe)

@dojutsu-user
Copy link
Member Author

@jessetan
Added the improvements.
I googled a little bit and found that maximum allowed time for the swiping so that the sidebar slides in can be added.
I have added it.
Need you review.

@jessetan
Copy link
Contributor

If I run this in desktop Chrome devtools with device emulation, my vertical scrolling is broken when the menu is visible. Does it work for you (on a real device)?

@dojutsu-user
Copy link
Member Author

@jessetan

my vertical scrolling is broken

Exactly what you mean by this?
I tested it on a real device and the only unexpected thing I noticed that if I'm on a middle of a page and swiped right (to open navbar), then it move me back to the starting of the page.

@jessetan
Copy link
Contributor

Exactly what you mean by this?

I mean that I can swipe up and down to scroll the body content when the menu is collapsed, but when the menu is open I can not swipe up and down to scroll the body content nor the contents of the menu if it is longer than can fit on the screen.

@dojutsu-user
Copy link
Member Author

@jessetan
When the menu is open, swiping up/down on the body is not there. But I can swipe up/down on the menu if it is longer than the screen size (tested on a real device).

ezgif-4-68eed51cc744

@dojutsu-user
Copy link
Member Author

@jessetan
Any update on this?

@jessetan
Copy link
Contributor

jessetan commented Feb 5, 2019

Expanding the menu on the "Paragraph level markup" page in the the documentation (https://sphinx-rtd-theme.readthedocs.io/en/latest/demo/demo.html) makes the content part invisible. This works if I remove the position: fixed on .wy-nav-content-wrap.shift but there may be other side effects.

Is it possible to close the menu when the content part is clicked/tapped? That feels more logicol on mobile

With this PR I can't seem to do inertial scrolling (is that the name?) on mobile Chrome or Safari where you give it a fast flick and it keeps scrolling for a while

@Blendify Blendify added this to the 3.0 milestone Mar 23, 2021
@humitos humitos modified the milestones: 3.0, 3.1 Aug 12, 2024
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.

Smooth opening/closing of sidebar.

4 participants