Skip to content

Fix Plugin Manager UI: iframe height and Developer Settings accordion#1211

Merged
tobychui merged 10 commits into
tobychui:v3.3.4from
ElmoViggiani:fix/plugin-manager-ui
Jun 21, 2026
Merged

Fix Plugin Manager UI: iframe height and Developer Settings accordion#1211
tobychui merged 10 commits into
tobychui:v3.3.4from
ElmoViggiani:fix/plugin-manager-ui

Conversation

@ElmoViggiani

Copy link
Copy Markdown
Contributor

Summary

Two small, web-asset-only fixes for the Plugin Manager UI.

1. Plugin UI iframe sized to viewport height

resizeIframe() in src/web/components/plugincontext.html sized the plugin iframe to the left sidebar's (#mainmenu) height, using the viewport-based height only as a fallback when the sidebar measured 0. On browser windows taller than the sidebar, the Zoraxy footer filled the leftover space, shrinking the usable plugin area to less than half the window height.

Now sizes to the larger of the sidebar height and the viewport height, so the iframe fills the window on tall browsers. It already re-runs on window resize and tab switch.

2. Developer Settings accordion never expanded

The "Developer Settings" accordion in src/web/components/plugins.html (div.ui.accordion.advanceSettings) was never initialized, so clicking it did nothing — and produced no console error, since an uninitialized Fomantic accordion is inert markup with no click handler bound. Every other component using this pattern calls $(".advanceSettings").accordion(); (redirection, access, status, sso); plugins.html was the only one missing it.

Added the initialization alongside initDeveloperSettings().

Testing

Built and deployed to a live Zoraxy instance; both behaviors confirmed fixed in-browser (accordion expands/collapses; plugin iframe fills tall windows). Web UI is served from embedded assets (//go:embed web/*), so this requires a rebuild to take effect — no Go logic changed.

🤖 Generated with Claude Code

tobychui and others added 7 commits May 27, 2026 20:38
Added notes on security advisories and submission process.
The plugin UI iframe was sized to the left sidebar's (#mainmenu) height,
with the viewport-based height only used as a fallback when the sidebar
measured 0. On browser windows taller than the sidebar, the Zoraxy footer
filled the leftover space, shrinking the usable plugin area to less than
half the window height.

Size the iframe to the larger of the sidebar height and the viewport
height so it fills the window on tall browsers. Already re-runs on
window resize and tab switch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Developer Settings accordion in the Plugin Manager
(div.ui.accordion.advanceSettings) was never initialized, so clicking it
did nothing and produced no console error — an uninitialized Fomantic
accordion is inert markup with no click handler bound. Every other
component using this pattern calls $(".advanceSettings").accordion();
(redirection, access, status, sso), but plugins.html was missing it.

Add the accordion initialization alongside initDeveloperSettings().

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ElmoViggiani ElmoViggiani requested a review from tobychui as a code owner June 20, 2026 23:33
@ElmoViggiani

Copy link
Copy Markdown
Contributor Author

Plugin Manager iframe was too small on my 4k screen.
And the Plugin Manager -> Developer Settings accordion didn't expand.
Image 6-20-26 at 18 26

@tobychui tobychui left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the PR!

A few places need some final touch-up, and this should be good to merge.

Also, it seems that you are using a low effort mode for submitting changes, next time please consider using a higher effort mode for proposing changes which properly remove functional duplication and avoid introducing other potential issues.

Comment thread src/web/components/plugins.html Outdated
}

initDeveloperSettings();
$(".advanceSettings").accordion();

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few .advanceSettings class in the webmin panel due to the design that the contents are dynamically loaded via $ajax. You need to be more specific on which advance settings to toggle accordion to prevent duplicate calls to other page's elements here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in latest commit.
redirection.html, status.html, and access.html also use the unscoped $(".advanceSettings").accordion() and have the same latent issue.

Comment thread src/web/components/plugincontext.html Outdated
@@ -48,7 +48,9 @@
if (mainMenuHeight == 0){

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since your logic already use Math.max which covered the case where mainMenuHeight is 0 (i.e. in this case the window.inner height - 198px must be larger than 0), you should also remove this redundant if case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in latest commit.

…llback

Scope the Developer Settings accordion initialization in plugins.html to
its own element via a new #pluginDeveloperSettings id. Webmin components
are loaded dynamically via ajax and several of them (redirection, status,
access) reuse the .advanceSettings class, so the bare
$(".advanceSettings").accordion() would re-initialize other pages'
accordions.

Also remove the redundant mainMenuHeight == 0 fallback in
plugincontext.html: Math.max(mainMenuHeight, window.innerHeight - 198)
already resolves to window.innerHeight - 198 when mainMenuHeight is 0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ElmoViggiani

Copy link
Copy Markdown
Contributor Author

Thanks for the tip. I will investigate my settings.

The accordion fix also applies to 3 other pages. Should I submit another PR for those? Or add them to this one?

redirection.html, status.html, and access.html still use the unscoped $(".advanceSettings").accordion() and have the same latent issue.

@tobychui

Copy link
Copy Markdown
Owner

The accordion fix also applies to 3 other pages. Should I submit another PR for those? Or add them to this one?

I think those need to be updated as well, you can do them in this PR if you wish, or I can fix them later.

…ents

redirection.html, status.html and access.html each called the unscoped
$(".advanceSettings").accordion(), which re-initializes every loaded
page's accordion because webmin components are loaded dynamically via
ajax and share the .advanceSettings class. Give each accordion a unique
id and scope its init accordingly, matching the plugins.html and sso.html
pattern.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ElmoViggiani

Copy link
Copy Markdown
Contributor Author

Added the fix to the other 3 pages.

Match the concise comment wording used in the other webmin components.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@tobychui tobychui left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tobychui tobychui changed the base branch from main to v3.3.4 June 21, 2026 10:14
@tobychui tobychui merged commit f6dfd1a into tobychui:v3.3.4 Jun 21, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants