feat: ship Wave 5-6 multi-surface hygiene, optimization, and bug fixes
This commit is contained in:
parent
01ef3293cf
commit
66b6b45ba9
399 changed files with 17828 additions and 11330 deletions
|
|
@ -80,16 +80,31 @@ export function AppLoopDemo() {
|
|||
timers.current = []
|
||||
}, [])
|
||||
|
||||
// 화면 밖·숨은 탭에서는 멈춘다.
|
||||
// 화면 밖·숨은 탭에서는 멈춘다. 두 상태를 분리 추적해 탭 복귀가 오프스크린 상태를 덮어쓰지 않도록 한다.
|
||||
useEffect(() => {
|
||||
const el = rootRef.current
|
||||
if (!el) return
|
||||
const observer = new IntersectionObserver(([entry]) => setOffscreen(!entry.isIntersecting), { threshold: 0.2 })
|
||||
observer.observe(el)
|
||||
const onVisibility = () => setOffscreen(document.hidden)
|
||||
let isHidden = document.hidden
|
||||
let isOutOfViewport = false
|
||||
const syncOffscreen = () => setOffscreen(isHidden || isOutOfViewport)
|
||||
syncOffscreen()
|
||||
|
||||
const observer = typeof IntersectionObserver !== 'undefined'
|
||||
? new IntersectionObserver(([entry]) => {
|
||||
if (!entry) return
|
||||
isOutOfViewport = !entry.isIntersecting
|
||||
syncOffscreen()
|
||||
}, { threshold: 0.2 })
|
||||
: null
|
||||
observer?.observe(el)
|
||||
|
||||
const onVisibility = () => {
|
||||
isHidden = document.hidden
|
||||
syncOffscreen()
|
||||
}
|
||||
document.addEventListener('visibilitychange', onVisibility)
|
||||
return () => {
|
||||
observer.disconnect()
|
||||
observer?.disconnect()
|
||||
document.removeEventListener('visibilitychange', onVisibility)
|
||||
}
|
||||
}, [])
|
||||
|
|
@ -131,7 +146,7 @@ export function AppLoopDemo() {
|
|||
|
||||
return clearTimers
|
||||
// sampleIndex가 바뀌면 다음 예시로 다시 짠다.
|
||||
}, [running, sampleIndex, t, clearTimers]) // eslint-disable-line react-hooks/exhaustive-deps
|
||||
}, [running, sampleIndex, t, clearTimers])
|
||||
|
||||
// 파형: 앱과 같은 알고리즘(cos 가중치 × 레벨 × 무작위, 스무딩)으로 100ms마다 갱신.
|
||||
useEffect(() => {
|
||||
|
|
|
|||
|
|
@ -41,12 +41,12 @@ export function Download() {
|
|||
<p className="mt-5 keep-ko text-sm leading-relaxed text-neutral-400">{details}</p>
|
||||
|
||||
<p className="mt-3 flex flex-wrap gap-x-6 text-sm">
|
||||
<a href={DESKTOP_RELEASE_HUB_URL} target="_blank" rel="noopener" className="link inline-flex min-h-[44px] items-center gap-1">
|
||||
<a href={DESKTOP_RELEASE_HUB_URL} target="_blank" rel="noopener noreferrer" className="link inline-flex min-h-[44px] items-center gap-1">
|
||||
{t.download.releaseNotes}
|
||||
<ExternalIcon />
|
||||
<span className="sr-only">({t.a11y.opensInNewTab})</span>
|
||||
</a>
|
||||
<a href={`${DESKTOP_FEED_URL}/latest.yml`} target="_blank" rel="noopener" className="link inline-flex min-h-[44px] items-center gap-1">
|
||||
<a href={`${DESKTOP_FEED_URL}/latest.yml`} target="_blank" rel="noopener noreferrer" className="link inline-flex min-h-[44px] items-center gap-1">
|
||||
{t.download.checksum}
|
||||
<ExternalIcon />
|
||||
<span className="sr-only">({t.a11y.opensInNewTab})</span>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export function Footer() {
|
|||
<a
|
||||
href={DESKTOP_RELEASE_HUB_URL}
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-block py-2 text-neutral-300 transition-colors hover:text-white"
|
||||
>
|
||||
{t.footer.releaseNotes}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue