Skip to content

Rename cssClass property to just class #766

Closed

Description

@ligaz

Let's consider renaming cssClass property to just class to better align with existing standards.

screen shot 2015-09-17 at 21 24 00

Activity

  1. tjvantoll commented on Sep 17, 2015

    @tjvantoll
    Contributor

    👍

    I've always thought cssClass was an odd name. I should've asked for this myself a while ago.

  2. ligaz commented on Sep 17, 2015

    @ligaz
    ContributorAuthor

    We should note that on the JavaScript side it is called className.

  3. manijak commented on Sep 17, 2015

    @manijak

    Reminds me of .net WebForms :) But classis better.

    <asp:TextBox id="TextBox1" ForeColor="Red" CssClass="class1" />
  4. self-assigned this
    on Sep 18, 2015
  5. added this to the 1.4.0 milestone on Sep 18, 2015
  6. enchev commented on Sep 18, 2015

    @enchev
    Contributor

    I've made it just because the new picture of @akorchev! :)

  7. akorchev commented on Sep 18, 2015

    @akorchev

    Now rename the JavaScript cssClass property to className (or deprecate cssClass in favor of className).

  8. enchev commented on Sep 18, 2015

    @enchev
    Contributor

    @akorchev Done!

  9. akorchev commented on Sep 18, 2015

    @akorchev

    !!

  10. akorchev commented on Sep 18, 2015

    @akorchev

    I know that I am pushing this but what about tap="" vs ontap=""? The on prefix is something web developers understand well.

  11. enchev commented on Sep 18, 2015

    @enchev
    Contributor

    @akorchev Here you go:36036c5 :)

  12. tjvantoll commented on Sep 18, 2015

    @tjvantoll
    Contributor

    Wow, this is awesome! @akorchev You should keep asking for things :)

  13. hshristov commented on Sep 22, 2015

    @hshristov
    Contributor

    @enchev Now we need to do the hard work to describe this change in the documentation & in help articles (cssClass rename, tap -> onTap). I'm marking this as a breaking change because if someone have by any chance exposed his event as 'onEvent' in 1.3 from 1.4 he will need to use 'ononEvent' in the XML.

  14. enchev commented on Sep 23, 2015

    @enchev
    Contributor

    Just to clear what I've done in my pull request to avoid further confusion:

    • cssClass property is not removed and you can still use it from both XML and JavaScript
    • I've added new custom attribute class for all view that can be used only from XML
    • event names are not removed or renamed and you can still use tap, doubleTap, etc.:
      <Button tap="myTap" />

    Now you can use also more familiar to web devs syntax with on prefix:

      <Button ontap="myTap" />

    Both are valid!

  15. enchev commented on Sep 28, 2015

    @enchev
    Contributor

    I've updated the docs to use class instead cssClass and I've added special section to our declarative UI with XML article.

  16. lock commented on Aug 30, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  17. locked and limited conversation to collaborators on Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions