Repository navigation
fix(workspace): preserve browser location and open TypeScript as text - #211
Merged
Merged
Conversation
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.
变更说明 / Description
背景与动机 / Context and motivation
关闭编辑器标签后,文件浏览器重新进入时会无条件加载
initialPath,覆盖rememberSaveable保存的当前目录。另一个问题是.ts的 MIME 类型回落到 AndroidMimeTypeMap,被识别为视频并直接打开媒体预览。改动范围 / Changes
.ts和.tsx映射为text/plain,走工作区文本编辑器;编辑器已有 TypeScript 语法识别。兼容性与风险 / Compatibility and risks
工作区中的
.ts/.tsx文件将按 TypeScript 文本打开;扩展名为.ts的 MPEG-TS 视频也会优先作为文本处理,符合本次请求的强制文本打开行为。关联 Issue / Related issue
N/A;根据维护者反馈修复。
验证方式 / Verification
证据 / Evidence
N/A;
.ts错误预览和目录重置由维护者截图复现。检查清单 / Checklist
dev