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

#1389 :- Add tooltip to Product grid as well as Product page describing what is "Salable Quantity" #2868

Merged
merged 3 commits into from
Mar 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="salable_quantity" sortOrder="55">
<fieldset name="salable_quantity" sortOrder="55" template="Magento_InventorySalesAdminUi/product/form/fieldset">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="tooltip" xsi:type="array">
<item name="description" xsi:type="string" translate="true">Aggregated inventory available to purchase for a stock. The amount aggregates assigned source's Quantity subtracting the Out-of-Stock Threshold (or MinQty).</item>
sidolov marked this conversation as resolved.
Show resolved Hide resolved
</item>
</item>
</argument>
<settings>
<label translate="true">Product Salable Quantity</label>
<collapsible>true</collapsible>
Expand Down
18 changes: 18 additions & 0 deletions InventorySalesAdminUi/view/adminhtml/web/css/source/_module.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// /**
// * Copyright © Magento, Inc. All rights reserved.
// * See COPYING.txt for license details.
// */

//
// Styling for tooltip styling
// ---------------------------------------------

.admin__field-saleable-qty {
margin-top: 0;
.admin__field-tooltip-content {
width: 29rem;
right: -5rem;
font-size: 14px;
font-weight: normal;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<div class="fieldset-wrapper"
css="$data.additionalClasses"
attr="'data-level': $data.level, 'data-index': index"
data-bind="visible: $data.visible === undefined ? true: $data.visible">
<div class="fieldset-wrapper-title"
attr="tabindex: !collapsible ? -1 : 0,
'data-state-collapsible': collapsible ? opened() ? 'open' : 'closed' : null"
click="toggleOpened"
keyboard="13: toggleOpened"
if="label">

<strong css="'admin__collapsible-title': collapsible,
title: !collapsible,
'_changed': changed,
'_loading': loading,
'_error': error">
<span translate="label"/>
<div class="admin__field-saleable-qty admin__field-tooltip">
<a class="admin__field-tooltip-action action-help" target="_blank" tabindex="1" attr="href: tooltip.link"/>
<div class="admin__field-tooltip-content" html="tooltip.description"/>
sidolov marked this conversation as resolved.
Show resolved Hide resolved
</div>
<span class="admin__page-nav-item-messages" if="collapsible">
<span class="admin__page-nav-item-message _changed">
<span class="admin__page-nav-item-message-icon"></span>
<span class="admin__page-nav-item-message-tooltip"
data-bind="i18n: 'Changes have been made to this section that have not been saved.'">
</span>
</span>
<span class="admin__page-nav-item-message _error">
<span class="admin__page-nav-item-message-icon"></span>
<span class="admin__page-nav-item-message-tooltip"
data-bind="i18n: 'This tab contains invalid data. Please resolve this before saving.'">
</span>
</span>
<span class="admin__page-nav-item-message-loader">
<span class="spinner">
<span repeat="8"/>
</span>
</span>
</span>
</strong>
</div>

<div class="admin__fieldset-wrapper-content"
css="'admin__collapsible-content': collapsible, '_show': opened, '_hide': !opened()">
<fieldset
if="opened() || _wasOpened || initializeFieldsetDataByDefault"
class="admin__fieldset"
each="data: elems, as: 'element'" render=""/>
</div>
</div>