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

Expand when only one graph is selected #1988

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

s7tya
Copy link
Contributor

@s7tya s7tya commented Oct 8, 2024

closes #1938

Though it's bit tricky that I'm using some elements' width and height to calculate graphs size, it might be somewhat useful.

CleanShot 2024-10-09 at 01 01 21

@s7tya s7tya force-pushed the expand-if-only-one-graph-selected branch 2 times, most recently from 92bc848 to e3f05d5 Compare October 8, 2024 16:13
@Kobzol
Copy link
Contributor

Kobzol commented Oct 9, 2024

Thank you! I tried to make the calculations a bit simpler, and tested it with 1/4 columns on desktop/mobile. Let me know what you think!

@s7tya
Copy link
Contributor Author

s7tya commented Oct 9, 2024

Thanks! I think it looks great on mobile screens, but on larger screens, isn't the height getting fixed at 300px?

CleanShot 2024-10-10 at 08 09 24@2x

@Kobzol
Copy link
Contributor

Kobzol commented Oct 10, 2024

It should not be (const height = countGraphs === 1 ? window.innerHeight - top - 100 : 300;). Did you reload the page after going out of the mobile view? It needs to be refreshed.

It looks like this on my side:
image

@s7tya s7tya force-pushed the expand-if-only-one-graph-selected branch 2 times, most recently from 1feb2a1 to 2080288 Compare October 11, 2024 00:51
@s7tya
Copy link
Contributor Author

s7tya commented Oct 11, 2024

Hmm that's weird. I tried on FireFox, Chrome / macOS and removed cache and hard reloaded but it's still not expanded

@s7tya s7tya force-pushed the expand-if-only-one-graph-selected branch from 2080288 to 56613af Compare October 11, 2024 00:54
@Kobzol
Copy link
Contributor

Kobzol commented Oct 11, 2024

Maybe innerHeight behaves different on your browser/OS? 🤔 Also, do you have the devtools closed? If they are opened, the inner height is much smaller if the devtools are docked at the bottom.

@s7tya
Copy link
Contributor Author

s7tya commented Oct 11, 2024

Suddenly, it's fixed, but I have no idea why. Anyway, if it works well on your end, let's merge it and see how it goes. I might have failed to clear my cache or something like that.

@Kobzol Kobzol merged commit 025f64b into rust-lang:master Oct 11, 2024
11 checks passed
@s7tya s7tya deleted the expand-if-only-one-graph-selected branch October 11, 2024 11:59
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

Successfully merging this pull request may close these issues.

Improve rendering of history graphs
2 participants