Commit 91c9f442 authored by Gavin Williams's avatar Gavin Williams Committed by Chromium LUCI CQ

scanning: Create error slot for scan settings

This fixes a UI bug where the "Can't connect to scanners?" message
only shifts the Scanner dropdown and not also the Scanner label.

Before: http://screen/47MFUFFmwh4UMYm
After: http://screen/7Gm86RYfjAGWDV9

Bug: 1059779
Change-Id: I74bdd0cd50ff096dd0b54b9578526ae53c513691
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2588836Reviewed-by: default avatarJesse Schettler <jschettler@chromium.org>
Commit-Queue: Gavin Williams <gavinwill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836682}
parent c62cdb03
<style include="scanning-shared scanning-fonts">
:host {
#selectDiv {
align-items: center;
display: flex;
height: 48px;
......@@ -31,6 +31,18 @@
flex-shrink: 0;
width: 192px;
}
::slotted([slot=error]) {
display: block;
margin-bottom: 8px;
margin-inline-end: 40px;
margin-inline-start: 120px;
margin-top: -8px;
width: 192px;
}
</style>
<slot name="label"></slot>
<slot name="settings"></slot>
<div id="selectDiv">
<slot name="label"></slot>
<slot name="settings"></slot>
</div>
<slot name="error"></slot>
......@@ -2,7 +2,6 @@
#scanHelp {
color: var(--google-grey-700);
font-size: 10px;
padding-top: 8px;
}
#scanHelpLink {
......@@ -35,10 +34,11 @@
</option>
</template>
</select>
<span id="scanHelp" hidden$="[[shouldHideScanHelpLink_(loaded, scanners)]]">
[[i18n('noScannersHelpText')]]
<!-- TODO(joonbug): Add href to the help link when available -->
<a id="scanHelpLink" href="#">[[i18n('noScannersHelpLinkLabel')]]</a>
</span>
</div>
<div id="scanHelp" slot="error"
hidden$="[[shouldHideScanHelpLink_(loaded, scanners)]]">
[[i18n('noScannersHelpText')]]
<!-- TODO(gavinwill): Add href to the help link when available -->
<a id="scanHelpLink" href="#">[[i18n('noScannersHelpLinkLabel')]]</a>
</div>
</scan-settings-section>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment