Skip to content

fix(plugins): stop sizing plugin layouts with the viewport - #192

Merged
brabenetz merged 8 commits into
mainfrom
fix/plugins-drop-viewport-sizing
Dec 3, 2026
Merged

brabenetz merged 8 commits into
mainfrom
fix/plugins-drop-viewport-sizing

Conversation

@brabenetz

@brabenetz brabenetz commented Dec 2, 2026 •

Copy link
Copy Markdown

Story

In many plugins, the viewport height was used to calculate the available area. That is wrong in almost all cases. Instead, you should simply use 100 percent.
Only dialogs may use the viewport height, since they use the full height and width.

It's similar with the viewport width. Here, 100 viewport width has often been used directly, because in the current OpenSCD a plugin also has 100 percent viewport width. But in the future there will be a navigation menu on the left, so the full width will no longer be available. Here, the correct value should be "100%" instead of "100vw".

Main Change:

Drop 100vw and viewport heights from plugin layouts so a left
navigation can shrink the plugin area. Binding columns and Cleanup
panels fill that area and scroll inside. Dialogs keep viewport units.

Most visible changes:

Cleanup Plugin

image image

Subscriber Messages Binding Plugins for GOOSE and SMV

image image

Side-Quest 1: Test-Improvements:

  • stabilize number checks and pin the test locale
  • make the plugin test suite pass on Windows

Side-Quest 2: serve the PR preview from its Pages path

The Vite build dropped the old PUBLIC_URL prefix, so a preview page
asked for its script and data at the domain root.

  • Set Vite's base from PUBLIC_URL so the shell loads under
    /open-scd/pr-preview/pr-N/.
  • Set the document base to %BASE_URL% so the NSD files, help pages,
    and the schema worker stay on that path.
  • Copy each external-plugin directory into dist, and load Ace from
    the relative path ace so it follows the document base.

A build without PUBLIC_URL keeps base /, so the normal build is unchanged.

The PR-URL https://com-pas.github.io/open-scd/pr-preview/pr-192/ should work now.

Drop 100vw and viewport heights from plugin layouts so a left
navigation can shrink the plugin area. Binding columns and Cleanup
panels fill that area and scroll inside. Dialogs keep viewport units.
Ellipsize panel titles and keep the info icon at the right. Put the
filter buttons on their own row, and give the control-block column a
little more width than the dataset column.
Wrap the Publisher and Subscriber radios in the GOOSE and SMV message
binding plugins so they sit side by side. The two lists still fill the
remaining height and scroll on their own.
Generate invalid number-field values with the same rules as an HTML
number input, so scientific notation such as "1e0" is no longer treated
as invalid. Run the plugin browser tests in en-US and UTC so validation
timestamps match the snapshots.
Keep snapshot files in LF so the snapshot loader can read them.
And wait for the FCDA filter menu to close.
@brabenetz brabenetz changed the title Fix/plugins drop viewport sizing fix(plugins): stop sizing plugin layouts with the viewport Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.2
Preview removed because the pull request was closed.
2026-12-03 10:39 UTC

@brabenetz
brabenetz requested review from a team December 2, 2026 12:07
The Vite build dropped the old PUBLIC_URL prefix, so a preview page
asked for its script and data at the domain root.

- Set Vite's base from PUBLIC_URL so the shell loads under
  /open-scd/pr-preview/pr-N/.
- Set the document base to %BASE_URL% so the NSD files, help pages,
  and the schema worker stay on that path.
- Copy each external-plugin directory into dist, and load Ace from
  the relative path ace so it follows the document base.

A build without PUBLIC_URL keeps base /, so the normal build is unchanged.
The publisher renders into a shadow root and calls importNode there.
The polyfill adds that method, but the preview requested it from the
domain root and the build did not include the file.

- Move the polyfill to public/polyfill so Vite copies it into dist.
- Load it and the service worker from the Vite base.
- Copy sw.js into dist.

A build without PUBLIC_URL still serves both from /.
Move manifest.json into public so Vite copies it into dist and Help
can load the application version.
Similar to com-pas#622
@brabenetz

Copy link
Copy Markdown
Author

Some Screenshots of Visible changes:

@brabenetz brabenetz closed this Dec 2, 2026
@brabenetz brabenetz reopened this Dec 2, 2026
@brabenetz brabenetz closed this Dec 2, 2026
@brabenetz brabenetz reopened this Dec 2, 2026
@brabenetz
brabenetz merged commit 10a2132 into main Dec 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants