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

After reloading form page, components are outside of their wrappers #20

Open
jlev opened this issue Sep 17, 2020 · 3 comments
Open

After reloading form page, components are outside of their wrappers #20

jlev opened this issue Sep 17, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@jlev
Copy link
Member

jlev commented Sep 17, 2020

Renders correctly when going through the flow as intended, but appears broken on refresh.

Screen Shot 2020-09-17 at 11 06 23 AM

@jlev jlev added the bug Something isn't working label Sep 17, 2020
@jlev
Copy link
Member Author

jlev commented Sep 17, 2020

Same problem when users land on a link from the email, the Plan component is in the wrong wrapper. Doesn't happen this way when getting the state directly through the form.

Screen Shot 2020-09-17 at 11 14 50 AM

@camdenlee
Copy link
Contributor

I'm not quite sure how to get to the plan page you referenced in the second comment, but I did investigate the form issue.

Interestingly enough, I can't replicate this issue on my local version, but I can replicate it on the live site. Can you check this as well?

I ran a diff of the rendered code on the live site and this is the difference. It looks like the issue is with this line of code:

<GridContainer className="form-container">

Correct layout if you navigate to the page using the button:

<div class="grid-container form-container" data-testid="gridContainer">	

On refresh, the class of form-container is missing:

<div class="grid-container" data-testid="gridContainer">

After further investigation, it looked to potentially be an issue with @trussworks/react-uswds inside this component, but upon further look, there's nothing there that necessarily looks bad either.

A simple fix might be to put <div className="form-container"> inside the <GridContainer> component. Although not sure if that would have negative side effects (either on the app or on the design system).

Let me know what you think

jlev added a commit that referenced this issue Sep 21, 2020
jlev added a commit that referenced this issue Sep 21, 2020
@jlev
Copy link
Member Author

jlev commented Sep 21, 2020

very weird, thanks for looking. maybe something with the gatsby SSR and @trussworks/react-uswds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants