Skip to content

fix : snappy jump of media detail on launch - #6664

Merged
neeldoshii merged 2 commits into
commons-app:mainfrom
rovertrack:jump
Mar 12, 2026
Merged

fix : snappy jump of media detail on launch#6664
neeldoshii merged 2 commits into
commons-app:mainfrom
rovertrack:jump

Conversation

@rovertrack

Copy link
Copy Markdown
Contributor

follow up for #6658

Fixes snappy jump caused when launch of media detail

What changes did you make and why?

made the mediaDetailScrollView visible only after the height of the spacer is adjusted (Mediadetailfragment.kt,fragment_media_detail.xml)

Tested betaDebug
oneplus nord
android 12 api level 31

The snappy jump

az_recorder_20260221_034804.mp4

After fix :

az_recorder_20260221_034818.mp4

@RitikaPahwa4444

Copy link
Copy Markdown
Collaborator

Any idea why a thin vertical line appears on both your branches?

@RitikaPahwa4444

Copy link
Copy Markdown
Collaborator
Screenshot_20260222-174620 Chrome

Paused your screencast at that point.

@rovertrack

Copy link
Copy Markdown
Contributor Author

Any idea why a thin vertical line appears on both your branches?

Right now only in this branch , that branch was having that issue ,but now it's separated !

@rovertrack

rovertrack commented Feb 22, 2026

Copy link
Copy Markdown
Contributor Author
Screenshot_20260222-174620 Chrome Paused your screencast at that point.

It might be because of placeholder of image , before it loads the image , can I investigate and get back to you ?

@RitikaPahwa4444

Copy link
Copy Markdown
Collaborator

can I investigate and get back to you ?

Yes, thanks! 🙂

@rovertrack

Copy link
Copy Markdown
Contributor Author

can I investigate and get back to you ?

Yes, thanks! 🙂

#6658. Has no issue and can be merged right ?

/**
* Gets the height of the frame layout as soon as the view is ready and updates aspect ratio
* of the picture.
* of the picture and sets visibility of scrollview to prevent jumps.

@neeldoshii neeldoshii Feb 22, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I completely understand this is legacy code.

How about we have shimmer till the image and the data is loaded? Once the data is loaded

  1. Make the shimmer visibility to gone.

I feel this is a overhead. We can move this to compose if that solves the problem(but no need to do it if it goes out of scope).

Wdyt?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I won't suggest a compose migration at this point just to solve the snappy jump issue as we usually recommend fixing 5 bugs before picking up enhancements for new contributors.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@neeldoshii Sure , but can we keep it for later
As @RitikaPahwa4444 said after 5 bug fixes
Right now this will be a workaround

@rovertrack

Copy link
Copy Markdown
Contributor Author

@RitikaPahwa4444 changes have been made!!!

@neeldoshii

Copy link
Copy Markdown
Collaborator
XRecorder_20260301_01.mp4

Can you check this @rovertrack ?

Upload big image (probably take a screenshot and upload it) and then try to open it.

android:cacheColorHint="@android:color/transparent"
android:fillViewport="true">
android:fillViewport="true"
android:visibility="invisible"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we have invisible?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

so that the scroll view is only visible after the spacers height has been adjusted and it doesn't become visible prehand and then jump to bottom after the height adjustment of the spacer

@rovertrack

Copy link
Copy Markdown
Contributor Author

XRecorder_20260301_01.mp4
Can you check this @rovertrack ?

Upload big image (probably take a screenshot and upload it) and then try to open it.

that happened because after uploading the image , it has to be requested again (it is not cached at that time) , so the requesting is taking time and the progress bar is set to gone just after the fragment is placed and not after the image has been loaded from the website

@neeldoshii

Copy link
Copy Markdown
Collaborator

XRecorder_20260301_01.mp4
Can you check this @rovertrack ?
Upload big image (probably take a screenshot and upload it) and then try to open it.

that happened because after uploading the image , it has to be requested again (it is not cached at that time) , so the requesting is taking time and the progress bar is set to gone just after the fragment is placed and not after the image has been loaded from the website

Nice catch.. Reproduced again. we can create a new issue for this .

@rovertrack

rovertrack commented Feb 28, 2026

Copy link
Copy Markdown
Contributor Author

@neeldoshii im working on to hide the progress bar only after the image is loaded then we can move ahead with this pr , it will be also helpful when we implement the shimmer effect in the future )

@neeldoshii

Copy link
Copy Markdown
Collaborator

@neeldoshii im working on to hide the progress bar only after the image is loaded then we can move ahead with this pr , it will be also helpful when we implement the shimmer effect in the future )

I think this is going out of the scope of the current issue, I am merging this PR can you create a new issue addressing about this issue & fix? Thanks @rovertrack

@github-actions

Copy link
Copy Markdown

✅ Generated APK variants!

@neeldoshii
neeldoshii merged commit e272cae into commons-app:main Mar 12, 2026
2 checks passed
rovertrack added a commit to rovertrack/apps-android-commons that referenced this pull request Mar 13, 2026
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