Commit 6b449e14 authored by Gavin Williams's avatar Gavin Williams Committed by Commit Bot

Hide printer status error text when configuring printer

When a printer is clicked in destination dialog, don't show the printer
status error messages while it's attempting to configure the printer.

The After screenshot shows:
1. Dialog initially opened with error status text
2. Clicking that printer to attempt to configure
3. Configuration failing

Before: http://screen/9FJ2jistunJS2Uy
After: http://screen/DbsdghWiGmf2UdZ

Bug: 1123754
Change-Id: I1a632e281070e38f070153f18fdfad674f126425
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438638Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Gavin Williams <gavinwill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812044}
parent 43ab226f
......@@ -77,7 +77,7 @@
<span class="search-hint searchable" hidden="[[!searchHint_]]">
[[searchHint_]]
</span>
<span class="connection-status">
<span class="connection-status" hidden="[[!statusText_]]">
[[statusText_]]
</span>
<a href="$i18n{gcpCertificateErrorLearnMoreURL}"
......
......@@ -70,7 +70,8 @@ Polymer({
statusText_: {
type: String,
computed:
'computeStatusText_(destination, destination.printerStatusReason)',
'computeStatusText_(destination, destination.printerStatusReason,' +
'configurationStatus_)',
},
// <if expr="chromeos">
......@@ -211,6 +212,11 @@ Polymer({
// <if expr="chromeos">
if (this.printerStatusFlagEnabled_ &&
this.destination.origin === DestinationOrigin.CROS) {
// Don't show status text when destination is configuring.
if (this.configurationStatus_ !== DestinationConfigStatus.IDLE) {
return '';
}
const printerStatusReason = this.destination.printerStatusReason;
if (!printerStatusReason ||
printerStatusReason === PrinterStatusReason.NO_ERROR ||
......
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