Commit f06d950d authored by Nnamdi Theodore Johnson-Kanu's avatar Nnamdi Theodore Johnson-Kanu Committed by Commit Bot

[CrOS cellular] Update Cellular Network setup UI

- Romoved duplicated string
- Updated base page UI

Screenshots:
  - https://imgur.com/OZPqyfj
  - https://imgur.com/OGFU3fI
  - https://imgur.com/jDLcIQu
  - https://imgur.com/Lndkx7C
  - https://screenshot.googleplex.com/ckyhXWunKco7LHP.png

Bug: 1093185
Change-Id: Ied55dbf424f0715ea9a728c6266336e957a29469
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2417312
Commit-Queue: Nnamdi Theodore Johnson-kanu <tjohnsonkanu@google.com>
Reviewed-by: default avatarAzeem Arshad <azeemarshad@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810746}
parent fbf11067
...@@ -315,9 +315,6 @@ ...@@ -315,9 +315,6 @@
<message name="IDS_CELLULAR_SETUP_ESIM_PAGE_SCAN_QR_CODE" desc="Label for informing the user on ways to retrieve an eSim profile"> <message name="IDS_CELLULAR_SETUP_ESIM_PAGE_SCAN_QR_CODE" desc="Label for informing the user on ways to retrieve an eSim profile">
Scan QR code using device camera or enter activation code provided by your carrier Scan QR code using device camera or enter activation code provided by your carrier
</message> </message>
<message name="IDS_CELLULAR_SETUP_BASE_PAGE_TITLE" desc="Title for cellular setup flow dialog in ChromeOS settings">
Set up new network
</message>
<message name="IDS_CELLULAR_SETUP_ESTABLISH_NETWORK_CONNECTION" desc="Message, informing user that a network connection is being established during cellular setup"> <message name="IDS_CELLULAR_SETUP_ESTABLISH_NETWORK_CONNECTION" desc="Message, informing user that a network connection is being established during cellular setup">
Establishing network connection ... Establishing network connection ...
</message> </message>
......
21cdf48ff054f2e8ce89531da8f52cd8c80725cd
\ No newline at end of file
...@@ -21,7 +21,6 @@ constexpr webui::LocalizedString kLocalizedStringsWithoutPlaceholders[] = { ...@@ -21,7 +21,6 @@ constexpr webui::LocalizedString kLocalizedStringsWithoutPlaceholders[] = {
{"activationCode", IDS_CELLULAR_SETUP_ESIM_PAGE_ACTIVATION_CODE}, {"activationCode", IDS_CELLULAR_SETUP_ESIM_PAGE_ACTIVATION_CODE},
{"cancel", IDS_CANCEL}, {"cancel", IDS_CANCEL},
{"back", IDS_CELLULAR_SETUP_BACK_LABEL}, {"back", IDS_CELLULAR_SETUP_BACK_LABEL},
{"basePageTitle", IDS_CELLULAR_SETUP_BASE_PAGE_TITLE},
{"done", IDS_CELLULAR_SETUP_DONE_LABEL}, {"done", IDS_CELLULAR_SETUP_DONE_LABEL},
{"eSimFlowSetup", IDS_CELLULAR_SETUP_CELLULAR_SETUP_PAGE_ESIM_LABEL}, {"eSimFlowSetup", IDS_CELLULAR_SETUP_CELLULAR_SETUP_PAGE_ESIM_LABEL},
{"eSimFlowSetupMessage", {"eSimFlowSetupMessage",
......
...@@ -16,8 +16,15 @@ suite('CrComponentsBasePageTest', function() { ...@@ -16,8 +16,15 @@ suite('CrComponentsBasePageTest', function() {
Polymer.dom.flush(); Polymer.dom.flush();
}); });
test('Base test', function() { test('Title is shown', function() {
basePage.title = 'Base page titile';
Polymer.dom.flush();
const title = basePage.$$('#title'); const title = basePage.$$('#title');
assertTrue(!!title); assertTrue(!!title);
}); });
test('Title is not shown', function() {
const title = basePage.$$('#title');
assertFalse(!!title);
});
}); });
...@@ -8,10 +8,8 @@ ...@@ -8,10 +8,8 @@
<style> <style>
#title { #title {
color: var(--google-grey-900); color: var(--google-grey-900);
font-size: 24px;
font-weight: normal; font-weight: normal;
line-height: 24px; line-height: 24px;
margin: 20px 0;
} }
#message { #message {
...@@ -20,11 +18,13 @@ ...@@ -20,11 +18,13 @@
:host ::slotted([slot='page-body']) { :host ::slotted([slot='page-body']) {
display: block; display: block;
height: 500px; height: 256px;
width: 100%; width: 100%;
} }
</style> </style>
<h1 id="title">[[getTitle_(title)]]</h1> <template is="dom-if" if="[[isTitleShown_(title)]]" restamp>
<h3 id="title">[[getTitle_(title)]]</h3>
</template>
<div id="message">[[message]]</div> <div id="message">[[message]]</div>
<slot name="page-body"></slot> <slot name="page-body"></slot>
</template> </template>
......
...@@ -29,6 +29,14 @@ Polymer({ ...@@ -29,6 +29,14 @@ Polymer({
* @private * @private
*/ */
getTitle_() { getTitle_() {
return this.title || this.i18n('basePageTitle'); return this.title;
},
/**
* @returns {boolean}
* @private
*/
isTitleShown_() {
return !!this.title;
} }
}); });
...@@ -9,12 +9,6 @@ ...@@ -9,12 +9,6 @@
<dom-module id="cellular-setup"> <dom-module id="cellular-setup">
<template> <template>
<style>
:host {
flex: 1 1 auto;
padding: 10px;
}
</style>
<iron-pages <iron-pages
attr-for-selected="id" attr-for-selected="id"
selected="[[currentPageName_]]" selected="[[currentPageName_]]"
......
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
<dom-module id="setup-selection-flow"> <dom-module id="setup-selection-flow">
<template> <template>
<style include="iron-flex"> <style include="iron-flex">
:host {
--cr-card-radio-button-width: 224px
}
#setup-flow-select-radio { #setup-flow-select-radio {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
url(error_2x.png) 2x); url(error_2x.png) 2x);
background-position: center center; background-position: center center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain;
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
......
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