-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Fix counter visualization not working on Safari #5236
base: master
Are you sure you want to change the base?
Conversation
@daniellangnet Which Safari version do you use? 'cause that's what I see in Safari on our Upd.: same for the issue with dashboard container height: it's totally okay in my Safari. I'm using 14.0 |
@kravets-levko I'm on Safari 14. It was okay in the query editor, but not when added to a dashboard (see screenshot) |
Got it. Seems both here and for dashboard root there's the same issue: for some reason, if there's a container with Upd.: |
Agreed. Although I'm not positive that a child with Update: Oh Apple... the new IE. |
@daniellangnet Add redash/client/app/components/dashboards/dashboard-grid.less Lines 89 to 92 in 6f9e79c
|
a27e790
to
4971d3e
Compare
@kravets-levko I just added |
@@ -89,6 +89,7 @@ | |||
> .visualization-renderer-wrapper { | |||
flex-grow: 1; | |||
position: relative; | |||
height: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try just this fix - for me it worked without others (also, I tried in Chrome a minute ago - it was fine too). If it works - let's not touch other styles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only works in connection with this other change for me: https://github.com/getredash/redash/pull/5236/files#diff-4e9dd1634afb5937186e1247809856826568d835e2167e33be776e08ae6ffc94L6
Everything else we could get rid of though
I'm also not sure why it works. I found a mention of this fix on some forum, and somebody said that that's some bug in Safari - in some cases it fail to compute real element's height when it's offset parent has an auto height set in either way. Setting it explicitly to some value fixes the issue, and in combination with flexbox will result in a proper layout. I just tried it, and looks it really works, so... P.S. I think, nobody really understands how CSS works 🙂 We all just use it like a magic |
@kravets-levko haha, now I know what you mean! I tried it but that change alone doesn't fix it for me. The |
🤦♂️ P.S. I never liked any browser-specific bugs and workarounds for them. I'll check "my" solution once more tomorrow, I hope it's possible to make it work in all browsers (and have some logical explanation). |
Sounds good. Thank you @kravets-levko. FWIW, I think my original solution without the From what I understand, the issue was this:
I reverted my commit back to what it originally was, because I totally agree with you on your dislike for browser-specific workarounds in CSS 😃 🙌 |
ae5a624
to
cf255ba
Compare
me too. the counter visualization can not shown in my safari, which version is 14.0.1. |
@daniellangnet , thanks for the PR! We've updated a lot of things now that we're Community-driven so - if you're still interested in getting this merged - would you mind rebasing off master to re-run the CI, as well as updating merge conflicts? We're trying to clean up our PR todo list, so if you're not interested, that's fine - we'll close the PR in about a week if we don't hear back. If you're interested in reopening the PR afterwards, we would also very much welcome that. |
The merge conflict for this PR has been solved. Does anyone know if the problem it fixes is still occurring with our current Redash builds and modern Safari though? I'd prefer not to merge this if the problem no longer exists. 😄 |
Codecov Report
@@ Coverage Diff @@
## master #5236 +/- ##
=======================================
Coverage 60.70% 60.70%
=======================================
Files 154 154
Lines 12624 12624
Branches 1716 1716
=======================================
Hits 7663 7663
Misses 4735 4735
Partials 226 226 |
What type of PR is this? (check all applicable)
Description
In the current
master
branch, the counter visualization doesn't work in Safari at all (both desktop and mobile) and stays completely empty. This is because of a change that was introduced in this PR.This fixes the issue (while still keeping the max width/height for the query screen of the above PR working).
Mobile & Desktop Screenshots/Recordings (if there are UI changes)