-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
all caps for HTML components? #120
Comments
I'm not certain I like how it looks, I'd probably have to use it for a while to decide. That being said, if it's "just allow" i.e. in addition to the lowercased stuff, I'm fine w/adding it. From haml/slim, I'm more used to lowercase |
This doesn't really suit my tastes, so I can't see myself using it. I prefer ruby's convention of uppercase being reserved for constants. In my opinion, if a component is growing to the point that it is difficult to read, it's time to break it into small components. |
I would say having way to see what is a html tag and is a ruby function would be really helpful. |
@ajjahn - I think the concern is not with the size of the component. In fact this came up when reading a very small component... The problem is to distinguish between regular old methods, (params or my_private_method for example) HTML tags (div, etc) and application defined components (Clock). As far as constants go, well in a very real sense the HTML tags are constants, so it sort of makes sense. @fkchang - while we would not want to deprecate this (after all catprint already has a huge pile of code to maintain) the question is more to do with standards, and how we will present code in tutorials, etc. |
@catmando I lean towards it as optional, these are all html tags, right, so I sort of expect a web developer to have familiarity with them, and if they are Rails programmers, it's likely they have been exposed to haml and slim, so the DSL would resemble those. I do sort of share @ajjahn's concerns a bit, in that what I like about the ruby DSL is that while it might look like slim (or like markaby nearly exactly), it's in fact just Ruby. |
This issue was moved to ruby-hyperloop/hyper-react#120 |
thinking that we should allow HTML components to be expressed in all CAPS.
this seems to make the code a lot more readable, and distinguishes between builtin tags (ALL CAPS), application defined components (CamelCase) and other methods (snake_case).
The downside is that its harder to type, although its probably easy to program your favorite editor to do the upcase automatically.
This came up in a discussion with @loicboutet btw.
The text was updated successfully, but these errors were encountered: