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

3335: Use different bounding aspect ratios for landscape #3396

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

Lakoja
Copy link
Collaborator

@Lakoja Lakoja commented Feb 28, 2023

Improves / fixes #3335

val deviceIsHigher = displayMetrics.heightPixels > displayMetrics.widthPixels

val minAspect = if (deviceIsHigher) 0.5 else 1.2
val maxAspect = if (deviceIsHigher) 2.0 else 3.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why specifically these constants for landscape?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to reverse "the idea of 0.5 to 2 for a portrait phone". However the literal 1 to 4 is probably a bit too much.

So these are "best and simple guesses for a wider range of landscape".

Generally one could discuss if this should be relative to the actual aspect ratio value of the device. (After all simply "height > width ?" is somewhat generic)

However I would venture that this is a simple solution.

(1.2 and not 1 because at least phones are nowadays much much higher than wide.)

@nikclayton
Copy link
Contributor

Do you have some before/after screenshots of this?

@Lakoja Lakoja changed the title 3335: Use different bounding aspect ratios for landscape Draft: 3335: Use different bounding aspect ratios for landscape Mar 1, 2023
@Lakoja Lakoja marked this pull request as draft March 1, 2023 10:45
@Lakoja Lakoja force-pushed the 3335-tweak-landscape-cropping branch from 72ac2ef to c24fe04 Compare March 1, 2023 14:50
@Lakoja
Copy link
Collaborator Author

Lakoja commented Mar 6, 2023

So far I was only looking at phone resolution (in landscape). But there I think Tusky is generally unusable, regardless of used image crop aspect ratios (see screenshots in issue).

It looks ok on a tablet because that does not have a full width display.

So I guess this could be closed.

grafik

@digitalcircuit
Copy link

Small counterpoint to @Lakoja 's remark - I actually do use Tusky on my phone in landscape, or, well, used to before the recent aspect ratio update.

There's times it's more convenient to have my phone (Pixel 4 XL) in landscape orientation (e.g. propped up on a charging mount, so I'd need to pick it up and hold it instead), and I'd prefer to have smaller thumbnails for landscape even if it's not as usable as it would be on a tablet.

That said, feel free to do what you wish with this change.

@Lakoja
Copy link
Collaborator Author

Lakoja commented Mar 10, 2023

There's times it's more convenient to have my phone (Pixel 4 XL) in landscape orientation (e.g. propped up on a charging mount, so I'd need to pick it up and hold it instead), and I'd prefer to have smaller thumbnails for landscape even if it's not as usable as it would be on a tablet.

But but but...

Do you have a screenshot for me?
When I do this with my phone (which isn't especially narrow) the usable vertical space is so tiny that I dismissed this usage right away. :-)

@digitalcircuit
Copy link

@Lakoja

Do you have a screenshot for me?

Ack, pardon, I missed the "wanting a screenshot" part.

Here's an example of being able to read a full text post in landscape comfortably with the current stable Tusky release:
Screenshot of Tusky in landscape orientation showing a complete post from @MastodonMigration@mastodon.online, including showing the reply/boost/favorite/bookmark buttons

I don't have the old version of Tusky archived in order to get a screenshot of how images looked.

(In my case, I'm using Android's Gesture Navigation with the navigation hint hidden via LineageOS settings. There's a Magisk mod to do that on stock Android builds, too. Even without that, it only would've partially cropped out the interaction buttons, none of the actual post.)

@connyduck
Copy link
Collaborator

Why is this still draft? Its definitely an improvement, would merge.

@Lakoja Lakoja marked this pull request as ready for review March 18, 2023 12:34
@Lakoja
Copy link
Collaborator Author

Lakoja commented Mar 18, 2023

Why is this still draft? Its definitely an improvement, would merge.

Not quite sure if it is an improvement for landscape tablet resolutions (which have quite ok-ish height).
I noticed for example that many images - at least at that time in my feed - have a 1:1 ratio.
Going with 1.2 as min aspect ratio would have cut all those noticeably (that's why I changed it to 1.0 as minimum).

But I un-drafted it now. Maybe somebody (more than one) would like to test it and if necessary we can fine-tune then.

@Lakoja Lakoja changed the title Draft: 3335: Use different bounding aspect ratios for landscape 3335: Use different bounding aspect ratios for landscape Mar 19, 2023
@Lakoja Lakoja force-pushed the 3335-tweak-landscape-cropping branch from c24fe04 to 32dd3e0 Compare August 9, 2023 15:15
@digitalcircuit
Copy link

To confirm, what kind of testing in landscape mode would be helpful to get this merged?

I have a Pixel 4 XL and some older, rather slow devices (Nexus 6 on Android 8.1, Galaxy Nexus on Android 6.0). To get an APK, I assume I'd just need to follow the usual Tusky development build steps with this PR as the base.

@Lakoja
Copy link
Collaborator Author

Lakoja commented Aug 31, 2023

Tusky development build steps with this PR as the base.

Hi. Thank's for your offer.
You can compile it and install it as a development version from this branch, yes.
If you're somewhat familiar with this, it's ok.

However, I think this might be (discussed internally and) merged, so it can be tested more easily from the nightly version.
I'm not sure however when that might be.

@Lakoja Lakoja force-pushed the 3335-tweak-landscape-cropping branch from 32dd3e0 to 0f9736f Compare October 3, 2023 15:16
@Tak
Copy link
Collaborator

Tak commented Oct 5, 2023

Do we need more testing on this?
Should we just merge it and see what nightly users say?

@Lakoja
Copy link
Collaborator Author

Lakoja commented Oct 5, 2023

Do we need more testing on this? Should we just merge it and see what nightly users say?

Probably not (merge it).

I tested this again and see three classes of devices:

  • The standard case: Normal phones (or also tablets) in portrait mode
  • Normal phones in landscape mode: This is (mostly) discussed and tested here
  • Tablets in landscape mode: Tusky seems to have a width limit for the content and thus the area of the timeline is also more high than wide

So the largest portion of devices including all tablet orientation do not have a problem.

Only the landscape phones would benefit here.
But the current improvement (this PR) targets all landscape devices.

So, if we want to merge this we would first need to specifically only target landscape phones.

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.

problem with image-preview in timeline (new in v21)
5 participants