Skip to content
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

Merged
merged 11 commits into from
Apr 9, 2018
Merged

Desktop support #309

merged 11 commits into from
Apr 9, 2018

Conversation

dparikh
Copy link
Contributor

@dparikh dparikh commented Mar 20, 2018

To submit this PR only once associated CL is approved.

@dparikh dparikh requested a review from dvoytenko March 20, 2018 17:44
@@ -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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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;
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

.swg-dialog,
.swg-toast {
width: 480px !important;
left: -240px !important;
margin-left: calc(100vw - 100vw / 2) !important;
box-sizing: border-box;
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

left: 0 !important;
right: 0 !important;
margin-left: 0 !important;
box-sizing: border-box;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}

/**
* Desktop/Large screen support. When device with or height is > 640px.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. "with" -> "width"
  2. it's "AND" right? Not "or"?

Copy link
Contributor Author

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) {
Copy link
Contributor

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?

Copy link
Contributor Author

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 {
Copy link
Contributor

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?

Copy link
Contributor Author

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;
Copy link
Contributor

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.

Copy link
Contributor Author

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;
Copy link
Contributor

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?

Copy link
Contributor Author

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;
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@@ -32,8 +32,13 @@ export class LoadingView {
/** @private @const {!Document} */
this.doc_ = doc;

this.loadingContainer_ = createElement(this.doc_, 'div', {
'class': 'swg-loading-container',
Copy link
Contributor

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}.

Copy link
Contributor Author

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch to tag

Copy link
Contributor Author

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

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,
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@dparikh dparikh merged commit afde55e into subscriptions-project:master Apr 9, 2018
@dparikh dparikh deleted the desktop-1 branch April 9, 2018 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants