android icon indicating copy to clipboard operation
android copied to clipboard

fix: recalculate grid span count after rotation

Open himu-gupta opened this issue 5 months ago โ€ข 8 comments

Summary

  • Recalculate the file-list grid span count after configuration changes.
  • Keep the fragment's selected view type in sync when toggling between list and grid.
  • Invalidate staggered-grid span assignments and request a relayout after the mode/orientation update.
  • Add an unreleased changelog entry.

Fixes https://github.com/owncloud/android/issues/4884

Verification

  • JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" ANDROID_HOME="/Users/himu/Library/Android/sdk" ./gradlew --no-daemon --console=plain :owncloudApp:compileOriginalDebugKotlin
  • git diff --check

himu-gupta avatar Jun 18 '26 09:06 himu-gupta

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 18 '26 09:06 CLAassistant

Hi @himu-gupta! Thanks for opening this PR! ๐Ÿ™Œ๐Ÿป

Some improvements here before the CR:

  1. Do not to forget to use Conventional commits for the message
  2. Commits must be GPG/PGP signed, and it'd be great if each commit include a Signed-off-by line
  3. I'd separate the calens into a different commit with the message: chore: add calens file

Let us know if you have any doubts and we will help you! I will start with the code review when all changes are done ๐Ÿป

joragua avatar Jun 18 '26 10:06 joragua

Hi @himu-gupta! Thanks for opening this PR! ๐Ÿ™Œ๐Ÿป

Some improvements here before the CR:

  1. Do not to forget to use Conventional commits for the message
  2. Commits must be GPG/PGP signed, and it'd be great if each commit include a Signed-off-by line
  3. I'd separate the calens into a different commit with the message: chore: add calens file

Let us know if you have any doubts and we will help you! I will start with the code review when all changes are done ๐Ÿป

Thanks @joragua, I have done the requested changes.

himu-gupta avatar Jun 19 '26 10:06 himu-gupta

Thanks for your contribution @himu-gupta!! Let me tell you how the process is. Basically, there are two phases after the PR is correct (signed commits, separated changelog, conventional commits correct...):

  1. Code review: team will review the code you pushed and make suggestions for improvement. Usually, @joragua takes care of it.

  2. QA: Once code review is approved, the feature/fix will be tested to detect defects or unexpected behaviors. I will take care of that.

For sure, all CI checks must be green as well, otherwise merging will be blocked.

Code review will start soon, keep tuned!!

jesmrec avatar Jun 19 '26 10:06 jesmrec

Thanks for your contribution @himu-gupta!! Let me tell you how the process is. Basically, there are two phases after the PR is correct (signed commits, separated changelog, conventional commits correct...):

  1. Code review: team will review the code you pushed and make suggestions for improvement. Usually, @joragua takes care of it.
  2. QA: Once code review is approved, the feature/fix will be tested to detect defects or unexpected behaviors. I will take care of that.

For sure, all CI checks must be green as well, otherwise merging will be blocked.

Code review will start soon, keep tuned!!

Thanks for the insight

himu-gupta avatar Jun 19 '26 22:06 himu-gupta

@joragua is anything pending from my end?

himu-gupta avatar Jun 22 '26 18:06 himu-gupta

I'll take care of it as soon as possible and I'll ping you once the CR is ready! Stay tuned! ๐Ÿ™Œ๐Ÿป @himu-gupta

joragua avatar Jun 23 '26 07:06 joragua

Thanks @joragua, addressed the CR in two new commits on top without force-pushing:

  • afe11e5aa8315f71e2fc0a2ad83fa4cedadfc42b updates the calens file name/content to match the template and adds the PR link.
  • 8f8534b18e8b037aa91e664d5adf6d52c539df71 removes the extra initialization guards and the explicit invalidateSpanAssignments() / requestLayout() calls, relying on notifyItemRangeChanged() for the refresh.

himu-gupta avatar Jun 24 '26 15:06 himu-gupta

ey @himu-gupta how are you? don't hesitate to ping us if you need nothing. The current PR is almost ready (just a couple of tiny comments that @joragua suggested) to move to QA. Let us know! same for the other PR you opened.

jesmrec avatar Jul 07 '26 15:07 jesmrec

  • Security: no findings
  • Stability: no findings
  • Performance: 1 finding โ€” see review
  • Test coverage: 0% on touched lines, below 85% โ€” test proposed in review
  • TODOs found: none
  • Dependency touched: no
  • CI status: all green
  • Stale review: no

๐Ÿค– Automated review by Claude Code (security ยท stability ยท performance ยท coverage)


Generated by Claude Code

dj4oC avatar Jul 08 '26 04:07 dj4oC