Skip to content

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.
  • [ ] lastOpenedAt 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)
  • [ ] openFiles -> this is actually a list of openTabs, so should probably be renamed as such This is quite involved and should be handled in it's own issue #292060 (closed).

While we do that,

  • also remove the above properties from the file object.
  • [ ] experiment with removing opened on the file tree objects, and creating a new entry in the editor module: openTrees (which is a hashmap of open folders).

References

Edited by Paul Slaughter