montagejs / montage

Montage is an elegant, open source HTML5 framework maintained by Montage Studio that rivals native SDKs, yet is easier to learn. It offers modular components, two-way data binding, and much more. Join us on irc.freenode.net#montage. Sign up for our beta to build Montage applications in the cloud.
http://montagestudio.com/montagejs
Other
1.51k stars 214 forks source link

Fix #1971 #1988

Open thibaultzanini opened 6 years ago

tejaede commented 6 years ago

To take a step back, I'm not sure I understand the value of a default label for button. The component does not need a label to work and I think the total amount of work for the developer is greater if button has a default.

If you boil down the possible options:

  1. No Label
  2. Label is the default
  3. Label is NOT the default

"Label is NOT the default" is going to require the same amount of work regardless so set that option aside.

For the others.... Without a default, "No Label" requires no code while "Label is the default" does. With a default, "Label is the default" requires no code while "No Label" does.

In my eyes, "No Label" is significantly more likely than using the default so we should defer to the implementation that minimizes the work in that case.

Anecdotal evidence is here: https://github.com/thibaultzanini/montage/commit/14c94ebc202b93b091262ee6ed4eb16f1f865661#diff-b15e34a728b9cfd69f2e35b233b4d780

thibaultzanini commented 6 years ago

@tejaede I agree it's more work for the developper. @marchant asked me to do that change for the studio and now I believe the studio should set this default value. FYI @cdebost