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

Bugfix/update folder icons #12003

Merged
merged 65 commits into from
Oct 11, 2023
Merged

Bugfix/update folder icons #12003

merged 65 commits into from
Oct 11, 2023

Conversation

alperozturk96
Copy link
Collaborator

Instead of showing the icons of the file directly, the needed material icons were overlayed above the folder icon. Because we don't have single folder icon for each state of file. Web application also using overlaying mechanism plus we have more flexibility to apply any icon to folder icon.

  • [Done] Tests written

@tobiasKaminsky tobiasKaminsky linked an issue Oct 4, 2023 that may be closed by this pull request
@tobiasKaminsky
Copy link
Member

tobiasKaminsky commented Oct 4, 2023

@alperozturk96 this looks off on our UI screenshot tests:
https://www.kaminsky.me/nc-dev/android-integrationTests/12003-Screenshot-blue-Light-11-02/

you can create the same emulator via:
avdmanager create avd -n uiComparison -c 100M -k "system-images;android-27;google_apis;x86" --abi "google_apis/x86"

and run it via:
emulator -avd uiComparison -no-snapshot -gpu swiftshader_indirect -no-window -no-audio -skin 500x833

Copy link
Member

@AndyScherzinger AndyScherzinger left a comment

Choose a reason for hiding this comment

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

overlays will need to work in dark/light

@alperozturk96
Copy link
Collaborator Author

alperozturk96 commented Oct 4, 2023

overlays will need to work in dark/light

If dark mode activated overlay must be dark or vice versa its need to be white. I just noticed that from web app, thanks.

@alperozturk96 alperozturk96 marked this pull request as draft October 4, 2023 14:23
@alperozturk96 alperozturk96 marked this pull request as ready for review October 5, 2023 09:46
@tobiasKaminsky
Copy link
Member

  • Check spotlessKotlinCheck fails, but you can run:
    ./gradlew :app:spotlessApply
    to have this automatically fixed.
  • Codacy fails too, which you can see when you click on details.
  • DCO is required, so please sign all your git commits:
    In your local branch, run: git rebase HEAD~52 --signoff
    Force push your changes to overwrite the branch: git push --force-with-lease origin bugfix/Update-folder-icons

Why analysis fails, I will check.

@alperozturk96 alperozturk96 force-pushed the bugfix/Update-folder-icons branch 3 times, most recently from ba8895b to 720c2a3 Compare October 6, 2023 08:12
Alper Ozturk added 18 commits October 6, 2023 10:48
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Alper Ozturk and others added 10 commits October 6, 2023 10:48
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: Alper Ozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
@@ -49,6 +49,7 @@ class FileDisplayActivityScreenshotIT : AbstractIT() {
Manifest.permission.WRITE_EXTERNAL_STORAGE
)

// FIXME test fails
Copy link
Member

Choose a reason for hiding this comment

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

Are those really failing?
In latest run I only saw location and activity error.
If they are not failing, please remove those comments.

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 ran those marked test still fails in my local machine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The reason why the tests fails is that CI/CD runs on Android 8. My local device is Android 14 so the tests are failing. For example the expected file path is different on newer Android versions.

Copy link
Collaborator

@ZetaTom ZetaTom left a comment

Choose a reason for hiding this comment

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

Given the current commit (1e4e417), the app unfortunately crashes when attempting to open the overflow menu of any folder. However, it works fine for regular files. I'm running Android 11.0 (API 30) on a Pixel 2 emulator.

Stacktrace
2023-10-10 14:03:27.495 19484-19571 FileDataStorageManager  com.nextcloud.client                 D  getFolderContent - start
2023-10-10 14:03:27.500 19484-19571 FileDataStorageManager  com.nextcloud.client                 D  getFolderContent - finished
2023-10-10 14:03:27.601 19484-19484 SyncedFolderProvider    com.nextcloud.client                 E  0 items for remote path = /A available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
2023-10-10 14:03:27.607 19484-19484 AndroidRuntime          com.nextcloud.client                 D  Shutting down VM
2023-10-10 14:03:27.612 19484-19484 AndroidRuntime          com.nextcloud.client                 E  FATAL EXCEPTION: main
                                                                                                    Process: com.nextcloud.client, PID: 19484
                                                                                                    java.lang.NullPointerException: Attempt to invoke interface method 'com.nextcloud.client.preferences.DarkMode com.nextcloud.client.preferences.AppPreferences.getDarkThemeMode()' on a null object reference
                                                                                                    	at com.owncloud.android.utils.DisplayUtils.setThumbnail(DisplayUtils.java:859)
                                                                                                    	at com.nextcloud.ui.fileactions.FileActionsBottomSheet.loadFileThumbnail(FileActionsBottomSheet.kt:145)
                                                                                                    	at com.nextcloud.ui.fileactions.FileActionsBottomSheet.handleState(FileActionsBottomSheet.kt:121)
                                                                                                    	at com.nextcloud.ui.fileactions.FileActionsBottomSheet.access$handleState(FileActionsBottomSheet.kt:65)
                                                                                                    	at com.nextcloud.ui.fileactions.FileActionsBottomSheet$onCreateView$1.invoke(FileActionsBottomSheet.kt:100)
                                                                                                    	at com.nextcloud.ui.fileactions.FileActionsBottomSheet$onCreateView$1.invoke(FileActionsBottomSheet.kt:100)
                                                                                                    	at com.nextcloud.ui.fileactions.FileActionsBottomSheet$sam$androidx_lifecycle_Observer$0.onChanged(Unknown Source:2)
                                                                                                    	at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
                                                                                                    	at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:151)
                                                                                                    	at androidx.lifecycle.LiveData.setValue(LiveData.java:309)
                                                                                                    	at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
                                                                                                    	at androidx.lifecycle.LiveData$1.run(LiveData.java:93)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:938)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loop(Looper.java:223)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7656)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

@alperozturk96
Copy link
Collaborator Author

Given the current commit (1e4e417), the app unfortunately crashes when attempting to open the overflow menu of any folder. However, it works fine for regular files. I'm running Android 11.0 (API 30) on a Pixel 2 emulator.
Stacktrace

Could you check with latest commit?

@github-actions
Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12003.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@github-actions
Copy link

Codacy

Lint

TypemasterPR
Warnings8080
Errors00

SpotBugs

CategoryBaseNew
Bad practice2626
Correctness8585
Dodgy code434434
Experimental22
Internationalization99
Malicious code vulnerability22
Multithreaded correctness99
Performance5959
Security1818
Total644644

@github-actions
Copy link

@tobiasKaminsky tobiasKaminsky merged commit c9f9b02 into master Oct 11, 2023
16 of 19 checks passed
@delete-merged-branch delete-merged-branch bot deleted the bugfix/Update-folder-icons branch October 11, 2023 14:23
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.27.0 milestone Oct 12, 2023
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.

Update folder icons
4 participants