Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Add Missing documentation for Javascript Dropdown Widget #4928

Merged
merged 12 commits into from
Jul 16, 2019

Conversation

vasilii-b
Copy link

@vasilii-b vasilii-b commented Jul 10, 2019

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.

@devops-devdocs
Copy link
Collaborator

An admin must run tests on this PR before it can be merged.

@vasilii-b vasilii-b changed the title Addition/widget dropdown Add Missing documentation for Javascript Dropdown Widget Jul 10, 2019
@rogyar rogyar self-assigned this Jul 10, 2019
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
Copy link
Contributor

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:
Copy link
Contributor

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
Copy link
Contributor

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

@rogyar rogyar added 2.2.x 2.3.x Magento 2.3 related changes New Topic A major update published as an entirely new document labels Jul 10, 2019
@rogyar
Copy link
Contributor

rogyar commented Jul 10, 2019

Hi @vasilii-b. Thank you for the great topic. Please, consider applying the adjustments provided in the review.
Also, I would kindly ask you to move the newly introduced image into common/images/widget/ directory. In that way, we can reuse this image for different versions without additional overhead.

The example is here https://github.com/magento/devdocs/pull/4731/files

@rogyar rogyar added the Waiting for Response Waiting for response from internal/external parties label Jul 10, 2019
Burlacu Vasilii and others added 5 commits July 10, 2019 21:40
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
@vasilii-b
Copy link
Author

Hi @rogyar,
Thanks for checking this so quickly and helping improve it! I've added requested changes. Could you please check them as well?
Thank you!

@erikmarr erikmarr self-requested a review July 10, 2019 20:54
@rogyar rogyar removed the Waiting for Response Waiting for response from internal/external parties label Jul 12, 2019

## Overview

Widget source file is [lib/web/mage/dropdowns.js].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Contributor

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
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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.

Burlacu Vasilii and others added 2 commits July 16, 2019 09:25
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>
@vasilii-b vasilii-b force-pushed the addition/widget-dropdown branch from 675647d to c66d513 Compare July 16, 2019 07:10
@vasilii-b
Copy link
Author

Hi @erikmarr,
Could you please review added requested changes? Thank you!

@erikmarr
Copy link
Contributor

running tests

@erikmarr erikmarr merged commit d62705f into magento:master Jul 16, 2019
@ghost
Copy link

ghost commented Jul 16, 2019

Hi @vasilii-b, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@erikmarr
Copy link
Contributor

Thanks @vasilii-b!

@vasilii-b vasilii-b deleted the addition/widget-dropdown branch July 16, 2019 16:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2.2.x 2.3.x Magento 2.3 related changes New Topic A major update published as an entirely new document Partner: Atwix partners-contribution PR created by Magento partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants