Description cut off with min, max
Describe the bug
Cut off description
To Reproduce
Steps to reproduce the behavior:
In jsonConfig.json create an option like so:
"webserverPort": {
"type": "number",
"label": "Webserver Port",
"newLine": true,
"min": 1,
"max": 65535
},
and the description is cut off
create an option like so:
"webserverPort": {
"type": "number",
"label": "Webserver Port",
"newLine": true
},
the description is not cut off.
Versions:
- Adapter version: 6.6.4
- JS-Controller version: 5.0.9
- Node version: v16.19.0
- Operating system: debian 11
Bildschirmaufzeichnung vom 01.08.2023, 12:55:17.webm
I cannot find any differences in the behavior. Can you provide a reproducing example?
Weird. Yes. This is happening with my roborock adapter. https://github.com/copystring/ioBroker.roborock
This is the config in question https://github.com/copystring/ioBroker.roborock/blob/main/admin/jsonConfig.json
I can also not replicate it with your config. A hint for you, you can also use port as type here https://github.com/copystring/ioBroker.roborock/blob/cea0cc4fa080d5a2041706a71b4190f153c773b4/admin/jsonConfig.json#L41
It will then automatically have a useful min/max attribute and will also error if the port is already taken by another instance.
Are you sure this works? Does not work for me.
I also have at least one other user with the same problem: https://forum.iobroker.net/topic/67186/neuer-adapter-f%C3%BCr-roborock-staubsauger/20?_=1690913643093
Yes tested it today, just the schema is missing the information
Maybe try to force a fixed width with the sm property
https://github.com/ioBroker/ioBroker.admin/blob/master/src/src/components/JsonConfigComponent/SCHEMA.md#common-attributes-of-controls
Yes tested it today, just the schema is missing the information
With “port” as type, it looks like this:
The box for entering the actual port number is missing.
Sure, I thought about using sm etc. before but when another user reported the issue I have myself, it made me believe, it's a bug.
Have you tried installing my adapter and looking at the options of it? Looks fine on your side?
OK. I check this with Firefox. It's fine in Firefox, but not in Chrome. Can you try to replicate with Chrome?
I used a 1 to 1 copy of your json config yes but with the latest admin version
I will try chrome tomorrow if I find time
Thanks. With latest admin adapter, “port” works as type but still too small. I will wait until you tested chrome.
I can reproduce and it is the min property which makes the problem
https://github.com/ioBroker/ioBroker.admin/blob/49ab2edbe73eabc909f54f7335224c002ef1538f/src/src/components/JsonConfigComponent/ConfigNumber.jsx#L118
This means most likely the problem is somewhere in https://github.com/mui/material-ui/tree/master, maybe we can workaround somehow.
@copystring You are missing the width attribute. Please add:
"webserverPort": {
"type": "number",
"label": "Webserver Port",
"newLine": true,
"min": 1,
"max": 65535,
"sm": 12,
"md": 4",
"lg": 2
},
Yes, I know I could just add sm, md, lg. Still feels like a bug, though. It makes so sense in my mind that adding “min” would cause such behavior.