Repository navigation
nav 编辑模式砖块 iOS 式抖动 - #56
Merged
Merged
Conversation
用 Tailwind 动画 token + 关键帧实现绕心 ±1.2° 摆动,逐砖按 id 散列取负延迟与三档时长错相; 抖动挂在内层砖壳的 rotate 上,与外层 dnd-kit 位移分层,拖起那块停抖、普通模式不动,并尊重减少动态效果。 Checkpoint: GmA65l2OtAI2ERl2J4paa
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
animation-delay/animation-duration,无 JS 定时器、无布局位移。prefers-reduced-motion下不动。Changes
web/src/index.css:@theme里给出--animate-nav-tile-jiggle(0.18s ease-in-out infinite alternate)与关键帧rotate: ±1.2deg;reduce 媒体查询内显式.animate-nav-tile-jiggle { animation: none; }。动的是单一属性rotate,不与.glass-hover:hover的translateY(-1px)、父层 dnd-kit 位移互相覆盖。web/src/components/home-edit-board.tsx:新增TILE_JIGGLE_CLASS字面量与tileJiggleStyle(key)(FNV-1a 散列 → 负延迟 0–399ms + 160/180/200ms 三档时长,同砖幂等、相邻砖错相);外层<div>保 dnd-kit 位移、内层<button>承载抖动;isDragging停抖,AddLinkTile常抖,DragOverlay预览不抖。web/test/tile-jiggle.test.ts(新增):幂等、延迟范围、三档时长、六 key 延迟去重 ≥3、类名字面量。web/test/public-edit-mode.test.tsx:编辑模式砖与「+」砖都抖且相位不全相同;退出后抖动类为 0。口径说明:规格中「空分类虚线空投放位不抖」无对应元素——每个分类末尾唯一的虚线砖即
AddLinkTile(空分类时兼任cat:<id>落点),按「「+」新增砖都抖」执行,空/非空一律照抖,未新增占位。Testing
typecheck、format:check通过;lint退出码 0(33 条 warning 全在既有components/ui)。@keyframes nav-tile-jiggle、.animate-nav-tile-jiggle{animation:var(--animate-nav-tile-jiggle)}与 reduce 下的animation:none。nav-tile-jiggle+infinite,18 块砖 18 个不同负延迟;采样rotate变化而外层盒子不变;scrollWidth === innerWidth。animation-name: none、其余照抖、预览不抖;松手顺序与落库一致且未误开弹窗;单击开弹窗、Esc 只关弹窗、✕ 删除带撤销;悬停transform仍为translateY(-1px);reduce 下全部停摆且拖拽可用。像素 A/B:编辑模式有差异、普通模式为 0。未覆盖:触屏长按拖拽(
TouchSensor)未真机验证,本次未触及该路径。