Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

update new components submission guidelines first draft #14

Merged
merged 3 commits into from Dec 8, 2017

Conversation

dadaphl
Copy link
Contributor

@dadaphl dadaphl commented Dec 7, 2017

Please discuss and expand/correct this guidelines.

@dadaphl
Copy link
Contributor Author

dadaphl commented Dec 7, 2017

you can find a rendered version here

https://hackmd.io/GwZghgRgnAJqC0YDGBTAZvALCsGoAYB2FeAVgCYwLyCRyY0g?view

Copy link
Contributor

@okwme okwme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@okwme okwme merged commit 60dddfe into master Dec 8, 2017
@okwme okwme deleted the update-readme branch December 8, 2017 10:03
@acdbaykal
Copy link
Contributor

I'm not so sure about

Add all modifier classes (that represent type, state or similar things) of the component to the main wrapping element.

I think you should use modifier with each element effected by the state.So

.ae-progress-indicator._size_large { .progress-icon {...} .progress-label {...} }

would be more like

.ae-progress-indicator._size_large {} .progress-icon._size_large {} .progress-label._size_large{}
This reduces the specificity of your selectors and makes sub elements less dependent on their parent container. If you wanted pull out some elements into a new component and had used the method you suggested, you'd probably have to rewrite most of the css, because the parent element is not part of the new component. But if you let each child element handle it's state it becomes easier to reuse the css.

The second issue I have is not mentioning testing. We are shamefully guilty about that ourselves. But every component should be submitted with working tests.

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

Successfully merging this pull request may close these issues.

None yet

3 participants