GithubHelp home page GithubHelp logo

Pull to refresh about hackerweb HOT 9 OPEN

cheeaun avatar cheeaun commented on September 26, 2024
Pull to refresh

from hackerweb.

Comments (9)

cheeaun avatar cheeaun commented on September 26, 2024

Yeah, that's in the plans 😄

from hackerweb.

jcaudle avatar jcaudle commented on September 26, 2024

Just forked the repo. I'll take a look into it soon!

from hackerweb.

jcaudle avatar jcaudle commented on September 26, 2024

Do you think this is something that might be better in tappable?

from hackerweb.

cheeaun avatar cheeaun commented on September 26, 2024

I think it's better be a separate piece of code. The rough idea I had in mind is a touchmove event to grab the scrollTop values and animate the rotation of arrow, and touchend to detect if scrollTop reaches a certain threshold then begin refreshing.

from hackerweb.

jcaudle avatar jcaudle commented on September 26, 2024

So, still thinking of doing this? I didn't realize there was a patent on this when I suggested it... Now, according to the IPA, Twitter won't do anything, but I'm just wondering if you were still hoping to implement this...

from hackerweb.

cheeaun avatar cheeaun commented on September 26, 2024

Yeah, I think it's okay for now on the patent stuff. Before I try to implement this, I did some research and read this on Quora: http://www.quora.com/What-are-some-reasons-to-not-implement-Pull-to-refresh-UIs-and-actions-into-an-iPhone-app

Among the reasons, one that doesn't work for hnmobile is that the list of stories is not a timeline. Frontpage stories are sorted not by time but by upvotes + time + magic, so when doing pull-to-refresh, new items are not prepended to the list, the whole list just change. The feature may be cool, but not intuitive in this context, so I'm holding off till there's a better solution or a new paradigm appears. Also keeping this issue open as a reminder for myself 😄

If you're curious if pull-to-refresh may work at all in a -webkit-overflow-scrolling: touch container, here's another project that manage to implement it, which is worth reading the code: https://github.com/Harrison/Messenger

from hackerweb.

jcaudle avatar jcaudle commented on September 26, 2024

I think you are right on about the UX here. Perhaps shake to refresh would be better, but a browser based app might make that un-workable... and there's this: https://speakerdeck.com/u/mccasal/p/the-ux-of-shake-to-refresh-on-iphone-dark-side-of-ux 😄

Thanks for the tip to the Messenger app.

from hackerweb.

cheeaun avatar cheeaun commented on September 26, 2024

Hah! It is possible with shake.js https://github.com/alexgibson/shake.js/ 😃

from hackerweb.

jcaudle avatar jcaudle commented on September 26, 2024

Well, it might make more sense with the whole idiom of HN shaking things up with a refresh, but I don't know if that's necessarily the best idea to go with... 😉

from hackerweb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.