mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
refactor(build): place the views in the page instead of expanding templates
index.html now lists each view's host and the loading screen itself, so the gev:template expansion plugin, its view list, the loading-screen template and the ./build/html export are gone. createApplication takes omitViews for views an application leaves out; their hosts are removed, and a view an earlier call rendered is unmounted.
This commit is contained in:
1 parent
f279200af5
commit
5bf797ef71
18 files changed
+176
-174
No files matched your search
+7
-5
@@ -200,11 +200,13 @@ its pending results. Source disposal does not silently reinstate a default.
|
||||
`ui/composition` supplies the default engines to the shell. Applications can
|
||||
supply a HUD implementation or request policy through control services. The
|
||||
shared chrome owns the welcome/loading transition; standalone composition adds
|
||||
Provider Settings. `build/html` expands an allowlist of component markers:
|
||||
most become hosts for the Vue views in `src/ui/views`, which
|
||||
`createApplication()` renders before anything reads the page, and the loading
|
||||
screen is inlined from `src/ui/templates`. Unknown names cannot read arbitrary
|
||||
filesystem paths. A host that does not initialize Core's locale passes
|
||||
Provider Settings. A page places each Vue view in `src/ui/views` with a host,
|
||||
`<div class="gev-view" data-gev-view="NAME"></div>`, and writes its own loading
|
||||
screen (`#loading-screen` with a `.loader-status` line) as static markup so it
|
||||
paints before any script runs. `createApplication()` renders the views before
|
||||
anything reads the page; `omitViews` names views the application leaves out,
|
||||
such as `provider-settings`, and their hosts are removed. An unknown view name
|
||||
is an error. A host that does not initialize Core's locale passes
|
||||
`localePicker: false` to `createApplicationControls` instead of editing the
|
||||
markup. Node tests that import application modules register the component
|
||||
loader with `node --import=<core package>/build/register-vue`.
|
||||
@@ -63,13 +63,13 @@ a feature supplying only its accent.
|
||||
2. **Rail.** `PanelChrome` enforces one panel per side; the panel store
|
||||
mirrors each side's panels and the rail renders from it. Done.
|
||||
3. **Panels.** Each template and its wiring become a component, keeping ids,
|
||||
classes, `data-i18n` text and CSS. A converted template is listed in
|
||||
`build/applicationViews.js`; its `gev:template` marker then expands to a
|
||||
classes, `data-i18n` text and CSS. The page places each view with a
|
||||
`.gev-view` host (`display: contents`), and `mountApplicationViews()`
|
||||
(`src/ui/views/index.js`) renders the view into it before the page is
|
||||
translated and wired. `createApplication()` calls it too, so host pages
|
||||
need no change. Views belong to the page and are never unmounted. The
|
||||
loading screen stays static so it paints before any script runs. Markup
|
||||
translated and wired. `createApplication()` calls it too, removing the
|
||||
hosts of any views its `omitViews` names. Views belong to the page and are
|
||||
unmounted only when a later call omits them. The loading screen is static markup in the page so it
|
||||
paints before any script runs. Markup
|
||||
tests read `renderApplicationHtml()` from `src/testSupport`, which renders
|
||||
the views on the server. Templates compile with Vue's `preserve`
|
||||
whitespace, which keeps the whitespace between elements as a single
|
||||
@@ -168,8 +168,9 @@ a feature supplying only its accent.
|
||||
Display popover's slots stay static for the Cockpit display portal).
|
||||
Layers that write into the right rail directly gain a slot instead.
|
||||
|
||||
4. **Cleanup.** The build-time template expansion and the attribute
|
||||
translation pass are retired once nothing uses them. Hosts register panels
|
||||
4. **Cleanup.** The build-time template expansion is retired: `index.html`
|
||||
lists the view hosts and the loading screen itself. The attribute
|
||||
translation pass goes with the move to vue-i18n. Hosts register panels
|
||||
and rail items through an explicit API instead of editing markup.
|
||||
Markup-string tests are replaced by component tests.
|
||||
|
||||
|
||||
Reference in new issue
Block a user