Prettier enhancements: feedback/state & options
@kiraarghy 已经在做这个了。
开始于 2020年1月13日。
评估
这个 Issue 还没有评估数据。
描述
I think it would be useful to have some discussion about the prettier functionality on runpkg. Some points to start with:
- Button press feedback
- Undo option
- Basic config options
1: button press feedback and state
Currently it can be hard to tell that any formatting has taken place. Although this function (prettier.format) isn't async, I think some state handling (including start & finish state) in the UI would be helpful. In my mind, possible states to alert the user to are:
- start format
- finish/successful format
- finished format with no change (
prettier.format(fileData.code, opts) === fileData.code) - error
- format reverted (see point number 2)
These states could be signified with text, icons and/or toast messages. Preferences? I would lean towards (accessibly) icons possibly enhanced with toast messages.
2: undo format
I think it would be useful to be able to revert the code formatting without having to refresh the page. I'm happy to implement it in a PR. Any objections? Any opinions on how to represent this has successfully run in the context of point number 1 (above)?
3: basic config
This is a trickier and more subjective feature IMO: one one hand, prettier is supposed to be opinionated, but - on the other - it does provide certain config options (quotes, semi...) for a reason. Do we want to allow users to select basic config options? E.g. currently we use the default options which include singleQuote: false which means that something like lodash-es/add only changes on format due to single -> double quotes rather than any major formatting issues.
- 主要语言
- JavaScript
- 星标
- 307
- 派生
- 9
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
FormidableLabs/runpkg 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
FormidableLabs/runpkg#209 · 4 条评论 ·
-
bug improvement
难度 4/5 3-5 天 新手友好度 28/100
FormidableLabs/runpkg#183 ·
-
improvement
难度 4/5 3-5 天 新手友好度 35/100
FormidableLabs/runpkg#181 ·
-
"Contributing" doc可能重新可做 @kiraarghy 于 2473 天前认领,目前没有进行中的 PR。 未关闭
FormidableLabs/runpkg#174 · 1 条评论 · 已指派 2 人 ·
-
难度 3/5 1-2 天 新手友好度 35/100
FormidableLabs/runpkg#172 · 1 条评论 ·
查看 FormidableLabs/runpkg 的全部 Issue
相似的 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 78/100
PhyberApex/slds-json-schema-renderer#372 ·
维护者通常 1 天内回复
-
usage: a custom provider's balance meters ("…%" in the balance path) ignore the Left/Used switch未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
[BUG] rag: sentence content can cross the reported sentence boundaries可能已有人在做 @LJK-ikun 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
ericcornelissen/depreman#591 ·
维护者通常 1 天内回复
-
bug/1-unconfirmed kind/bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复