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! ...@@ -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."> <message name="IDS_PRINT_PREVIEW_OFFLINE" desc="Shown when printer is currently offline.">
Currently offline Currently offline
</message> </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. No longer supported.
</message> </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."> <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 @@ ...@@ -80,7 +80,6 @@
} }
#preview-area .learn-more-link { #preview-area .learn-more-link {
-webkit-margin-start: 0.5em;
color: rgb(51, 103, 214); color: rgb(51, 103, 214);
} }
......
...@@ -139,15 +139,23 @@ cr.define('print_preview', function() { ...@@ -139,15 +139,23 @@ cr.define('print_preview', function() {
locationEl.textContent = hint; locationEl.textContent = hint;
locationEl.title = 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 = const connectionStatusEl =
this.getChildElement('.destination-settings-connection-status'); this.getChildElement('.destination-settings-connection-status');
connectionStatusEl.textContent = connectionStatusText; connectionStatusEl.textContent = connectionStatusText;
connectionStatusEl.title = connectionStatusText; connectionStatusEl.title = connectionStatusText;
const hasConnectionError = destination.isOffline || const hasConnectionError =
(destination.hasInvalidCertificate && destination.isOffline || showDestinationInvalid;
!loadTimeData.getBoolean('isEnterpriseManaged'));
destinationSettingsBoxEl.classList.toggle( destinationSettingsBoxEl.classList.toggle(
print_preview.DestinationSettingsClasses_.STALE, print_preview.DestinationSettingsClasses_.STALE,
hasConnectionError); hasConnectionError);
......
...@@ -315,6 +315,8 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) { ...@@ -315,6 +315,8 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) {
source->AddLocalizedString("offlineForWeek", source->AddLocalizedString("offlineForWeek",
IDS_PRINT_PREVIEW_OFFLINE_FOR_WEEK); IDS_PRINT_PREVIEW_OFFLINE_FOR_WEEK);
source->AddLocalizedString("offline", IDS_PRINT_PREVIEW_OFFLINE); source->AddLocalizedString("offline", IDS_PRINT_PREVIEW_OFFLINE);
source->AddLocalizedString("noLongerSupportedFragment",
IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED_FRAGMENT);
source->AddLocalizedString("noLongerSupported", source->AddLocalizedString("noLongerSupported",
IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED); IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED);
source->AddLocalizedString("couldNotPrint", 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