fix(map): stop mobile flicker on pin select (no behavior change)#232
Open
badjoke-lab wants to merge 1 commit into
Open
fix(map): stop mobile flicker on pin select (no behavior change)#232badjoke-lab wants to merge 1 commit into
badjoke-lab wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Motivation
components/map/MapClient.tsxのみ)。selectedPlaceIdのuseEffect/useMemoによる同期(selectedPlaceIdRef.currentへの反映)。selectedPlaceIdの変化により走る選択見た目更新(以前は全マーカーをforEachで走査して active class / zIndex を更新していた effect)。renderClusters内での全マーカー再生成とLayerGroup差し替え(updateVisibleMarkers→renderClusters)。marker.on("click")側での伝播停止とopenDrawerForPlace呼び出し、およびmap.on("click")による blank-map click でのcloseDrawer(二重発火は現状防がれている)。Description
prevSelectedMarkerIdRefとsetMarkerSelectionStateを追加し、選択変更時の見た目更新を「前回選択ピン + 今回選択ピン」の2点だけに限定しました。selectedPlaceId変更で全マーカーを走査して更新する処理」を停止し、全件再描画トリガーを取り除きました。renderClusters/updateVisibleMarkers/map.invalidateSize/ クリック伝播制御 等のロジックには手を入れていません。components/map/MapClient.tsxのみで、フィルタ・URL 同期・フェッチ・Drawer/Sheet の挙動は変えていません。Testing
npm run lintを実行して終了コードは 0 で完了し、既存の ESLint 警告のみ確認済み(成功)。Codex Task