9 ms·
Pull to Refresh.js
- eoinmurray92 8y agoIt would be good to have this on npm also
- aapokiiso 8y agoLooks like it's already there: https://www.npmjs.com/package/pulltorefreshjs https://www.npmjs.com/package/pulltorefreshjs
- promopacket 8y agoLove the slot machine mechanic of pulling to refresh [0] [1] [2]. Over the years it's grown to become quite satisfying. Mmm.. dopamine. [0] https://thebrag.com/truth-facebook-pull-refresh-feature/ https://thebrag.com/truth-facebook-pull-refresh-feature/ [1] https://www.vice.com/en_us/article/vv5jkb/the-secret-ways-social-media-is-built-for-addiction https://www.vice.com/en_us/article/vv5jkb/the-secret-ways-so... [2] http://www.businessinsider.com/ex-googler-slams-designers-for-making-apps-addictive-like-slot-machines-2016-5 http://www.businessinsider.com/ex-googler-slams-designers-fo...
- elliottcarlson 8y agoArticle [1] doesn't mention pull to refresh; Article [2] mentions pull to refresh in the context of email; There is no dark pattern here; yes social media itself is made to be addicting. Pull to refresh is an intuitive UX pattern that can either assist in enabling the addictive behavior, but it is not the cause of it, not only to be used in that kind of scenario.
- ponderatul 8y agoIn a bank robbery, if you are driving the getaway car you are not techinically the cause of the robbery, but you sure as hell enabled the robber to get away clean.
- ihuman 8y agoAre you serious? It's just a way to refresh without using a dedicated refresh button.
- efskap 8y agoOn the surface that's what it is, yes. It's a dark pattern with dynamic content though, and the linked articles explain it better than I can.
- Latty 8y agoIt's a pretty big misrepresentation to claim that pull to refresh is a problem, when the core of the issue the "dynamic content" as you put it. It's like blaming weight problems on good cutlery. Yes, it's a tool that can be abused in the right (or more aptly, wrong, I guess) circumstances, that doesn't make it a dark pattern in other situations.
- StavrosK 8y agoThese articles are talking about the reward loop of getting new content every time you refresh, and you're misrepresenting that to presumably make a point about pull-to-refresh, which is completely unrelated.
- deleted 8y ago[deleted]
- rhacker 8y agoWow, hadn't realized it was a dark pattern. After thinking it through though, is it really a bad way to update a page? I realize we have the tech to easily dynamically update content without user consideration, but that ends up leading to people clicking on the wrong thing (the order suddenly changed on them as the finger went down). So given that an explicit refresh button either takes up screen space or is another action (say full page refresh?) should this really be considered a dark pattern if you're say, in your own inbox?
- dlhavema 8y agoI thought this pattern was losing favor? Since it makes generic swiping/navigation more difficult to track?
- ashelmire 8y agoIt might be losing favor amongst people that care about design and functionality. But it is implemented for another purpose; to create an addictive habit that keeps you on a social media platform.
- ggregoire 8y agoFor those like me who have no idea what this library is about: https://en.wikipedia.org/wiki/Pull-to-refresh https://en.wikipedia.org/wiki/Pull-to-refresh
- usermac 8y agoI learned the history and now I know Apple didn't do it first as I once thought. Nice. Thx.
- mchahn 8y ago> now I know Apple didn't do it first It may not be apple's fault, but many apple fans incorrectly think features originated at apple, like mobile fingerprint scanning. My daughter thinks apple invented everything. :-)
- nrjames 8y agoThe first thing I tried was pull to refresh on the linked page, but it does not appear to be implemented there.
- dandr01d 8y agoIt strangely only worked for me the second time I viewed the page.
- Raphmedia 8y agoClick "Demos" first. ;)
- rsoto 8y agoIf you open that page with a touch-enabled device, you can check the demo on the main page, since it relies on touch events. Or as stated before, try opening the demos.
- amelius 8y agoIt's 2018. Refresh should be automatic and continuous!
- RandallBrown 8y agoI don't agree. If something is continually refreshing you would lose your context without doing anything. It would be disorienting if you scrolled down a little, scrolled back up and found the thing you were looking at was no longer there.
- amelius 8y agoInstead of disappearing, items can be shown e.g. grayed-out. You could then refresh to remove the grayed-out items, but in practice you wouldn't need to. Another approach is to use a "hold" button, which suspends all external updates.
- protonimitate 8y agoAlso not ideal if you are operating on limited data connection (takes forever to load) or are trying to continuously load an expensive webpage.
- vinceguidry 8y agoYeah that's one of my biggest gripes with Quora, you can totally lose content that you wanted to read or respond to through any act of carelessness that leads to a page load or even the page bugging out.
- dlhavema 8y agodo a search on thingiverse.com and then scroll down. if you search a big enough topic every 20 or 30 seconds as your scrolling it jumps up and you lose your place.. i'm not sure how to avoid this feature, but it is truly annoying
- mchahn 8y ago> i'm not sure how to avoid this feature Talk about a bug being called a feature. This drives me crazy.
- darepublic 8y agoI really needed this ~2.5 years ago
- rsoto 8y agoHey! One of the main devs behind pulltorefresh.js here. Initially we created a small script to simulate the pull to refresh gesture because in one of our user experience sessions, the users were having trouble with how to reload the information shown. A few months later we decided to open source it and on december 2016 it hit HN front page, glad to see it again! I'm here to answers some questions, if you have any.
- mxschumacher 8y agoWe're using it in prod at Workwell.io - thanks for building & releasing pulltorefresh :)
- rsoto 8y agoI'm glad you found it useful!
- erickj 8y agoThe only wrong with this is the octopus logo has 9 arms
- 83457 8y ago{insert that's not an arm joke here}
- deleted 8y ago[deleted]
- workinthehead 8y agoOn an octopus, it is!
- greggman 8y agoI guess I'm the only one that absolutely loathes pull to refresh. I try to scroll back to the top to reference something and loose my work whatever comment I was in the middle of typing, or I lose my place, because i didn't want to refresh and now the old content is gone. happens several times a week on iOS chrome >:(
- Nadya 8y agoYou're not alone - I hate it too. I always think this problem is easily solved as well. Since touch gestures can already account for "one finger or two". A two finger vertical gesture should refresh (because horizontal zooms), a one finger gesture should scroll.
- ovao 8y agoCounter-argument: two-finger gestures are unergonomic for single-handed use. Sometimes that’s an unreasonable trade off; sometimes not.
- Nadya 8y agoCounter-Counter-Argument: Refreshing a page is probably as or less common as needing to zoom a page. Scrolling is far more common than needing to refresh a page. Breaking one-handed scrolling in order to allow for one-handed refreshing seems like a poor choice. Especially when my browser already has a built in refresh button that's easily accessible with one hand. My mobile browser does not, however, have a built in scroll-bar for one handed scrolling in the event a site breaks scrolling in favor of refreshing. In fact, since the scroll gesture is such a standard websites are often designed around not having a vertical scrollbar for mobile because it's pointless... that is, unless they break scrolling. I find the concept convenient. I find the execution terrible.
- jexah 8y agoYou're mentioning something about zooming with two hands. I exclusively use one hand to browse, and I use double tap drag to zoom. The thing I find most annoying is moving my hand from the bottom of the screen up a bit to reach the navbar, whether to swipe to move to a newly opened tab, to close a tab, or to enter something in the url. Usually though, those actions only take place when I am "done" on a site, not in the middle of using the site, like refresh. I have never accidently refreshed a page using Chrome's pull to refresh, and so I love it. Having said that, if a developer wanted to refresh part of a page using pull to refresh, they would have to be very careful that it is implemented well. This library seems to do it pretty well, and does not conflict with Chrome's pull to refresh. Anyway, you made the argument that pull to refresh breaks scrolling. I strongly disagree. I've seen some pretty shocking broken scrolling, but modals that prevent scrolling (and have js errors which prevent closing) are usually the cause. I've never see a "pull to anything" gesture break scrolling what-so-ever.
- oftenwrong 8y agoI dislike when actions that are typically built into a web browser or OS are re-implemented by individual sites in javascript. It creates an inconsistent experience. I don't want a scrolling behaviour that is unique to your site, even if it's cool. I want all pages to scroll the same way. If I "pull" on your site, I am trying to scroll up a little bit. That is what a "pull" means on every other site when viewed in my browser, so that is what I expect to happen, not a refresh. If I wanted to refresh, I would have used my browser's built-in refresh button.
- guskel 8y agoUnfortunately most consumers want behavior like this.
- blowski 8y agoI’d disagree strongly. I’d argue that “Pull down to refresh” is still a bit of a geeky trick. Either way, you’d want a lot of user testing.
- dave5104 8y agoThe worst offender I've found is websites that hijack the swipe gesture, either on a touchpad or on a touch device. Instead of going back in the browser, it'll go to another page on the site as if you wanted to swipe to the next article.
- coding123 8y agoI get the sentiment, but I would say that scroll jacking is a lot worse than pull to refresh jacking. Also just realized I'm not sure this script would work too differently if your talking about a desktop Webapp.
- samet 8y agoAgreed. One of the worst things that websites implement is overriding the history. In particular, "listicles" are doing that. When you go back, it goes back to the previous list item in the text even all the content lies in a single page app.
- 8y ago
- 0x0 8y agoWhen I try to select text for copy-paste on the demo page, it instead pulls to refresh and reloads the page, not letting me select any text: https://www.boxfactura.com/pulltorefresh.js/demos/basic.html https://www.boxfactura.com/pulltorefresh.js/demos/basic.html (chrome 67 on mac)
- randomsofr 8y agoThis library is meant for mobile.
- rsoto 8y agoIn the demos we include touch emulator by hammer.js, that's why it's breaking it; it's not meant to be used like that.
- 0x0 8y agoAn improvement to your demo would to explain this touch emulator and maybe have a checkbox toggle it. My first impression was "this is breaking desktop browsers, I'll never be able to use this". Just giving an honest first impression :)
- lcnmrn 8y agoThere’s a Firefox for Android add-on that’s using this script: https://addons.mozilla.org/en-US/android/addon/pull-to-refresh/ https://addons.mozilla.org/en-US/android/addon/pull-to-refre... I guess it just injects the script in every page, but it works nicely, just like Pull to Refresh in Chrome.
- crooked-v 8y agoI think my own preference would be to make a web app that doesn't need to be manually refreshed at all in normal operation, via some simple polling heuristics (and careful use of 304s on the server to minimize the total traffic).
- homero 8y agoI like it
- deleted 8y ago[deleted]
- andresakle 8y agoThere is a much better option (weights half as much) for implementing this same functionality: pull-to-reload @ npmjs.com