pattern-lab / patternlab-php-core

This repository provides the core functionality for Pattern Lab. It is meant to be used from within an Edition with a PatternEngine and StarterKit.
http://patternlab.io/
MIT License
43 stars 62 forks source link

Preventing state from being added to Patterns in lineage. #139

Closed EvanLovely closed 6 years ago

EvanLovely commented 6 years ago

Old behavior: if A.twig has a state set and is included in B.twig, then B.twig gets same state. New behavior: B.twig does not get state from A.twig

EvanLovely commented 6 years ago

Fixes:

EvanLovely commented 6 years ago

Released in https://github.com/pattern-lab/patternlab-php-core/releases/tag/v2.8.4

bmuenzenmeyer commented 6 years ago

I need to double check but i think this is off-spec.

Edit: trying to find clatifying text from Dave. I know we discussed it and then I implemented https://github.com/pattern-lab/patternlab-node/blob/master/core/lib/lineage_hunter.js#L88 with tests.

bmuenzenmeyer commented 6 years ago

https://github.com/pattern-lab/patternlab-node/issues/313

bmuenzenmeyer commented 6 years ago

Somehow found it screenshot_20171013-002146

EvanLovely commented 6 years ago

@bmuenzenmeyer ok, I've got it back in! See comments over in #142

bradfrost commented 6 years ago

@EvanLovely @bmuenzenmeyer I really like the ripple effect of state. If the primary nav isn't done, the header isn't done, which means the homepage isn't done. But I can also see how people might only want to flag the patterns themselves and not have the ripple effect happen. Perhaps there could be a config option that gives people the choice? I'd say this is pretty low on the totem pole, but just bringing it up.

EvanLovely commented 6 years ago

@bradfrost Wanna bring it up in The Spec? I like the idea of a stateSetByLineage config option with the default being true to preserve current behavior.