Skip to content
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

Property names #1

Open
cornae opened this issue Dec 12, 2014 · 7 comments
Open

Property names #1

cornae opened this issue Dec 12, 2014 · 7 comments
Assignees

Comments

@cornae
Copy link
Member

cornae commented Dec 12, 2014

@jcbrand, The naming convention for Patterns properties is to replace space by dashes, instead of camel casing and to avoid boolean properties, as they are less declarative and not matching a CSS style syntax. For the boolean part a little bit more thinking from both our sides would be required, but could you change the mapping already for the current properties to dashed style?

@jcbrand
Copy link
Member

jcbrand commented Dec 13, 2014

yes, I agree we should clean up pat-upload and bring it inline with Patternslib conventions.

@fulv
Copy link
Contributor

fulv commented Dec 17, 2014

Just my 2c: It seems to me like the camel case convention has the advantage that you can use the same name everywhere, in CSS and in JavaScript. Names with dashes can not be used in JavaScript (or in Python for that matter), so you have to have different names, e.g. my-name in properties, my_name in JavaScript.

@jcbrand
Copy link
Member

jcbrand commented Dec 17, 2014

@fulv I wasn't there when the convention was chosen, however, the Patternslib convention came first. Deciding later to then choose a different convention for Mockup was therefore IMO irresponsible.

If we wanted to move to a different convention for Patternslib, we would have to change all the existing patterns.

@fulv
Copy link
Contributor

fulv commented Dec 17, 2014

Fine, I'm not trying to subvert. On the other hand, names with underscores instead of dashes work everywhere, too, and almost look the same. ;)

@cornae
Copy link
Member Author

cornae commented Dec 18, 2014

Hi Fulvio,

It's true what you say about the underscores. One of the goals of Patternslib is to make a library that is designer friendly. One way of achieving that by making the optics of the syntax similar to something designers are familiar with: CSS. In CSS only dashes are used as a space replacement. Also dashes are sometimes considered 'prettier' than underscores and pretty helps to get designers on you side :).

Op 17 dec. 2014, om 15:52 heeft Fulvio Casali [email protected] het volgende geschreven:

Fine, I'm not trying to subvert. On the other hand, names with underscored instead of dashes work everywhere, too, and almost look the same. ;)


Reply to this email directly or view it on GitHub #1 (comment).

@cornae
Copy link
Member Author

cornae commented Dec 19, 2014

That's also true :)

Op 17 dec. 2014 om 15:52 heeft Fulvio Casali [email protected] het volgende geschreven:

Fine, I'm not trying to subvert. On the other hand, names with underscored instead of dashes work everywhere, too, and almost look the same. ;)


Reply to this email directly or view it on GitHub.

@fulv
Copy link
Contributor

fulv commented Dec 26, 2014

Hi @cornae,
I've cleaned up all the CamelCase configuration value names and converted them to lowercase-dash-separated. I have not yet made the changes you requested in your "alternate" documentation table, because some of them are semantically different from the current ones. I wanted to be sure that the "cleaned up" names keep working as before, as a first step. Some of the configuration values don't even seem to be implemented, or at least I can't see that they do anything at all. But part of it might be that they get passed down to Dropzone(), which expects them to have a certain name and semantics. This would be another argument against changing the semantics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants