[Bug]: "Reset state" on the playgrounds UX is confusing
未关闭
还没有人认领这个 Issue。
bug: unconfirmed
- 主要语言
- JavaScript
- 星标
- 11.8k
- 派生
- 7.9k
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 11
描述
Summary
If you want to reset the React state of a playground, but not the code, it's very unclear how to do so.
The only way I found is clicking on "Reset", which triggers a popup saying "Reset all your edits too?" and then pressing "Cancel". This will successfully reset the state but not the code. However there are two issues with that:
- It's not clear at all that this is the proper way to do so. Should there be two buttons instead?
- UX itself is counter-intuitive:
a. The question is "Reset all your edits too?", which is a yes/no question, but the options are "Ok" or "Cancel"
b. Normally if you press "Cancel" on a confirmation modal, it should cancel the original action altogether, but here is applies the action partially (reset the state but not the edits)
Page
https://react.dev/learn/separating-events-from-effects#challenges
Details
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从链接的「Separating Events from Effects」challenge 页面开始,复现 playground 的 Reset 流程。检查仅重置 state 和编辑后重置这两个选项的呈现方式,然后让可用操作和确认文案变得明确无歧义。完成标准是:用户能够判断如何在不重置代码的情况下重置 React state,并理解每个选项会执行什么操作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, react
- 领域
- design, documentation, frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100