ioBroker.admin icon indicating copy to clipboard operation
ioBroker.admin copied to clipboard

Description cut off with min, max

Open copystring opened this issue 2 years ago • 16 comments

Describe the bug
image 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

copystring avatar Jul 30 '23 11:07 copystring

Bildschirmaufzeichnung vom 01.08.2023, 12:55:17.webm

I cannot find any differences in the behavior. Can you provide a reproducing example?

foxriver76 avatar Aug 01 '23 10:08 foxriver76

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

copystring avatar Aug 01 '23 11:08 copystring

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.

foxriver76 avatar Aug 01 '23 11:08 foxriver76

Are you sure this works? Does not work for me. image

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

copystring avatar Aug 01 '23 18:08 copystring

Yes tested it today, just the schema is missing the information

foxriver76 avatar Aug 01 '23 18:08 foxriver76

Maybe try to force a fixed width with the sm property

foxriver76 avatar Aug 01 '23 18:08 foxriver76

https://github.com/ioBroker/ioBroker.admin/blob/master/src/src/components/JsonConfigComponent/SCHEMA.md#common-attributes-of-controls

foxriver76 avatar Aug 01 '23 18:08 foxriver76

Yes tested it today, just the schema is missing the information

With “port” as type, it looks like this: image 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?

copystring avatar Aug 01 '23 18:08 copystring

OK. I check this with Firefox. It's fine in Firefox, but not in Chrome. Can you try to replicate with Chrome?

copystring avatar Aug 01 '23 18:08 copystring

image

copystring avatar Aug 01 '23 18:08 copystring

I used a 1 to 1 copy of your json config yes but with the latest admin version

foxriver76 avatar Aug 01 '23 19:08 foxriver76

I will try chrome tomorrow if I find time

foxriver76 avatar Aug 01 '23 19:08 foxriver76

Thanks. With latest admin adapter, “port” works as type but still too small. I will wait until you tested chrome.

copystring avatar Aug 01 '23 19:08 copystring

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.

foxriver76 avatar Aug 04 '23 08:08 foxriver76

@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
},

GermanBluefox avatar Aug 08 '23 19:08 GermanBluefox

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.

copystring avatar Aug 21 '23 19:08 copystring