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

Widget Proposal #167

Closed
michaeljota opened this issue Nov 25, 2016 · 3 comments
Closed

Widget Proposal #167

michaeljota opened this issue Nov 25, 2016 · 3 comments

Comments

@michaeljota
Copy link

I like this tool, cause it enforce consistency through the code, like all linters I guess. In my projects I use the concept of widget, witch are 'dummy components'. I would like to be able to set a rule, that allows the name of widget, and ensure, or try hard to, the component only have inputs and outputs properties.

Motivation

React community have develop their own 'dummy components', and 'smart components'. The dummy are those that does not interact with the state of the application, but their state it's giving from a higher component. The smart are those that dispatch events to the state, binds the events from the dummy with those dispatches, and sent the data that the dummy should display.

In React, the dummy are called components, and the smart are called containers. However, Angular 2 conventions, every component can be smart, cause 2 way data binding and other feats that allows Angular application components to manage the state in a proper way.

A widget however, it's used to name a piece of something that only display information, and I think that's really what the dummy components are about, show information and send events to be handle by the component.

Currently, all the components are called the same, but I would like to suggest this name style for the dummy components.

@mgechev
Copy link
Owner

mgechev commented Nov 28, 2016

Hey @michaeljota as part of the next release we'll introduce an option to set a custom suffix for your components & directives which by default will be Component & Directive. This way you'll be able to easily introduce custom naming convention.

For further details take a look at this issue #132.

@mgechev mgechev closed this as completed Nov 28, 2016
@michaeljota
Copy link
Author

@mgechev I see the new option. I would want to suggest to this option to accept an array of suffixes, cause in a project it may get sense to have more than one suffix.

@mgechev
Copy link
Owner

mgechev commented Dec 11, 2016

I'm not sure that this will be with alignment with the style guide. It suggest only a single suffix, also we did an exception for Ionic 2 where we allow Page suffix.

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

2 participants