-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desktop support #309
Desktop support #309
Conversation
src/components/dialog.css
Outdated
@@ -24,12 +24,52 @@ | |||
* The maximum width allowed for the dialog is 480 px. Default width | |||
* is 100% (for container width < 480 px). | |||
*/ | |||
@media (min-width: 480px) { | |||
@media (max-width: 640px), (max-height: 640px) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the description above to reflect the new rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
@@ -24,12 +24,52 @@ | |||
* The maximum width allowed for the dialog is 480 px. Default width | |||
* is 100% (for container width < 480 px). | |||
*/ | |||
@media (min-width: 480px) { | |||
@media (max-width: 640px), (max-height: 640px) { | |||
.swg-dialog, | |||
.swg-toast { | |||
width: 480px !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. What if the viewport is less than 480px wide? If covered by the other media rules, please add a comment here. E.g. this property will be further restricted by X rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/components/dialog.css
Outdated
.swg-dialog, | ||
.swg-toast { | ||
width: 480px !important; | ||
left: -240px !important; | ||
margin-left: calc(100vw - 100vw / 2) !important; | ||
box-sizing: border-box; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd seem the box-sizing should be the same for all variants?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/components/dialog.css
Outdated
left: 0 !important; | ||
right: 0 !important; | ||
margin-left: 0 !important; | ||
box-sizing: border-box; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/components/dialog.css
Outdated
} | ||
|
||
/** | ||
* Desktop/Large screen support. When device with or height is > 640px. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "with" -> "width"
- it's "AND" right? Not "or"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done & Done.
src/ui/ui.css
Outdated
* Since the desktop view has the parent iframe (.swg-dialog) transperant, | ||
* this style adds the background with borders to the loading indicator. | ||
*/ | ||
@media (min-width: 630px) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No min-height
expression here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/ui/ui.css
Outdated
} | ||
} | ||
|
||
.swg-loading-container { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are media rules above the main declaration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/ui/ui.css
Outdated
} | ||
|
||
.swg-loading-container { | ||
position: fixed !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. position:fixed
seems wrong here. And also in the swg-loading
below. I think these all should be position:absolute
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/ui/ui.css
Outdated
|
||
.swg-loading-container { | ||
position: fixed !important; | ||
width: 550px !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of properties appear to be the same as above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/ui/ui.css
Outdated
@media (min-width: 630px) { | ||
.swg-loading-container { | ||
width: 550px !important; | ||
height: 148px !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. What happens in the transition states? E.g. when offers view transits to the pay confirmation? It'd seem like this will be broken with loading container laid out over/under size and double shadow. No?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested this few times, and transition seems working fine.
src/ui/loading-view.js
Outdated
@@ -32,8 +32,13 @@ export class LoadingView { | |||
/** @private @const {!Document} */ | |||
this.doc_ = doc; | |||
|
|||
this.loadingContainer_ = createElement(this.doc_, 'div', { | |||
'class': 'swg-loading-container', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use swg-loading-container
as the tag name per previous change. Also make sure you immediately add swg-loading-container {display: block}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/ui/ui.css
Outdated
@@ -19,18 +19,44 @@ body { | |||
margin: 0; | |||
} | |||
|
|||
.swg-loading-container { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switch to tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/ui/ui.css
Outdated
* this style adds the background with borders to the loading indicator. | ||
*/ | ||
@media (min-width: 630px), (min-height: 630px) { | ||
.swg-loading-container { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/ui/ui.css
Outdated
swg-container, | ||
swg-loading, | ||
swg-loading-animate, | ||
swg-loading-image { | ||
display: block; | ||
} | ||
|
||
swg-loading-container, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Here's it's already tag. Pls ensure this is tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a duplicate. Tests are already in place.
To submit this PR only once associated CL is approved.