eclipse-theia / theia-ide

The Eclipse IDE is a modern and open IDE for cloud and desktop. The Theia IDE is based on the Theia platform. The Theia IDE is available as a downloadable desktop application. You can also try the latest version of the Theia IDE online. For more details, see the Readme below.
https://theia-ide.org/#theiaide
MIT License
343 stars 129 forks source link

preloadTemplate produces invalid HTML #319

Open danepowell opened 10 months ago

danepowell commented 10 months ago

Bug Description:

After building, the file applications/browser/src-gen/frontend/index.html contains invalid HTML:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <title>Theia Blueprint</title>
</head>

<body>
    <div class="theia-preload"><!DOCTYPE html>
<html lang="en">

<head>
    <style>

Steps to Reproduce:

  1. Run yarn && yarn build:dev

Additional Information

When the preloadTemplate feature was added, it pretty explicitly only allowed users to insert additional HTML, not replace the existing HTML: https://github.com/eclipse-theia/theia/pull/4232

However, when the preload spinner was added in https://github.com/eclipse-theia/theia-blueprint/pull/73 this got misinterpreted and every existing example of preload.html I can find is a standalone HTML page, which gets injected incorrectly into index.html.