Repository navigation
修复素材库声音卡片缺名、筛选重复和播放器时长 - #23
Merged
Merged
Conversation
按钮上的 display:grid 把卡片高度压成一行,下一行盖住了标题,所以只有没被挡住的最后几个名字露出来。清单里的中文 title 本来就在。筛选按类型、主题、标签各留一次同名项。短声音用「时长 0.2 秒」标出来,Safari 播不了的 OGG 改听旁边的 WAV 预览,复制进项目的仍是原来的文件。 Co-authored-by: Jett Wang <jamiesun@users.noreply.github.com>
按钮在网格里的最大内容高度只有一行,下一行会盖住标题,点击也会点到别的卡片。给卡片一个最小高度,行就会跟着变高。 Co-authored-by: Jett Wang <jamiesun@users.noreply.github.com>
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.
修了什么
素材库筛到「音效」时,孩子分不清声音、筛选名重复、播放器像是没加载。这次从渲染和数据两边修,不改孩子的源码,加入仍是复制且可撤销,不登录也能用。
修复前
修复前:大部分声音卡片只有灰色「声音」,名字被下一行盖住
title在清单里都有,但卡片是<button>,又放在网格里。浏览器按按钮的「一行高」排网格行,标题画在行外面,被下一行盖住。网格最后一行只有一张卡时,没被挡住的「爆炸 / 激光 / 击中 / 点击」才露出来。点上面的卡片也会点到盖住它的那一张。0:00 / 0:00,看起来像没加载。Safari 本来也播不了 Kenney 的 OGG。修复后
修复后:每张声音卡片都有中文名、图标和来源包,卡片不再互相遮挡
选中爆炸后,播放器显示时长 1.0 秒并正在播放原来的 OGG
title),加上来源包(森林声音、音效、太空射击……)和按标签区分的图标。点卡片会试听。卡片有最小高度,网格行会跟着变高,名字留在卡片里面,不会被下一行盖住。category,主题按theme,标签按tag,结果和原来那一组按钮一致。标签多过 12 个时其余折进「更多」。*.preview.wav,并说明放进项目的仍是原来的 OGG。预览 wav 不进项目、不进导出包。missing-title),每个 OGG 必须带一份能播的 PCM WAV 预览。测试
pnpm test、pnpm typecheck通过。pnpm test:e2e(含pnpm build)92 条全部通过。tests/e2e/library.spec.ts:声音卡片都有名字且名字在卡片内、卡片互不重叠、筛选名不重复、WAV 和 Kenney OGG 的播放器时长大于 0 且能播放、主题「平台跳跃」不会混进别的包。/api/。复制进项目的仍是清单里的原文件。To show artifacts inline, enable in settings.