docs(miniapp): document the 16:9 screenshot ratio for market listings - #1933
Merged
Conversation
Both the web market and the desktop client render listing screenshots at aspect-ratio 16/9 with object-fit: cover, so anything else gets center-cropped. That contract lived only in CSS, and nothing told a publisher — or an agent calling PublishMiniApp — what to aim for. Record it where each audience will actually hit it: - miniapp-dev SKILL.md (both the bundled builtin copy and the in-repo framework copy) in the publish section - the PublishMiniApp screenshot_paths schema, which is what an agent reads at call time - src/miniapp-market-web/README.md, which lists all three 16:9 CSS sites so a future change keeps them in sync Recommend 1920x1080; note 2560x1440 as the useful ceiling since the backend downsizes longer edges to 2560. The README also spells out that validate_screenshot does not check aspect ratio — 16:9 is a display contract, not an upload gate.
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.
为什么
网页市场和 BitFun 桌面端都用
aspect-ratio: 16 / 9+object-fit: cover渲染上架截图,非 16:9 的图会被居中裁掉边缘。但这个契约此前只存在于 CSS 里——投稿的人不知道该按什么比例出图,调用PublishMiniApp的 Agent 也没有任何提示。改了什么
把比例写到三类使用者各自会碰到的地方:
miniapp-devSKILL.md(打包进客户端的 builtin 版 + 仓库内框架版)的「发布到市场」PublishMiniApp的screenshot_pathsschema descriptionsrc/miniapp-market-web/README.md新增「上架截图比例」README 那节列出了三处 16:9 CSS 的位置(网页卡片、网页详情页、桌面端卡片),要求改一处必须同步另外两处,否则同一张截图在两个界面里的裁剪结果会不一致。
推荐 1920×1080;标注 2560×1440 为有效上限,因为后端会把超过 2560px 的边缩到 2560。README 里额外说明
validate_screenshot不校验宽高比——16:9 是显示契约不是上传门槛,避免以后有人误以为是硬校验去改后端。验证
cargo check -p bitfun-core通过cargo test -p bitfun-core --lib skills::(21 passed)cargo test -p bitfun-core --lib miniapp_publish(7 passed)内置 skill 的 bundle hash 由
build.rs自动重算,无需手动同步。未包含
桌面端投稿界面的用户可见提示没动(
market.submissions.*那一带),加提示需要改三个 locale 的 i18n,与本 PR 的「skills + 文档」范围不同,可以单独提。