Create a new `editor` module where all editor view related properties should go
Monaco related properties are only relevant for the currently open files (or the files that have been recently opened), and it is quite wasteful to store these properties on the file object, which is used for all the files (open or not) in the Web IDE.
Proposal
Create a new editor
module that has its own entries object, where we can store a hashmap of file paths to an object with the below properties:
-
fileLanguage
-
editorRow
-
editorColumn
-
viewMode
-> this property in particular is only relevant to markdown files. -
[ ]This property is only used for fuzz-file finder sorting. We should probably take that into consideration when finding a good optimization here. #263431 (closed)lastOpenedAt
-
[ ]This is quite involved and should be handled in it's own issue #292060 (closed).openFiles
-> this is actually a list ofopenTabs
, so should probably be renamed as such
While we do that,
-
also remove the above properties from the file object. [ ] experiment with removingopened
on the file tree objects, and creating a new entry in theeditor
module:openTrees
(which is a hashmap of open folders).
References
- POC: !34496 (closed)
Edited by Paul Slaughter