Commit e75a29a7 authored by rbpotter's avatar rbpotter Committed by Commit Bot

Print Preview: GCP Warning UI Review Changes

- Reduce spacing between unsupported message and "Learn More" link in
  preview area.
- Add new "No longer supported" fragment string and use in place of the
  "No longer supported." string for the destination settings (but not
  the destination change dialog).

Bug: 792093
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ida7d0a02df3fed50a3d050f919a556711a9bacec
Reviewed-on: https://chromium-review.googlesource.com/945308Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540748}
parent 4dacae98
......@@ -6104,7 +6104,10 @@ I don't think this site should be blocked!
<message name="IDS_PRINT_PREVIEW_OFFLINE" desc="Shown when printer is currently offline.">
Currently offline
</message>
<message name="IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED" desc="Shown when printer is no longer supported.">
<message name="IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED_FRAGMENT" desc="Shown in destination settings when printer is no longer supported.">
No longer supported
</message>
<message name="IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED" desc="Shown in destinations dialog when printer is no longer supported.">
No longer supported.
</message>
<message name="IDS_PRINT_PREVIEW_EXTENSION_DESTINATION_ICON_TOOLTIP" desc="Tooltip for the icon shown in print destination list next to print destination provided by an extension.">
......
......@@ -80,7 +80,6 @@
}
#preview-area .learn-more-link {
-webkit-margin-start: 0.5em;
color: rgb(51, 103, 214);
}
......
......@@ -139,15 +139,23 @@ cr.define('print_preview', function() {
locationEl.textContent = hint;
locationEl.title = hint;
const connectionStatusText = destination.connectionStatusText;
const showDestinationInvalid =
(destination.hasInvalidCertificate &&
!loadTimeData.getBoolean('isEnterpriseManaged'));
let connectionStatusText = '';
if (showDestinationInvalid) {
connectionStatusText =
loadTimeData.getString('noLongerSupportedFragment');
} else {
connectionStatusText = destination.connectionStatusText;
}
const connectionStatusEl =
this.getChildElement('.destination-settings-connection-status');
connectionStatusEl.textContent = connectionStatusText;
connectionStatusEl.title = connectionStatusText;
const hasConnectionError = destination.isOffline ||
(destination.hasInvalidCertificate &&
!loadTimeData.getBoolean('isEnterpriseManaged'));
const hasConnectionError =
destination.isOffline || showDestinationInvalid;
destinationSettingsBoxEl.classList.toggle(
print_preview.DestinationSettingsClasses_.STALE,
hasConnectionError);
......
......@@ -315,6 +315,8 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) {
source->AddLocalizedString("offlineForWeek",
IDS_PRINT_PREVIEW_OFFLINE_FOR_WEEK);
source->AddLocalizedString("offline", IDS_PRINT_PREVIEW_OFFLINE);
source->AddLocalizedString("noLongerSupportedFragment",
IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED_FRAGMENT);
source->AddLocalizedString("noLongerSupported",
IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED);
source->AddLocalizedString("couldNotPrint",
......
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