Opened 10 years ago

Closed 7 years ago

#5301 closed feature (wontfix)

Dialog: Add a numeric string to dialog width option

Reported by: shadetyler Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.dialog Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

Please add a parseInt method to the numeric parameter of the width option in the dialog widget.

Change History (8)

comment:1 Changed 10 years ago by Scott González

Milestone: TBD1.next

comment:2 Changed 8 years ago by M.Gaetan89

Adding parseInt() will break width: 'auto' (which actually work).

comment:3 in reply to:  2 Changed 8 years ago by Scott González

Replying to M.Gaetan89:

Adding parseInt() will break width: 'auto' (which actually work).

Width: "auto" is not supported. Even in the case of height, where "auto" is supported, it's very easy to not use parseInt() when the value is auto.

comment:4 Changed 7 years ago by Scott González

Milestone: 1.next1.10.0

comment:5 Changed 7 years ago by petersendidit

Status: newopen
Summary: Add a numeric string to dialog width optionDialog: Add a numeric string to dialog width option

comment:6 Changed 7 years ago by Jörn Zaefferer

What this point, aka usecase, of this?

comment:7 Changed 7 years ago by Scott González

I've always been against this, but somehow Richard convinced us at the redesign meeting that we should allow this. I'm still for closing as wontfix, for the same reasons as always. The API is clear, passing "5" instead of 5 should have undefined behavior. Also, saying that we support a string means extra documentation that need to clearly explain that we don't support any units, because people will certainly start doing: height: "300px" and at some point we'll get a bug report that height: "10em" fails.

I asked mikesherov if there were any APIs in core that accepts strings but forced pixel values, and I don't think he came up with any. We should double check, but if that's the case, then I think we should close this.

comment:8 Changed 7 years ago by Scott González

Resolution: wontfix
Status: openclosed

Confirmed. String values always respect units, and dialog only accepts pixels.

Note: See TracTickets for help on using tickets.