-
-
Notifications
You must be signed in to change notification settings - Fork 177
feat: server-admin-ui, migrate from react-jsonschema-form-bs4 to @rjsf/bootstrap-4 #2136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Replace unmaintained react-jsonschema-form-bs4 with actively maintained @rjsf packages from the official RJSF team.
Review fixes: - Fix CheckboxWidget using hardcoded htmlFor="defaultCheck1" instead of dynamic id - Remove invalid 'label' HTML attributes from TextWidget and NumberWidget - Rename shadowed ArrayFieldItemTemplate variable to ResolvedArrayFieldItemTemplate - Add placeholder option to SelectWidget for better UX when no value selected
dea3d2e to
2b8abb6
Compare
|
@naugehyde bt-sensors-plugin-sk plugin is causing a bit of problem for this update. For some reason amd64 is working fine, but arm64 fails to load configurations settings for the plugin. Not really clear to me why this happens. Plugin Bundle: [React, RJSF, Plugin Code] With Module Federation it should go: That would need some extra work here to expose component to plugin, but also changes to plugin. |
|
And I am currently working on an update to the shelly2 plugins configuration, I based that on the bt-sensors-plugin code. |
|
The bt-sensors custom config panel embeds @rjsf/bootstrap4 panels package.json: it looks like there's a minor version difference between the mainline package.json and my own. perhaps the version difference is the source of the issue. |
|
AI friend says: Even with identical versions, having two separate instances breaks React Context because they're different objects in memory. |
|
Is the problem that a browser on an ARM64 based system is failing to load the plugin config? If so, what errors are you seeing? |
|
Which browser are you using? Firefox? |
|
Gemini reported the following: The ns_error_corrupted_content error for remoteentry.js is typically a Firefox-specific issue, often indicating a problem with a cached file or an incorrect server configuration. [[1] • Bypass the cache: Perform a hard reload of the page using Ctrl+Shift+R (or Command+Shift+R on Mac). • Clear all browser cache and cookies: • Clear local/session storage: Open the developer console (F12), go to the Console tab, and run and then reload the page. [2, 3, 4, 5, 6] Developer/Server-Side Solutions If the error persists across different users, the problem likely lies on the server side: • Verify the MIME type: Ensure the server is sending with the correct or HTTP header, not . An incorrect MIME type can cause this error. AI responses may include mistakes. [1] https://www.reddit.com/r/firefox/comments/138q8ln/getting_message_ns_error_corrupted_content_next/ |
|
There couple other |
|
I can't explain it. The file is there or it wouldn't load on the AMD64 platform. I'd try clearing the browser cache first. |
|
Tested with Chrome and Android Chrome, the same. |
|
Same NS_ERROR_CORRUPTED_CONTENT error? Or different on those other platforms? |
|
If you can give me a public address I can try and load the site from my phone which is android/arm64. |
|
404 and same was with FF too + that error msg. Need to dig in what packages are actually installed arm vs amd. |
|
I can't give access, sorry. Docker image is this one, if you want to test locally. |
|
404 should be easy enough to debug, just look at the access log and what's on the disk. I have a hard time understanding how arch would be in the picture, but 🤷 . Oh, so bt plugin includes another React and rjsf in the plugin configurator. A quick way around that would be to make that a full blown, whole page webapp and embed just a static page with a link to the webapp. But since you already have a nontrivial amount of configuration UI I think the best way forward would be to make the component use server's reactstrap instead of rjsf. |
|
@KEGustafsson I'm not able to recreate the issue. Test went like this:
Note: The server reported permission issues running the bt-plugin but I think that's a known issue with a known solution |
|
This image has already fallback included for this dual rjsf, so it is rendering also arm64, but not using plugin files if it fails. In arm64, do you see the same configuration page as with amd64? |
|
I can't spot any differences between |
|
Yes, on the client side, the config screens appeared identical in Chrome/Firefox/Safari on the AMD64 (Macbook Air Early 2020/MacOS 15.6) and Chrome/Firefox on the ARM64 (Pixel 6a/Android 16) client. I am still getting an error on the server:
How do I clear that condition? |
|
Solved! Working fine now! |
|
I think, Plugin Config page appearance starts to be very similar compared to the old one. |

Replace unmaintained react-jsonschema-form-bs4 with actively maintained @rjsf packages from the official RJSF team.