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

Wrong width calculation #396

Closed
MassimoScattarella opened this issue Apr 27, 2017 · 15 comments · Fixed by #408
Closed

Wrong width calculation #396

MassimoScattarella opened this issue Apr 27, 2017 · 15 comments · Fixed by #408

Comments

@MassimoScattarella
Copy link

MassimoScattarella commented Apr 27, 2017

Problem: Table is larger than container
Description: I use paginated table and scrollable container is more larger, columns are wide
Resolve my problem with downgrade ember-scrollable at 0.4.4
Correct or are there any other problems?

Edit: the problem is on ember-srollable 0.4.5

@alexander-alvarez
Copy link
Collaborator

@buschtoens any insights into this?
looking at alphasights/ember-scrollable@0.4.4...0.4.5 I think that's the only relevant change

@buschtoens
Copy link
Collaborator

buschtoens commented Apr 28, 2017 via email

@joshbuckley
Copy link

Also came across this issue in mac chrome (but not firefox) when "always show scrollbars" is enabled in system settings. The width returned by the scrollbar-thickness service was 15px and that threw off the width of the table body. In this case the width calculation isn't needed because the scrollbars are rendered on top of the table. Turning off "always show scrollbars" also resolved the issue.

@marceloandrader
Copy link

In one of our projects, we are also seeing this, with latest v 1.8.6 that installs scrollable 0.4.5 we see discrepancies between the widths of the header cells with the row cells. When I cloned ember-scrollable locally and linked in the project as 0.4.4 the problem goes away.

@MassimoScattarella
Copy link
Author

Exactly, the problem si scrollable 0.4.5

@buschtoens
Copy link
Collaborator

Could y'all please post screenshots indicating the problem alongside some info on which browser and OS you're using? :)

I suspect that this problem only occurs on OS X.

@marceloandrader
Copy link

This screenshot is on Chrome 58.0.3029 on Linux with ember-scrollable v 0.4.4

screenshot from 2017-05-08 10-18-42

This uses the same environment but with ember-scrollable v 0.4.5

screenshot from 2017-05-08 10-20-44

The table headers are not aligned with the row cells.

@MassimoScattarella
Copy link
Author

same problem on Windows

@buschtoens
Copy link
Collaborator

Thanks @marceloandrader!

image

Yes indeed, it's an upstream bug in ember-scrollable. And I'm the one to blame. 😅

Tracking it here: alphasights/ember-scrollable#76

@buschtoens
Copy link
Collaborator

So sorry for the long hold up, folks. I had a lot of things on my to do list. 🙈

I finally got around to fix this bug. It was caused by remnant ::scrollbar pseudo selectors that set the width of the scollbar to 0 in Chrome, but only inside of the emulator <div>.

I submitted a PR (alphasights/ember-scrollable#78) and as soon as it's merged, this is fixed. 🙌

@buschtoens
Copy link
Collaborator

[email protected] was just released, fixing this! 😃

RustyToms added a commit to RustyToms/ember-light-table that referenced this issue May 18, 2017
@RustyToms
Copy link
Contributor

I was the only one on my team that ended up getting ember-scrollable 0.4.5, they all had 0.4.4 (which satisfies the package.json version requirements). They all thought I was crazy when I kept seeing this issue and nobody else did 😆 I started to think I was crazy too

@buschtoens
Copy link
Collaborator

Haha. I'm very sorry for making you question your sanity. 😅

Perfect time to recommend yarn. It's an npm client that assures everybody on the team and every build gets exactly the same versions of packages. It's also quite a bit faster than npm and resilient to network outages.

ember-cli is already natively supporting it as well.

@RustyToms
Copy link
Contributor

RustyToms commented May 18, 2017

Actually we are all using yarn, and keep our yarn versions updated. We have not always experienced that, especially not in this case. But this repo does not have a lockfile. We have a yarn.lock in our build, and it resolved ember-scrollable to 0.4.5, I have no idea why I was the only one who experienced the problem. yarn is still rather buggy?

@offirgolan
Copy link
Collaborator

@RustyToms you should be able to resolve your yarn issue with a simple yarn upgrade ember-light-table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants