From 7db55298a3ffa6d7e59055eaeb3fcd0e23b4c8a7 Mon Sep 17 00:00:00 2001 From: thislight Date: Wed, 7 Aug 2024 17:04:54 +0800 Subject: [PATCH] PullDownToRefresh: init prototype --- bun.lockb | Bin 235447 -> 235946 bytes package.json | 1 + src/timelines/Home.tsx | 18 ++- src/timelines/PullDownToRefresh.tsx | 200 ++++++++++++++++++++++++++++ 4 files changed, 217 insertions(+), 2 deletions(-) create mode 100644 src/timelines/PullDownToRefresh.tsx diff --git a/bun.lockb b/bun.lockb index 16c0c62643a328abbaa36a81a12ea09f40e33ad6..be11679add9a734b762efc04028879c2d2e61fad 100755 GIT binary patch delta 41405 zcmeIb33yG{|313UmP1a6F(i?g$Am-%auOMisU?VcRzpNcNP%hE`u*O5vwPUf)`o zU-+xKq9|$UY3X$Kv?z+JqGY`dEDx*&0~cUbiLZgL0DS|nGO#_c9B}-Yq{QKVqsIS< z*y%q$K6T85*d!%x{P?ttvGK}&@U;8Fswf`7Q$VjwIJU!41DFG>4NL}l1A75Ifnh)| zU@c&Epfk`N_`pd~$^wyqUs`H>{3kXeT}xDJ_5TwTGk+V%WZwhU0)C3HjOGZC zwY>{`9bh=BoY~HZO-f1}pQhA+UK4s*AmdpEJN#uuYG0`CKEa5Bg>MLCX5FP;4#+~K zjZaD(hP-^Q)hXrP{R1>Ji*^+W>P1DwEZQf~ndVs_LmdawZokx51KBX!fehCW-Gu&{ zmQ$)$W;1j^mh2F+&(OOiZU8dW7_=FxC~G-%y+M-3PePWI1<)DG@OnmgFN@JY<$x^H zE!e;$>r{QCzik7uCgua#4>!TTwxX2IIsr!`t$|a$OwY!O(hy$p1%YsuO+@O@sPw#KvwEPAp6Kvi3t*WNo*ytsYDNnP6lRX-Ssib`nklj5)Vq;0%R*L zmiWBHu@VPMRDh`LtiJ+{3}plv;f4a)0?9zu?SNpTu8ht-TFLskkx>H|fQ%qHF*zR9 zqnw7$N_`#3#@Yj9V{MXX&MqsUyMRv*k&Of7sCopXeH*)xaGti;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6n z-|sZ0chS&m55E0iZymkQc!OGbDwV4?%$Pj2AHUGy@UBn!7zQ^cxUHw`jG5_-|0X~m z!R}(|A?!uw-X*KpOB~&W{xLN1^Df-N(H}l?c1_%Ed_~>aw)@ufBU^YRlg9@mLp5i& z7_yu01cr1PpZ6GY*!fH{z9u$&SFrL|9aQSMCM(^8{`6p-a>2%T55>30*fI)_?Jsy(D(uaBY8M zS93WQ&#h;BCF6Yl7wt3}C&#)b9+t#@Wjvu+)&P{66LR5{?p*zm$XZzYK~K9a(dgY` zCnTrJGu8`>m(H!!02Fr+$IkWH7bB&e1inP&O^m0Uq3J$L+i@c)-G;JS9Z>dH!))hU z9~cL(3w4$^cH8nQpRALoJXvYO_2U0H+w~q6h-{neVf|rKXZ$Zo`op@?Qi2>8d2Qxe zb~(mq{k02|WA8e7lX1zAb0~b=R|$C?^_uEmH0ym-%gU>p;-N3Kg`k7}eNE}U?5S}n znPa*&FB@h2(>+n#-KCsLzq^p_xDNbf@hC?3FY#TiF3&pXGPm%#&b|hjv2QgUOk2f7cQJPPC@d) z0USu5@$EcgqD1xM7)jpUGo%eULezBFCJ?V?26jA+zYInJc pidF_aD>&e^CB4eyX2*?e>j^RXg!;$++z(XW#`_!osLtK_e*hvxKuQ1r diff --git a/package.json b/package.json index 953d8c5..54e32ca 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "@nanostores/persistent": "^0.9.1", "@nanostores/solid": "^0.4.2", "@solid-primitives/event-listener": "^2.3.3", + "@solid-primitives/intersection-observer": "^2.1.6", "@solid-primitives/resize-observer": "^2.0.25", "@solidjs/router": "^0.11.5", "@suid/icons-material": "^0.7.0", diff --git a/src/timelines/Home.tsx b/src/timelines/Home.tsx index 2a193f0..2330354 100644 --- a/src/timelines/Home.tsx +++ b/src/timelines/Home.tsx @@ -38,12 +38,14 @@ import BottomSheet from "../material/BottomSheet"; import { $settings } from "../settings/stores"; import { useStore } from "@nanostores/solid"; import { vibrate } from "../platform/hardware"; +import PullDownToRefresh from "./PullDownToRefresh"; const TimelinePanel: Component<{ client: mastodon.rest.Client; name: "home" | "public" | "trends"; prefetch?: boolean; }> = (props) => { + const [scrollLinked, setScrollLinked] = createSignal(); const [ timeline, snapshot, @@ -108,7 +110,18 @@ const TimelinePanel: Component<{ return ( <> -
+ refetchTimeline({ direction: "new" })} + /> +
+ setTimeout(() => { + setScrollLinked(e.parentElement!); + }, 0) + } + > {(item, index) => { return ( @@ -249,8 +262,9 @@ const Home: ParentComponent = (props) => { overflow: visible auto; max-width: 560px; height: 100%; - padding: 40px 16px; + padding: 0 16px; scroll-snap-align: center; + overscroll-behavior-block: none; @media (max-width: 600px) { padding: 0; diff --git a/src/timelines/PullDownToRefresh.tsx b/src/timelines/PullDownToRefresh.tsx new file mode 100644 index 0000000..81590ea --- /dev/null +++ b/src/timelines/PullDownToRefresh.tsx @@ -0,0 +1,200 @@ +import { + createEffect, + createRenderEffect, + createSignal, + onCleanup, + Show, + untrack, + type Component, + type Signal, +} from "solid-js"; +import { css } from "solid-styled"; +import { Refresh as RefreshIcon } from "@suid/icons-material"; +import { CircularProgress } from "@suid/material"; +import { + createEventListener, + makeEventListener, +} from "@solid-primitives/event-listener"; +import { + createViewportObserver, + createVisibilityObserver, +} from "@solid-primitives/intersection-observer"; + +const PullDownToRefresh: Component<{ + loading?: boolean; + linkedElement?: HTMLElement; + onRefresh?: () => void; +}> = (props) => { + let rootElement: HTMLDivElement; + const [pullDown, setPullDown] = createSignal(0); + + const pullDownDistance = () => { + if (props.loading) { + return 140; + } + return Math.max(Math.min(160, pullDown()), 0); + }; + + const obvx = createVisibilityObserver({ + threshold: 0.0001, + }); + + const rootVisible = obvx(() => rootElement); + + let released = true; + let v = 0; + let lts = -1; + let ds = 0; + let holding = false; + const M = 1; + const K = -10; + const D = -10; + const updatePullDown = (ts: number) => { + released = false; + try { + const x = untrack(pullDown); + const dt = lts !== -1 ? ts - lts : 1 / 60; + const fs = (ds / Math.pow(dt, 2)) * M; + const fh = (x + ds) * K + D * v; + const f = fs + fh; + const a = f / M; + v += a * dt; + if (holding && v < 0) { + v = 0 + } + setPullDown(x + v * dt); + if (Math.abs(x) > 1 || Math.abs(v) > 1) { + requestAnimationFrame(updatePullDown); + } else { + v = 0; + lts = -1; + } + if (!holding && untrack(pullDownDistance) >= 160 && !props.loading && props.onRefresh) { + setTimeout(props.onRefresh, 0) + } + } finally { + ds = 0; + released = true; + } + }; + const handleLinkedWheel = (event: WheelEvent) => { + const scrollTop = (event.target as HTMLElement).scrollTop; + if (scrollTop >= 0 && scrollTop < 1) { + ds = -(event.deltaY / window.devicePixelRatio); + if (released) { + released = false; + requestAnimationFrame(updatePullDown); + } + } + }; + + createEffect((cleanup?: () => void) => { + if (!rootVisible()) { + return; + } + cleanup?.(); + const element = props.linkedElement; + if (!element) return; + return makeEventListener(element, "wheel", handleLinkedWheel); + }); + + let lastTouchId: number | undefined = undefined; + let lastTouchScreenY = 0; + const handleTouch = (event: TouchEvent) => { + if (event.targetTouches.length > 1) { + lastTouchId = 0; + lastTouchScreenY; + return; + } + const item = event.targetTouches.item(0)!; + if (lastTouchId && item.identifier !== lastTouchId) { + lastTouchId = undefined; + lastTouchScreenY = 0; + return; + } + holding = true; + if (lastTouchScreenY !== 0) { + ds = item.screenY - lastTouchScreenY; + } + lastTouchScreenY = item.screenY; + if (released) { + released = false; + requestAnimationFrame(updatePullDown); + } + }; + + const handleTouchEnd = () => { + lastTouchId = undefined; + lastTouchScreenY = 0; + holding = false; + if (untrack(pullDownDistance) >= 160 && !props.loading && props.onRefresh) { + setTimeout(props.onRefresh, 0) + } + }; + + createEffect((cleanup?: () => void) => { + if (!rootVisible()) { + return; + } + cleanup?.(); + const element = props.linkedElement; + if (!element) return; + const cleanup0 = makeEventListener(element, "touchmove", handleTouch); + const cleanup1 = makeEventListener(element, "touchend", handleTouchEnd); + return () => (cleanup0(), cleanup1()); + }); + + css` + .pull-down { + width: 100%; + display: flex; + justify-content: center; + margin-top: -2rem; + height: calc(1px + 2rem); + } + + .indicator { + display: inline-flex; + justify-content: center; + align-items: center; + box-shadow: ${props.loading + ? "var(--tutu-shadow-e12)" + : "var(--tutu-shadow-e1)"}; + border-radius: 50%; + aspect-ratio: 1/1; + width: 2rem; + color: var(--tutu-color-primary); + transform: translateY(${`${pullDownDistance() - 2}px`}); + will-change: transform; + z-index: var(--tutu-zidx-nav); + background-color: var(--tutu-color-surface); + + > :global(.refresh-icon) { + transform: rotate( + ${`${((pullDownDistance() / 160) * 180).toString()}deg`} + ); + will-change: transform; + } + + > :global(.refresh-indicator) { + width: 1.5rem; + height: 1.5rem; + aspect-ratio: 1/1; + } + } + `; + return ( +
+ + } + > + + + +
+ ); +}; + +export default PullDownToRefresh;