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

KnockoutJS: Custom Binding Documentation #718

Closed
astorm opened this Issue Jun 16, 2016 · 8 comments

Comments

Projects
None yet
5 participants
@astorm
Contributor

astorm commented Jun 16, 2016

Magento 2's KnockoutJs implementation includes a number of "custom bindings". There are 12 in the 2.0.x branch.

    './bind/scope',
    './bind/staticChecked',
    './bind/datepicker',
    './bind/outer_click',
    './bind/keyboard',
    './bind/optgroup',
    './bind/fadeVisible',
    './bind/mage-init',
    './bind/after-render',
    './bind/i18n',
    './bind/collapsible',
    './bind/autoselect',

Documenting what each of these does would be extremely valuable to javascript and theme developers working in the Magento 2 system.

@ghost ghost assigned almarchenko Jun 16, 2016

@almarchenko

This comment has been minimized.

Show comment
Hide comment
@almarchenko

almarchenko Jun 22, 2016

Contributor

Hi @astorm, thank you for the feedback!
I created an internal issue for this MAGETWO-54468, but it will take at least couple of weeks, because there are other issues in backlog.

Contributor

almarchenko commented Jun 22, 2016

Hi @astorm, thank you for the feedback!
I created an internal issue for this MAGETWO-54468, but it will take at least couple of weeks, because there are other issues in backlog.

@tanberry

This comment has been minimized.

Show comment
Hide comment
@tanberry

tanberry Sep 14, 2016

Hi @astorm, we have a "chapter" about the custom bindings planned for the new UI Components guide. @almarchenko is continuing the Doc Sprint work on this guide, with the core developers... below is a screenshot of the outline for the bindings we want to document:

image

We plan to post the outline for the entire book; feedback welcome.

tanberry commented Sep 14, 2016

Hi @astorm, we have a "chapter" about the custom bindings planned for the new UI Components guide. @almarchenko is continuing the Doc Sprint work on this guide, with the core developers... below is a screenshot of the outline for the bindings we want to document:

image

We plan to post the outline for the entire book; feedback welcome.

@astorm

This comment has been minimized.

Show comment
Hide comment
@astorm

astorm Sep 14, 2016

Contributor

Looks like a good start for covering the components.

Although "in 2.1 make sure they use our new templates" is a little confusing. It's not clear what templates they're talking about -- the .html files loaded over HTTP? Or something more? (Regardless, as a side note, documentation of how those .html templates work and where that syntax comes from would be useful)

Also -- the xhtml template mentions are a little confusing here as well. It's my understanding that the xhtml templates are used specifically with UI components (not generic Knockout), and are used to output the initial bit of HTML + Javascript that kicks off registering KnockoutJS view models. Are these the XHTML templates that are referenced above, or are these something else?

So, the plans for components looks solid, but the context those components sits in is a little fuzzy.

Hope that helps!

Contributor

astorm commented Sep 14, 2016

Looks like a good start for covering the components.

Although "in 2.1 make sure they use our new templates" is a little confusing. It's not clear what templates they're talking about -- the .html files loaded over HTTP? Or something more? (Regardless, as a side note, documentation of how those .html templates work and where that syntax comes from would be useful)

Also -- the xhtml template mentions are a little confusing here as well. It's my understanding that the xhtml templates are used specifically with UI components (not generic Knockout), and are used to output the initial bit of HTML + Javascript that kicks off registering KnockoutJS view models. Are these the XHTML templates that are referenced above, or are these something else?

So, the plans for components looks solid, but the context those components sits in is a little fuzzy.

Hope that helps!

@tanberry

This comment has been minimized.

Show comment
Hide comment
@tanberry

tanberry Sep 15, 2016

Thanks @astorm for the feedback. As part of a concerted effort we did a Doc Sprint with the core devs... and as the very first step we defined a comprehensive outline of everything that should be documented about UI Components. Above I meant to post just the section on the custom bindings, but the screen capture also shows some topics above the bindings (in orange) that we know we need to cover. (So they are defined in the Outline, but not yet written.)

I should state that the outline is a raw capture of the topics and types of content that we decided we needed to document, and doesn't reflect finished titles so much as the "what" we need to doc. And some were entered very quickly in an errrr... dynamic setting where 5 or 6 people were collaborating on what exactly needed to be covered. Both the mention of the "new templates" and the use of xhtml for the Form and Grid UI components will be covered as we continue the Doc Sprint work with the core devs. I wish it could go faster, but DevDoc is very grateful that we are getting this support from the devs who actually created UI Comps! ;-) Developers writing Docs is a beautiful thing.

We have it in the queue to publish the entire Outline; it wold be great if you would provide further feedback, and see if there are any gaps in our plan. ;-)

tanberry commented Sep 15, 2016

Thanks @astorm for the feedback. As part of a concerted effort we did a Doc Sprint with the core devs... and as the very first step we defined a comprehensive outline of everything that should be documented about UI Components. Above I meant to post just the section on the custom bindings, but the screen capture also shows some topics above the bindings (in orange) that we know we need to cover. (So they are defined in the Outline, but not yet written.)

I should state that the outline is a raw capture of the topics and types of content that we decided we needed to document, and doesn't reflect finished titles so much as the "what" we need to doc. And some were entered very quickly in an errrr... dynamic setting where 5 or 6 people were collaborating on what exactly needed to be covered. Both the mention of the "new templates" and the use of xhtml for the Form and Grid UI components will be covered as we continue the Doc Sprint work with the core devs. I wish it could go faster, but DevDoc is very grateful that we are getting this support from the devs who actually created UI Comps! ;-) Developers writing Docs is a beautiful thing.

We have it in the queue to publish the entire Outline; it wold be great if you would provide further feedback, and see if there are any gaps in our plan. ;-)

@almarchenko

This comment has been minimized.

Show comment
Hide comment
@almarchenko

almarchenko Nov 1, 2016

Contributor

Internal issue MAGETWO-55289

Contributor

almarchenko commented Nov 1, 2016

Internal issue MAGETWO-55289

magento-cicd2 pushed a commit that referenced this issue Mar 9, 2017

Merge pull request #718 from magento/ds_BIC_2012-2013
Backward incompatible changes update and edits

@jcalcaben jcalcaben added the Tracking label May 11, 2017

@almarchenko

This comment has been minimized.

Show comment
Hide comment
@almarchenko

almarchenko May 26, 2017

Contributor

@astorm It happened)
We published the description of Magento custom Knockout.js bindings.
http://devdocs.magento.com/guides/v2.1/ui_comp_guide/concepts/knockout-bindings.html

Thank you for creating the request!
I'm closing the issue if you do not have additional comments.

Contributor

almarchenko commented May 26, 2017

@astorm It happened)
We published the description of Magento custom Knockout.js bindings.
http://devdocs.magento.com/guides/v2.1/ui_comp_guide/concepts/knockout-bindings.html

Thank you for creating the request!
I'm closing the issue if you do not have additional comments.

@astorm

This comment has been minimized.

Show comment
Hide comment
@astorm

astorm May 26, 2017

Contributor

Whaaaaaaaaaaat? Yay!

Contributor

astorm commented May 26, 2017

Whaaaaaaaaaaat? Yay!

@astorm astorm closed this May 26, 2017

@andreicostin

This comment has been minimized.

Show comment
Hide comment
@andreicostin

andreicostin Nov 21, 2017

@almarchenko Thanks a lot for adding the documentation for these custom bindings. Would it be possible to add documentation on how to properly add our own custom bindings without touching Magento's core?

andreicostin commented Nov 21, 2017

@almarchenko Thanks a lot for adding the documentation for these custom bindings. Would it be possible to add documentation on how to properly add our own custom bindings without touching Magento's core?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment