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

SFD-98: Chart scaling on zoom bugfix #85

Merged
merged 16 commits into from
Jun 26, 2024

Conversation

jantoun-scottlogic
Copy link
Contributor

@jantoun-scottlogic jantoun-scottlogic commented Jun 18, 2024

SFD-98 Jira ticket

Scales the chart size with the browser zoom factor to fix a bug where the chart would become squashed when the browser zoom was increased.

Before fix:
before-fix-500-percent-zoom

After fix:
after-fix-500-percent-zoom

@jantoun-scottlogic jantoun-scottlogic changed the title Sf 98 chart scaling on zoom bugfix SFD-98: Chart scaling on zoom bugfix Jun 18, 2024
@jantoun-scottlogic jantoun-scottlogic force-pushed the SFD-98-chart-scaling-on-zoom-bugfix branch 2 times, most recently from 16a8ddb to dff1f1d Compare June 18, 2024 16:08
@jantoun-scottlogic jantoun-scottlogic marked this pull request as ready for review June 19, 2024 08:11
@jantoun-scottlogic jantoun-scottlogic force-pushed the SFD-98-chart-scaling-on-zoom-bugfix branch from ac51225 to 0b8b9b9 Compare June 19, 2024 08:21
@mgriffin-scottlogic
Copy link
Collaborator

Just from a quick test of this myself, I'm still seeing an issue when it hits 400% zoom - I don't know if it's specific to my monitor resolution and scaling? (1920 x 1080 at 100%)

Haven't reviewed the code but I wonder if it could be falling prey to the opposite max height check if that's not also scaled with the zoom factor. There's a definite snap back to a small size as you get to 400:

300%

image

400%

image

@mgriffin-scottlogic
Copy link
Collaborator

And strangely it seems fine if I scroll to 500% very quickly, I assume the debounce means the 400% state is missed. But if I roll back and forth at that point then 500% will be broken too.

@jantoun-scottlogic
Copy link
Contributor Author

jantoun-scottlogic commented Jun 19, 2024

Just from a quick test of this myself, I'm still seeing an issue when it hits 400% zoom - I don't know if it's specific to my monitor resolution and scaling? (1920 x 1080 at 100%)

Haven't reviewed the code but I wonder if it could be falling prey to the opposite max height check if that's not also scaled with the zoom factor. There's a definite snap back to a small size as you get to 400:

300%

image

400%

image

Ok thanks, I'll take a look. I was getting different degrees of 'squashedness' with the same zoom factor when trying to reproduce the bug so there's definitely something going on that I haven't pinned down. The scaling with zoom is applied after the screen height cap so hopefully that shouldn't be interfering.

@jantoun-scottlogic
Copy link
Contributor Author

jantoun-scottlogic commented Jun 19, 2024

It looks like it's not scaling the chart if the screen is already zoomed when calculate is pressed either. It's not completely squashed for me but it's not as tall as it should be.

@jantoun-scottlogic jantoun-scottlogic force-pushed the SFD-98-chart-scaling-on-zoom-bugfix branch from 76ec8b0 to a93c77e Compare June 20, 2024 14:03
@jantoun-scottlogic jantoun-scottlogic force-pushed the SFD-98-chart-scaling-on-zoom-bugfix branch 2 times, most recently from 99b3985 to f7e41db Compare June 20, 2024 14:20
@jantoun-scottlogic jantoun-scottlogic force-pushed the SFD-98-chart-scaling-on-zoom-bugfix branch from f7e41db to 58b30d1 Compare June 20, 2024 14:29
@jantoun-scottlogic jantoun-scottlogic force-pushed the SFD-98-chart-scaling-on-zoom-bugfix branch from bf9da17 to 86b4f39 Compare June 21, 2024 11:03
@sdun-scottlogic sdun-scottlogic merged commit 51a96ef into main Jun 26, 2024
2 checks passed
@sdun-scottlogic
Copy link
Contributor

Tested & Approved.
*** Note** - Playwright device emulator and browser Dev Tools to recreate multiple device behaviour - used as a best endeavours alternative for testing. May not fully or accurately replicate each device but is accepted as a reasonable alternative for these test cases.

@mgriffin-scottlogic mgriffin-scottlogic deleted the SFD-98-chart-scaling-on-zoom-bugfix branch August 21, 2024 13:01
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.

3 participants