chec / ui-library

Chec UI library assets and components
https://chec-ui.netlify.app/
BSD 3-Clause "New" or "Revised" License
21 stars 6 forks source link

Naming convention for UI components #26

Closed jaepass closed 4 years ago

jaepass commented 4 years ago

Ideas on having a more cohesive naming convention for ui components

ScopeyNZ commented 4 years ago

I miss React πŸ™ .

I agree that a Chec prefix is better than Base. I don't really like any other suggestion you listed πŸ˜… .

john-raymon commented 4 years ago

I like Chec also. πŸ”₯ I'm open to changing it to Chec.

Does this issue require all current components to be changed to Chec for it to be closed?

  • the prefix 'Base' does not make sense for all components

Want to highlight the explanation for Base/Chec components. As in the future, if we were to create some smart container component in this component library we wouldn't add Base/Chec to it's name as that is besides the point of the rule, as Chec/Base wouldn't make sense for all components that don't fall into the explanation below, I think, I may be interpreting it different..

Detailed Explanation
These components lay the foundation for consistent styling 
and behavior in your application. They may only contain:

HTML elements,
other base components, and
3rd-party UI components.
But they’ll never contain global state (e.g. from a Vuex store).

Their names often include the name of an element they wrap 
(e.g. BaseButton, BaseTable), unless no element exists for 
their specific purpose (e.g. BaseIcon). 
If you build similar components for a more specific context, 
they will almost always consume these components 
(e.g. BaseButton may be used in ButtonSubmit).

https://vuejs.org/v2/style-guide/#Base-component-names-strongly-recommended

ScopeyNZ commented 4 years ago

I actually hate this rule from Vue's recommended - that we should call everything "base" whatever because there's the potential that something might supersede it in the future. Feels like "premature optimisation". Anyway - it's pretty minor, I just don't think we should spend much time debating it. Let's choose something (I like Chec too) and just stick with it please. We can worry about having to deal with changes another time.

Another reason I'm missing React here, names don't really matter πŸ™ .

john-raymon commented 4 years ago

@ScopeyNZ @jaepass Good points, so Chec- it is moving forward. I'll close this.