-
Notifications
You must be signed in to change notification settings - Fork 5
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
Multi selectors #52
Comments
Т.е. это надо будет дважды прописывать? И для блока A, и для B? |
Real examples could be easily a bad architecture.
You sure that we need Do you specified RelationNode types (or something like that) already? |
Нет. Если в декларации есть A и B то работает, если чего-то нет, то не работает. В какой последовательности записали — неважно. Смущает синтаксис? Есть идеи как лучше? |
Yes. This is consistent with other cases. And we can specify the technology. onlyWith: [
{
entity: { block: 'B' },
tech: 'js'
}
]
What do you mean by RelationNode types? |
Смущает то, что надо будет помнить про вхождение блока B в зависимостях блока А |
I mean we need specification for node types. |
Так это жизненная необходимость :) Без такого рода зависимостей не избежать избыточного кода. Такие зависимости можно писать не в файлах блока, а каких-нибудь файлах уровня или проекта. Но это уже дело вкуса. |
Relations is not graph, although very similar. Therefore, there are no nodes and their types. Or do you mean that we should describe the relations format? |
@blond The question of missing terminology. What is relation? Where are dependency-edges? |
There are cases when several entities depend on other entity.
The dependency should be added only when both entities are in declaration.
Example:
Real examples:
{ block: 'checkbox', modName: 'theme', modVal: 'islands'
with{ block: 'checkbox', modName: 'type', modVal: 'button' }
depend on{ block: 'button', modName: 'theme', modVal: 'islands' }
.islands
theme ofbutton
should be added only ifcheckbox
hastype_button
modifier withislands
theme.Code in
bem-components
— https://github.com/bem/bem-components/blob/5406834d2f35911574ec49f974c0788c800d7835/design/common.blocks/checkbox/_theme/checkbox_theme_islands.deps.js{ block: 'dropdown', modName: 'theme', modVal: 'islands'
with{ block: 'dropdown', modName: 'switcher', modVal: 'link' }
depend on{ block: 'link', modName: 'theme', modVal: 'islands' }
.islands
theme oflink
should be added only ifdropdown
hasswitcher_link
modifier withislands
theme.Code in
bem-components
— https://github.com/bem/bem-components/blob/5406834d2f35911574ec49f974c0788c800d7835/design/common.blocks/dropdown/_theme/dropdown_theme_islands.deps.jsQuotes:
Taken from bem-archive/bem-tools#463.
The text was updated successfully, but these errors were encountered: