GraphiteEditor / GraphiteEditor/Graphite
Saving, updating, and reading files from disk
- 主要语言
- Rust
- 星标
- 27.2k
- 派生
- 1.3k
- 平均合并
- 20 小时 5 分钟
- 30 天内合并 PR
- 57
描述
https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
https://developer.chrome.com/articles/file-system-access/
https://developer.chrome.com/articles/file-handling/
Supported on Chromium and Firefox, but Safari seems to not support writing (or it doesn't support the async version of the API, but it does support the sync WebWorker-only version or something?). So we'll potentially have to tailor the feature experience depending on the browser.
Eventual desired behavior: the document gets auto-saved in real time as the user works (perhaps whenever the history state is updated) to the browser's IndexedDB. If the user hits CtrlS/*File* > *Save*, it saves the file to disk at the existing document location, if that is available. If not, it asks the user to grant permission for a specific folder. We may need to build a file browser UI in that case to let the user pick where to organize the file within the granted folder scope. Unsupported browsers should potentially fall back to the current download-on-save/browse-on-open approach.
贡献指南
这个仓库没有索引到贡献指南
调研方向
先从 MDN File System Access API 以及 issue 中链接的 Chrome 文件处理相关文章开始,然后比较受支持和不受支持的浏览器所需的行为。在查找相关的浏览器 UI 和文档历史入口点之前,先确定自动保存到 IndexedDB、保存到现有或新授予的磁盘位置,以及下载/打开回退行为应如何工作。每种浏览器情况的行为都完成规范说明后,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 领域
- frontend
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100