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

Table shows up inconsistently and have to resize window to make it show #344

Closed
flewid opened this issue Jun 6, 2018 · 14 comments
Closed

Comments

@flewid
Copy link

flewid commented Jun 6, 2018

Issue summary

Using the polaris table, on initial page load, the table lines are all out of whack.

Expected behavior

The page should show the table properly on initial load.

Actual behavior

When we load the page, the table is messed up, then, we resize the window and it corrects itself.

Steps to reproduce the problem

  1. Create DataTable
  2. Visit App
  3. See how lines are

here is screenshot before
https://www.dropbox.com/s/fx0jqai6td3qvo8/Screenshot%202018-06-06%2013.02.40.png?dl=0

here is after resizing of window
https://www.dropbox.com/s/qsoqhogbzlfgqjx/Screenshot%202018-06-06%2013.03.04.png?dl=0

  1. The problem is relating to long names in the first row.

Specifications

  • Polaris version: 2.0.0 and 2.1.1
  • React version: 16.4.0
  • Browser: chrome / firefox
  • Device: desktop
  • Operating System: macos /windows
@chloerice
Copy link
Member

chloerice commented Jun 6, 2018

Hi @flewid, thank you for raising this. Is this happening in development? We haven't been able to reproduce, but this problem has been had in the past because in development the styles take longer to inject. The height calculations get deferred in development, but only if your environment is set (NODE_ENV=development).

Can you run a production build and verify whether this occurs in production for you?

@flewid
Copy link
Author

flewid commented Jun 6, 2018 via email

@flewid
Copy link
Author

flewid commented Jun 6, 2018 via email

@chloerice
Copy link
Member

chloerice commented Jun 7, 2018

@flewid Did you run your app in production and test, or just change the environment variable while running the development build? Sorry I wasn't very clear. If your NODE_ENV environment while running in development mode locally is set to "development", the table calculations are deferred to give the styles enough time to inject. If your development build does not set NODE_ENV=development, there is a possibility that there may be broken styles at final render due to the JavaScript running before the CSS is completely loaded.

What I'm wondering is whether or not this issue is happening while you are running your app in development locally (with webpack running react-hot-loader etc), or if this is happening in production (or while running a production build locally).

To view and manually test your app in production if your app is not currently published, yarn build (or whatever your production build script is) then run your production build with yarn start (or whatever your production start script is). Then test whether the data table rows are broken on first render.

@flewid
Copy link
Author

flewid commented Jun 8, 2018 via email

@neatab
Copy link

neatab commented Jun 13, 2018

Hello. I found this while looking into the same issue. I am having the same problem as @flewid and it is occurring in both production and dev. As soon as I resize the window, everything looks good. But when the data table first loads, the height of the cells is incorrect if there is long text in the first column.

@chloerice
Copy link
Member

Thanks for letting us know @neatab. I'll pick up trying to reproduce and keep y'all updated through this issue.

@neatab
Copy link

neatab commented Jun 14, 2018

Thanks @chloerice. Please let me know if I can provide any more information or if you want me to try anything.

@neatab
Copy link

neatab commented Jul 5, 2018

Hi @dleroux and @chloerice. It looks like this issue was closed but the issue is still occurring. Were you not able to reproduce the issue? Is there anything I can do to help resolve this issue?

@dleroux
Copy link
Contributor

dleroux commented Jul 5, 2018

@neatab, sorry the issue was fixed internally but has not been released yet. Should be released some time next week.

@chloerice
Copy link
Member

chloerice commented Jul 5, 2018

@neatab The fix shipped today with v2.3.1 😃

@neatab
Copy link

neatab commented Jul 5, 2018

Thank you! I'll update right now and post back here to verify everything is working.

@neatab
Copy link

neatab commented Jul 5, 2018

Looks perfect. Thanks for your help @chloerice and @dleroux 😄

@dleroux
Copy link
Contributor

dleroux commented Jul 5, 2018

Awesome. Glad it worked out for you.

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

No branches or pull requests

4 participants