-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add Missing documentation for Javascript Dropdown Widget #4928
Conversation
…ropdown # Conflicts: # guides/v2.1/javascript-dev-guide/widgets/jquery-widgets-about.md
An admin must run tests on this PR before it can be merged. |
content for each of available options. | ||
|
||
{:.bs-callout .bs-callout-info} Dropdown widget is not meant to replace default | ||
HTML select element. By replacing default select in store forms don't expect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By replacing default select in store forms don't expect the store to work 100% the same as before changes.
Could you provide some clarification there or, maybe, remove this section. Because currently it sounds mysterious and scary at the same time :)
Thank you.
### Styles | ||
|
||
By default the dropdown is not styled. But, there is a handy | ||
[LESS mixin `.lib-dropdown()`] that comes to the rescue: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that comes to the rescue
Please, rephrase this part slightly to have it in more document-style format. Thank you.
### `activeClass` {#d_activeClass} | ||
|
||
The CSS class that reflects the current state of the dropdown widget. | ||
Given class is added to the element widget was initialized when the dropdown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please simplify this sentence slightly to make it easier to read. I.e.
Given class is added to the widget element when the menu is visible
Hi @vasilii-b. Thank you for the great topic. Please, consider applying the adjustments provided in the review. The example is here https://github.com/magento/devdocs/pull/4731/files |
Co-Authored-By: Yaroslav Rogoza <enarc@atwix.com>
Co-Authored-By: Yaroslav Rogoza <enarc@atwix.com>
Co-Authored-By: Yaroslav Rogoza <enarc@atwix.com>
…-b/devdocs into addition/widget-dropdown * 'addition/widget-dropdown' of https://github.com/vasilii-b/devdocs: Update guides/v2.2/javascript-dev-guide/widgets/widget_dropdown.md Update guides/v2.2/javascript-dev-guide/widgets/widget_dropdown.md Update guides/v2.2/javascript-dev-guide/widgets/widget_dropdown.md
Hi @rogyar, |
|
||
## Overview | ||
|
||
Widget source file is [lib/web/mage/dropdowns.js]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Widget source file is [lib/web/mage/dropdowns.js]. | |
The dropdown widget source is located in [lib/web/mage/dropdowns.js]. |
Also, move this sentence to be after the next sentence (before the Usages section).
### `btnArrow` {#d_btnArrow} | ||
|
||
A jQuery selector for the arrow that expresses the state of the dropdown. | ||
The widget changes given element's text to '+' or '-", depending on the dropdown state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this line as it was combined above.
|
||
A jQuery selector for the arrow that expresses the state of the dropdown. | ||
The widget changes given element's text to '+' or '-", depending on the dropdown state. | ||
It's not required the element to be present in the dropdown HTML markup. It works |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this line as it was combined above.
A jQuery selector for the arrow that expresses the state of the dropdown. | ||
The widget changes given element's text to '+' or '-", depending on the dropdown state. | ||
It's not required the element to be present in the dropdown HTML markup. It works | ||
just fine without it as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this line as it was combined above.
### `menu` {#d_menu} | ||
|
||
A jQuery selector that represents the dropdown's menu element. | ||
Looking at the HTML markup, given element has to be inside the `parent` option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this line as it was combined above.
Co-Authored-By: Erik Marr <45772211+erikmarr@users.noreply.github.com>
Co-Authored-By: Erik Marr <45772211+erikmarr@users.noreply.github.com> Co-Authored-By: Erik Marr <45772211+erikmarr@users.noreply.github.com> Co-Authored-By: Erik Marr <45772211+erikmarr@users.noreply.github.com> Co-Authored-By: Erik Marr <45772211+erikmarr@users.noreply.github.com> Co-Authored-By: Erik Marr <45772211+erikmarr@users.noreply.github.com> Co-Authored-By: Erik Marr <45772211+erikmarr@users.noreply.github.com> Co-Authored-By: Erik Marr <45772211+erikmarr@users.noreply.github.com> Co-Authored-By: Erik Marr <45772211+erikmarr@users.noreply.github.com> Co-Authored-By: Erik Marr <45772211+erikmarr@users.noreply.github.com>
675647d
to
c66d513
Compare
Hi @erikmarr, |
running tests |
Hi @vasilii-b, thank you for your contribution! |
Thanks @vasilii-b! |
Purpose of this pull request
This pull request aims to enrich the documentation with missing information regarding Dropdown Widget - #4926.
Affected DevDocs pages
N/A. Not yet present on the DevDocs website.
Links to Magento source code
whatsnew
Added information about the JavaScript dropdown widget.