Skip to content

Conversation

@KenzonYeoh
Copy link

  • Switched to using CodeMirror 6 due to its better accessibility and less buggy implementation of features like word wrap. Monaco seems overkill for what we need, as many of its features are unnecessary, whereas codemirror's modularity means we can pick and choose.
  • Tried to fix the directory listing bug that sometimes occurs when browsing, by changing loadDirect to run in $effect instead of onMount. The former runs whenever $props and $state changes, while the latter only runs once. I am unsure if that's what's contributing to the bug as it only intermittently happens, but this seems like a very plausible cause.

- Replaced monaco editor and y-monaco with codemirror6 and
  y-codemirror.next for collaborative editing, because the latter
  seems to be more accessible and modular. There are a lot of features
  we didn't need from Monaco, some of which were impacting
  accessibility.
- Fixed (most of) the line wrapping issues, such as long lines causing
  words to be cut off
- I did try to ad word wrapping without replacing Monaco at first, but
  NVDA was still having issues reading wrapped lines properly.
- That said, CM6's wrapping also has a few bugs of its own. For
  instance, if your cursor wasn't at the start of the line when you
  press up/down arrow, sometimes the current line is repeated while
  the next line is skipped.
- Sometimes when navigating to a directory, the browser thinks its an
  empty directory or lists incorrect files
- Changed file browser so that instead of onMount, it uses the $effect
  rune. Hopefully any time something in $props or $state changes (like
  the current path, which is in $state), the file list will update
  correctly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant