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

Mitigate unreadable schedules (difficult to find a good zoom / pinch) #370

Closed
valerio-bozzolan opened this issue Aug 18, 2024 · 4 comments
Closed

Comments

@valerio-bozzolan
Copy link

Premise: I love the Giggity app. Thanks for your work 🌈


A frequent negative feedback I receive after promoting Giggity, is that it's relatively easy to shoot in your foot and cause an unreadable layout during normal user interaction in the BlockSchedule activity.

For example, it's relatively super-easy to cause this broken layout where the cell width is so low that not even a single word stays in a single line. You cannot even read the times in the headers. Moreover, if cell widths become smaller, texts GROWS :D this may not help in general readability:

Giggity layout with very small cell height
https://wikimania.eventyay.com/2024/

Workaround

The user can just use their powerful fingers to find a better zoom with the usual pinch gesture.

Anyway, it's not so obvious: the preview you see during zoom-pinch reflects the future size but it does not really reflect the future font-size, so it's a kind of "try catch" approach, to continue to try different pinches to obtain a readable layout.

Moreover, the user can open their app preferences and set the "small" font size preference.

Actionable Things

Probably we can mitigate the situation by "just" increasing our width/height minimum thresholds.

I think we already have something in place in onResizeEvent():

HourWidth = Math.max(60, Math.min(HourWidth, 1000));

So probably we could increase that 60 to something bigger:

HourWidth = Math.max(60, ...); 

For example, increasing that 60 to a greater/better value.

That feature was introduced in 2013 (12+ years ago) and probably never touched again (1080194).

Additionally, we should prevent the default font size from being in proportion of the "cell density" but it should probably (also?) consider the "cell width". The relevant code seems here:

fontSize = (int) (TentHeight / 3.6 / getResources().getDisplayMetrics().density);

Also the above feature was introduced 8+ years ago and never touched again (f852dc5).

Thanks for any feedback or any patch :) Long life to Giggity.

@Wilm0r
Copy link
Owner

Wilm0r commented Dec 14, 2024

Wow very nicely written bug report, my apologies for such a late response. :(

Indeed I can easily reproduce this and as is typical, I the author know how to fix it and just pinch myself back to safety. But you're right, there should just be restrictions on what width/height ratio it allows.

For sure that code is VERY old indeed, not my favourite part of the code base to work on... (At times I've considered rewriting it without AbsoluteLayout because you're not supposed to use it, but then hey it works fine, bugs like this one aside?)

@valerio-bozzolan
Copy link
Author

Yeah "don't rewrite just patch 🎵 " 👍

Wilm0r added a commit that referenced this issue Dec 15, 2024
@Wilm0r
Copy link
Owner

Wilm0r commented Dec 15, 2024

95f6bb2 should help I hope. Pretty modest change and one can certainly still produce weird results, but I think it'll definitely take more intent than accident now. :)

@Wilm0r Wilm0r closed this as completed Dec 15, 2024
@valerio-bozzolan
Copy link
Author

I will test this at next FOSDEM from F-Droid 😄 thanks again, seems promising

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

No branches or pull requests

2 participants