Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Apply responsiveness to RWP (nav, signin, privacy, survey) #280

Merged
merged 12 commits into from
Apr 7, 2022

Conversation

Carla-Moz
Copy link
Contributor

@Carla-Moz Carla-Moz commented Mar 24, 2022

Closes #243
In this PR, the signin cards, navbar, onboarding pages for privacy/terms and the demographic survey are made responsive with css-grid and flexbox. I've also removed the pop-up for google to have users continue with google within the same page.

Next steps are having design review the components for the screen sizes which will likely lead to another responsive PR. I didn't want to overwhelm with one huge massive styles PR.

Also looks like my new responsive styles broke one of the ux tests so will also investigate.

Updated storybook: RWP Storybook

@Carla-Moz Carla-Moz self-assigned this Mar 24, 2022
@rhelmer
Copy link
Contributor

rhelmer commented Mar 27, 2022

Also looks like my new responsive styles broke one of the ux tests so will also investigate.

I think the test failure is just the switch from signInWithPoup to signInWithRedirect (which looks great btw!), this whole part here is waiting for the pop-up to open, switching to that window, interacting, and switching back, which could be simplified now:

// Google sign-in prompt should open
await driver.wait(async () => {
return (await driver.getAllWindowHandles()).length === 2;
}, WAIT_FOR_PROPERTY);
await driver.switchTo().window((await driver.getAllWindowHandles())[1]);
await driver.wait(
until.titleIs("Auth Emulator IDP Login Widget"),
WAIT_FOR_PROPERTY
);
// FIXME this emulator auth pop-up isn't ready on the default "loaded" event, the window will close anyway so retry until it responds.
await driver.executeScript(
`window.setInterval(() => document.querySelector(".mdc-button").click(), 1000)`
);
await findAndAct(driver, By.id("autogen-button"), (e) => e.click());
await findAndAct(driver, By.id("sign-in"), (e) => e.click());
// Google sign-in prompt should close.
await driver.wait(async () => {
return (await driver.getAllWindowHandles()).length === 1;
}, WAIT_FOR_PROPERTY);
// Switch back to original window.
await driver.switchTo().window((await driver.getAllWindowHandles())[0]);

Copy link
Contributor

@rhelmer rhelmer left a comment

Choose a reason for hiding this comment

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

This looks much better on a smaller screen, but completing all the various tasks (join/leave, account settings etc) is pretty cramped on a smaller screen (iPhone 12 Pro dimensions used here via Chrome devtools):

image

image

image

image

image

image

image

Copy link
Contributor

@rhelmer rhelmer left a comment

Choose a reason for hiding this comment

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

I find the way the menu behavior changes when going across the CSS breakpoint from the hamburger menu button to the user icon a little jarring, the only thing I've found that is really a bug per se is that there's no way to dismiss the menu if you:

  1. click the hamburger menu while the window is smaller image then leaving the menu open, and
  2. expand the browser window horizontally so the control changes from the "X" to the user icon. I can't figure out how to dismiss the menu now, unless I resize the window to be smaller again:

image

Copy link
Contributor

@rhelmer rhelmer left a comment

Choose a reason for hiding this comment

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

I think this isn't necessarily new (the pop-up have this same behavior but it's more noticeable with the redirect) - after completing login with the Google sign-in redirect, the sign-in page is shown again briefly, before the redirect to the studies page happens.

This is relatively minor, but I bet there's a way to deal with this in the UI using the SDK, maybe by disabling the login fields and making it look inactive etc. until the signInWithRedirect either resolves or rejects.

I think users on slower connections are more likely to see this, and may try to interact with the sign-in page while the auth provider response is still pending.

@Carla-Moz
Copy link
Contributor Author

Carla-Moz commented Mar 28, 2022

Hi Rob, yes the studies page, authenticated profile pages and privacy pages haven't be worked on yet. Only the nav, sign-in, onboarding privacy and terms pages. I will fix the bugs on the nav along with the redirect login issue. Thank you!

Copy link

@tangcasey tangcasey left a comment

Choose a reason for hiding this comment

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

Approved for merge

@Carla-Moz Carla-Moz merged commit f05f233 into master Apr 7, 2022
@Carla-Moz Carla-Moz deleted the define-grid-system branch April 12, 2022 14:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply responsiveness to RWP (nav, signin, privacy, survey)
3 participants