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

Statistics view gets infinitely small, then loops over. #293

Closed
shetozz opened this issue Feb 28, 2024 · 10 comments
Closed

Statistics view gets infinitely small, then loops over. #293

shetozz opened this issue Feb 28, 2024 · 10 comments
Assignees
Labels
bug Something isn't working fixed Fixed in develop or master, to be launched.

Comments

@shetozz
Copy link

shetozz commented Feb 28, 2024

Description

On first navigation to statistics, it gets into a loop of getting smaller then starting over again.

To Reproduce

Steps to reproduce the behavior, e.g.:

  1. Launch lute
  2. Go to About>statistics

Screenshots

Screencast.from.2024-02-28.10-01-49.webm

Extra software info, if not already included in the Description:

  • OS: Fedora 39 workstation edition.
  • Browser: Brave 1.63.162 (doesn't happen on Firefox)
  • How you've installed Lute: pip (using the mandarin fork)
  • Version: 3.2.1 (but it's been there for a while)
@jzohrab jzohrab added this to Lute-v3 Feb 28, 2024
@jzohrab jzohrab added the bug Something isn't working label Feb 28, 2024
@jzohrab
Copy link
Collaborator

jzohrab commented Feb 28, 2024

Well that's interesting. Thanks for the issue!

@M-Biggles
Copy link

What a weird one.

Just going to say I don't have this on the same version of Brave on Linux Mint 21.2.

@jzohrab jzohrab added this to Lute-v3 Apr 1, 2024
@cblanken
Copy link
Contributor

I don't know why, but this issue seems to only pop up when the browser level zoom is not 100%.

It also works fine for other levels of zoom like 60% and 80% it will shrink slightly and then stop and not loop.
Similarly, 150%, 160%, and some others won't do the infinite loop but a lot of zoom levels in between those will trigger it.

@jzohrab
Copy link
Collaborator

jzohrab commented Jul 31, 2024

Ah super thanks @cblanken , I wasn't able to reproduce it, this should help investigation.

@cblanken
Copy link
Contributor

cblanken commented Aug 1, 2024

@jzohrab I'd like to take on this issue if you haven't looked into yet. It seems like it shouldn't be too complicated.

@jzohrab
Copy link
Collaborator

jzohrab commented Aug 1, 2024

Absolutely @cblanken if you have cycles, that would be super!! The js library is in lute/static/js, I believe.

@cblanken
Copy link
Contributor

cblanken commented Aug 2, 2024

Evidently it's an unfixed issue in ChartJS. See chartjs/Chart.js#10890

One work around is to set the maintainAspectRatio option to false and then setting the width and height of the canvas container.

Just as a quick fix, I forced the aspect ratio to 3/1 (so three times as wide as it is tall) and it seems to work pretty well. Here are some screenshots at different resolutions.

1920 x 1080

image

2560 x 1440

image

1080 x 1920

image

The width was actually set to 60% before, not sure if there was a reason for that, as I'm pretty sure the right side of the screen isn't used for anything else.

Anyway if that seems good I'll go ahead and send a PR, just let me know.

@jzohrab
Copy link
Collaborator

jzohrab commented Aug 2, 2024

Those look just fine, and if that resolves the issues (how strange!) it looks good to me. Thank you @cblanken !

@jzohrab jzohrab added the fixed Fixed in develop or master, to be launched. label Aug 6, 2024
@jzohrab
Copy link
Collaborator

jzohrab commented Aug 6, 2024

Merged into develop, to be launched.

@jzohrab jzohrab moved this to Done in Lute-v3 Aug 6, 2024
@jzohrab
Copy link
Collaborator

jzohrab commented Aug 16, 2024

Launched in 3.5.1.

@jzohrab jzohrab closed this as completed Aug 16, 2024
@github-project-automation github-project-automation bot moved this to Done in Lute-v3 Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Fixed in develop or master, to be launched.
Projects
Archived in project
Development

No branches or pull requests

4 participants