docs(recipes): safe-area-layout partner/game 분기 + subscribe stale (#93)#94
Merged
Merged
Conversation
#93) - partner WebView 는 토스 상단바가 viewport 밖이라 SafeAreaInsets.get().top 을 padding 으로 쓰면 중복 공간이 생긴다. 코드 예제에 __WEB_VIEW_TYPE__ 분기를 추가하고 :::caution 으로 명시. - subscribe payload 가 회전 후 stale 일 수 있으므로 signal 로만 쓰고 get() 으로 다시 읽는다. - ko (primary) / en mirror 양쪽 동기 갱신.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SafeAreaInsets.get().top을 padding 으로 적용하면 헤더 위 중복 공간이 생긴다. 코드 예제에__WEB_VIEW_TYPE__(vitedefine으로granite.config.ts의webViewProps.type노출) 분기를 추가하고:::caution블록으로 명시.game/external은 기존대로 padding 적용.SafeAreaInsets.subscribepayload 가 landscape→portrait 회전 직후top채널을 직전 landscape 의left/right값으로 stale 전달하는 사례가 실측 확인됐다 (deterministic). callback 안에서 payload 를 버리고get()으로 재독하는 패턴으로 예제 갱신 +:::caution명시.Closes #93
Test plan
pnpm build통과 (Docusaurus prod 빌드).docs.aitc.dev/recipes/safe-area-layout(ko) 및/en/recipes/safe-area-layout(en) 두 페이지에서:::caution블록 두 개가 올바르게 렌더링되는지 미리보기 확인.