Highlight ALL supported source files with the highlight worker behind the FF
Description
As a follow-up from #366531 (closed), this issue suggests that we use our highlight worker and new source viewer component to highlight content.
Result/Outcome
As a result of this, all content would be highlighted upfront as opposed to highlighting in chunks which should contribute to more accurate highlighting in certain scenarios (read the description of #366531 (closed) to find out about the technical downsides of highlighting in chunks).
Testing
We need to do testing on as many languages as we can, but keep an eye out for the following:
- Test Python docstrings
- Test HAML files example
Things to keep in mind
- Ensure bundle size is not negatively affected.
- Ensure frontend performance metrics remain stable.
- Ensure syntax highlighting and features such as code intelligence, line highlighting, and BiDi char highlighting still work as expected.
- Consider introducing these changes behind a feature flag (enable for one project in production to monitor performance impact).
- Legacy fallbacks needs to work as expected
- Our plugins needs to work as expected (e.g. linking packages in package.json files)
- Our custom language definitions need to work as expected (i.e. CODEOWNERS, Svelte)
- Add fallback tracking for unsupported languages.
Availability
Exploratory and regression testing recommended.
Edited by Jacques Erasmus