Before we tried to load absolute paths e.g. /context/. This is a problem, when working in deployed use cases, where Theia might be hosted under a path (e.g. try.theia-cloud.io). Because then the loaded path will be from the root of the page and not, like wanted, from the current path. Simply changing it to relative paths (e.g. ./context/) solves this issue.
Fixes #13813
How to test
This will be hard to test, as you would need a deployment where Theia is hosted under a path (e.g. try.theia-cloud.io) and this fix is applied. As far as i am aware there is no easy way to run theia under a path locally.
However, it could be tested, that this does not break something for the example applications.
To test simply install a frontend vscode extension and observe that the console throws no error and that the files are loaded from the correct location.
Follow-ups
Review checklist
[x] As an author, I have thoroughly tested my changes and carefully followed the review guidelines
What it does
Before we tried to load absolute paths e.g.
/context/
. This is a problem, when working in deployed use cases, where Theia might be hosted under a path (e.g. try.theia-cloud.io). Because then the loaded path will be from the root of the page and not, like wanted, from the current path. Simply changing it to relative paths (e.g../context/
) solves this issue.Fixes #13813
How to test
This will be hard to test, as you would need a deployment where Theia is hosted under a path (e.g. try.theia-cloud.io) and this fix is applied. As far as i am aware there is no easy way to run theia under a path locally. However, it could be tested, that this does not break something for the example applications.
To test simply install a frontend vscode extension and observe that the console throws no error and that the files are loaded from the correct location.
Follow-ups
Review checklist
Reminder for reviewers