Page MenuHomePhabricator

Map dimensions should respect min/max dimensions
Closed, ResolvedPublic

Description

As defined here:

  • Map min width = 200px
  • Max width = 1000px
  • Min height = 100px
  • Max height = 1000px

Current status:

  • User can enter any invalid dimension in Visual Editor, there is no validation that the value is between the min and max values.
  • User can save the map with invalid dimensions. The backend does not validate either.
  • The map is displayed with invalid dimensions.

EDIT 5/17/16:
Since T133619, map min width is now 200px; map min height is now 100px.

Event Timeline

Change 285383 had a related patch set uploaded (by JGirault):
Update scalable object when setting dimensions

https://gerrit.wikimedia.org/r/285383

Change 285383 merged by JGirault:
Update scalable object when setting dimensions

https://gerrit.wikimedia.org/r/285383

I merged the ticket, but I think this was only a step forward.

If we are to define min and max values (I think it makes sense... at least a min value...?), we should implement true validation:

  • width and height parameters should be validated by the backend.
  • In VE we should give a feedback to the user that dimensions are invalid, rather than fixing silently.
Yurik added a subscriber: Yurik.

partially resolved, if more work is needed, please create a new ticket