breaking(rate): 对齐评分组件契约、交互与示例 - #1056
Merged
Merged
Conversation
Contributor
Web DemoAPK 下载 |
Open
Member
|
|
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.

🤔 这个 PR 的性质是?
🔗 相关 Issue
无关联 Issue。
💡 需求背景和解决方案
Rate 组件原有文案状态、整星归一化、RTL 命中、读屏信息与交互生命周期存在多套语义,公开 Demo 也未完整覆盖小程序的组件类型、状态和带描述评分示例。本 PR 收敛组件契约,并以 Flutter 设计模式对齐公开 Demo:
TRateThemeData.showText,统一以TRate.texts作为评分文案入口;未传入时不显示文案,空列表或越界时显示“未评分”。TRate.showValueIndicator,默认开启整星点击、长按和拖动时的当前值提示;设置为false可维持旧视觉反馈,且不会关闭半星点击的精确选择能力。3分、一般、未评分三个独立栏;布局、尺寸、色彩和间距使用 TDesign token。相关实现与行为契约见
specs/017-rate-contract-hardening/。Light / Dark Demo Golden:
📝 更新日志
breaking(rate): 移除
TRateThemeData.showText,评分文案统一由TRate.texts控制breaking(rate): 整星点击、长按和拖动默认显示评分提示,新增
showValueIndicator: false以关闭该提示fix(rate): 修复整星小数归一化、半星与 RTL 命中、拖动清零、交互生命周期、读屏信息及长文案布局
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单
type(<scope>?): 修改描述。示例:
fix(TBottomTabBar): 修复 iconText 模式底部溢出