DmitryEfimenko / TwitterBootstrapMvc

Fluent implementation of ASP.NET-MVC HTML helpers for Twitter Bootstrap.
Apache License 2.0
224 stars 79 forks source link

Missing Bootstrap label component #89

Closed seishin4real closed 10 years ago

seishin4real commented 10 years ago

Hi I noticed the lack of labels - http://getbootstrap.com/components/#labels

I know I can just write it "the old way" - I'm just saying :)

DmitryEfimenko commented 10 years ago

I'm all for adding support for this. However, there is already a helper .Label(...) and .LabelFor() to handle <label> tag. What syntax would you propose to support this component?

seishin4real commented 10 years ago

Yeah, I noticed that too.

Maybe prefixing all bootstrap native controls could be a somewhat reasonable solution? I know this would be a breaking change but right now the bootstrap-updated MVC HtmlHelpers are all mixed up with those native to bootstrap. Prefixing methods with for example "B" (would make Alert into BAlert) could clear things up and Visual Studio's intellisense would still work properly.

DmitryEfimenko commented 10 years ago

Most of the Bootstrap controls don't have a conflicting MVC control. Actually Label is the only one I can think of, so renaming all methods in this case just does not sound like a good idea. The benefit is not worth the trouble.

Also BMVC's main purpose is to make writing complicated controls of Bootstrap a simple task. I'd say that the label does not fall under this category. It's simple enough to throw a "label" css class on a span or a div.

I'll pass on implementing this for now. However, if more people show interest in this, I'll revisit.