jquery / 2012-dev-summit

Information regarding the 2012 Developer Summit in DC
14 stars 14 forks source link

Finish Mask #6

Closed jzaefferer closed 12 years ago

jzaefferer commented 12 years ago

https://github.com/jquery/2012-dev-summit/wiki/Table-10:-UI-Widgets http://wiki.jqueryui.com/w/page/12137996/Mask

Suggested improvements:

zjs commented 12 years ago

Note for later: implementing the "When focusing on an empty element, and the mask is displayed, caret position should be in the beginning instead of where the user happened to click." requirement seems difficult on Chome

Potential fix: https://github.com/jquery/jquery-ui/pull/757

Wilto commented 12 years ago

wat

zjs commented 12 years ago

Note for later: There's currently no way to escape "reserved" characters ("a", "9", "*", "?") and use them as literals.

zjs commented 12 years ago

Note for later: There's currently no support for multiple optional sections. However, that lack of support isn't particularly explicit; additional "?" characters are simply treated as literals, which would make it difficult to add support for additional sections without breaking backward compatibility (as some user may rely on the current behavior where they're treated as literals).

We should either add support for multiple optional sections or treat additional "?" characters as reserved (so that support could be added in the future).

zjs commented 12 years ago

Currently, if someone defines a placeholder of "day", "a" will get interpreted as a placeholder and "d" and "y" will be interpreted as literal values, even if they have an explicit definition for "day" ("a" will occur before "day" in the definition list).

This behavior should at least be documented (and should probably be improved as it's rather counter-intuitive).

One way to address this is to add a pair of reserved characters (e.g. angled brackets, square brackets, or curly braces) to mark the beginning and end of user-defined placeholders. This would also circumvent the issues related to supporting a way to escape user-defined placeholders.

jzaefferer commented 12 years ago

We landed a bunch of bug fixes during the summit. Added the notes (aka Suggested Improvements) to the Mask wiki page.