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

BEMTREE: introduce js(), mix(), mods() and elemMods() modes #362

Closed
miripiruni opened this issue Oct 4, 2016 · 7 comments
Closed

BEMTREE: introduce js(), mix(), mods() and elemMods() modes #362

miripiruni opened this issue Oct 4, 2016 · 7 comments

Comments

@miripiruni
Copy link
Contributor

miripiruni commented Oct 4, 2016

After discussion in #332 we decided to introduce new modes in BEMTREE.

We dicieded to introduce only data related modes (not HTML related).

@miripiruni
Copy link
Contributor Author

It is useful to @collapsus for example

@miripiruni
Copy link
Contributor Author

miripiruni commented Oct 12, 2016

The plan: almost no difference in modes with BEMTREE and BEMHTML, only output format difference (BEMJSON, HTML).

@mishanga mishanga changed the title BEMTREE: introduce cls(), bem(), js(), mix() and attrs() modes BEMTREE: introduce bem(), js(), mix() and attrs() modes Nov 10, 2016
miripiruni added a commit that referenced this issue Nov 10, 2016
For motivation see #362 Spoiler: we want have no difference in modes with BEMTREE and
BEMHTML, only output format difference (BEMJSON for BEMTREE, HTML for BEMHTML).

Fixed: #362
See also: #332
miripiruni added a commit that referenced this issue Nov 10, 2016
For motivation see #362 Spoiler: we want have no difference in modes with
BEMTREE and BEMHTML, only output format difference (BEMJSON for BEMTREE,
HTML for BEMHTML).

Fixed: #362
See also: #332
miripiruni added a commit that referenced this issue Nov 10, 2016
For motivation see #362 Spoiler: we want have no difference in modes with
BEMTREE and BEMHTML, only output format difference (BEMJSON for BEMTREE,
HTML for BEMHTML).

Fixed: #362
See also: #332
miripiruni added a commit that referenced this issue Nov 10, 2016
For motivation see #362 Spoiler: we want have no difference in modes with
BEMTREE and BEMHTML, only output format difference (BEMJSON for BEMTREE,
HTML for BEMHTML).

Fixed: #362
See also: #332
@tadatuta
Copy link
Member

tadatuta commented Nov 10, 2016

Let me try once again: I don't think these mods are useful enough for BEMTREE and moreover they are kinda harmful: user just should not set such things like attributes, classes, etc in BEMTREE — it's all about HTML. And extra modes will make BEMTREE slower.

Are there really strong arguments for it?

@vithar
Copy link
Member

vithar commented Nov 10, 2016

I agree with @tadatuta

@tadatuta
Copy link
Member

We talked with @collapsus and decided it should be enough to add just js() mode which is widely used for blocks with models, i.e. the list of modes in BEMTREE should be following:

  • def() + extend(), replace() and wrap() helpers
  • content()
  • js()

@miripiruni
Copy link
Contributor Author

@tadatuta can you show example of js() usage?

@collapsus
Copy link

collapsus commented Nov 18, 2016

yet in the compact syntax
not for models

    js: {
        var currenciesDescription = this.data.currencies_description,
            currencies  = {};

        Object.keys(currenciesDescription).map(function(key) {
            currencies[key] = currenciesDescription[key].full_name;
        });

        return {
            currencies: currencies
        };
    }

for models

    js: {
        modelName: 'm-autopay-settings',
        modelData: this.modelData
    }

@miripiruni miripiruni changed the title BEMTREE: introduce bem(), js(), mix() and attrs() modes BEMTREE: introduce js(), mix(), mods() and elemMods() modes Dec 7, 2016
@miripiruni miripiruni added this to the 8.5.0 milestone Dec 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants