multi-textarea data model keyed on (url, timestamp)
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- frontend
调研方向
首先追踪现有的 Spot datatype,以及 issue 中描述的当前 textarea-enhancement flow。将草稿的识别和恢复方式与提议的 URL/timestamp schema 进行比较;完成的标准是项目已经就用于保留和匹配多个 textarea 草稿的通用模型达成一致。
由索引模型根据 Issue 内容生成。
描述
As the code stands, there is a Spot datatype. It represents the abstract concept of where a single textarea is. e.g.
- appending the 2nd comment on issue 4
- appending the 3rd comment on issue 4
- pros: we have enough data to recreate the draft completely in the browser, and also enough data to tell if it was submitted or not
- cons:
- a lot of manual work for each place that we handle
- ambiguity around things like the
issues/newurl. You might have multiple unsubmitted drafts in progress, they don't have server-side IDs yet, what should their spot be? Inevitably it gets tied to the time that the tab happened to open, in which case why bother with the complexity of defining the "abstract place where a comment is" if you end up just doingtimestamp, URLpairs?
This approach really falls down for complex multi-form things, such as this:
It would be really painful to lose the drafts in those textboxes, but it's also impossible to make a spot for each textfield in every issue/PR template that might be out there.
Another approach is this:
- anytime a textarea gets added or removed, trigger a refractory state that waits until there's been no changes for 500ms
- when that refactory period times out (the textareas have settled), the Spot is defined as:
- primary key: (url, timestamp)
- schema: list of textareas and their labels, as best we can tell in a generic way
- title and icon: pulled from the tab by default
- cons: most of the time, this is not enough data to reopen the tab for the user
- pros:
- if the user has opened a tab manually, we can find which saved drafts fit that schema
- textareas can be enhanced by default, versus right now where they are enhanced only iff we have built an enhancer for that specific box
- 主要语言
- HTML
- 星标
- 58
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
diffplug/gitcasso 的其他 Issue
-
Jukebox gap 未关闭
难度 5/5 一周以上 新手友好度 10/100
-
Allow toggling syntax highlighting on/off for the page from a right click on the textarea/similar 未关闭enhancement
难度 4/5 3-5 天 新手友好度 45/100
-
bug
难度 3/5 1-2 天 新手友好度 45/100
-
enhancement
难度 5/5 一周以上 新手友好度 20/100
-
enhancement
难度 5/5 一周以上 新手友好度 32/100
查看 diffplug/gitcasso 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
pastelsky/bundlephobia#1122 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
speaches-ai/speaches#678 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 95/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
jellyfin/jellyfin-web#8540 ·