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

[FEATURE REQUEST] OCIS: "Share to" allows only upload to personal "space" #4160

Merged
merged 14 commits into from
Oct 4, 2023

Conversation

Aitorbp
Copy link
Contributor

@Aitorbp Aitorbp commented Sep 19, 2023

Related Issues

App: #4088

  • Added changelog files for the fixed issues in folder changelog/unreleased. More info here

QA

Test Plan: https://github.com/owncloud/QA/blob/master/Mobile/Android/Executions/Release_4.2/Share%20with%20oC%20with%20spaces.md

Bugs & improvements:

@Aitorbp Aitorbp self-assigned this Sep 19, 2023
Copy link
Collaborator

@JuancaG05 JuancaG05 left a comment

Choose a reason for hiding this comment

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

Nice job @Aitorbp! Some comments here for you to review 🚀

@JuancaG05 JuancaG05 self-requested a review September 22, 2023 07:45
Copy link
Collaborator

@JuancaG05 JuancaG05 left a comment

Choose a reason for hiding this comment

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

Some more changes here @Aitorbp! 👍

@Aitorbp Aitorbp requested a review from JuancaG05 September 25, 2023 06:46
Copy link
Collaborator

@JuancaG05 JuancaG05 left a comment

Choose a reason for hiding this comment

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

LGTM! Let's move this on 🚀

@jesmrec
Copy link
Collaborator

jesmrec commented Sep 27, 2023

(1) [FIXED]

  1. Create new space in oCIS account, and let it empty
  2. Open a 3rd party app and share content with oC, browsing to the new space without submitting
  3. Browse back to the list of spaces

Current: glitch in the view, No files here on the top:

Screen_recording_20230927_122234.mp4

Expected: just the list of spaces

Pixel 2, Android 11
d64538e7

@jesmrec
Copy link
Collaborator

jesmrec commented Sep 27, 2023

(2) [FIXED]

Repeating the steps of 1. and then, clicking on Cancel, app crashes:

Process: com.owncloud.android.debug, PID: 18751
java.lang.IllegalArgumentException: Wrong element clicked at com.owncloud.android.ui.activity.ReceiveExternalFilesActivity.onClick(ReceiveExternalFilesActivity.java:503)
at android.view.View.performClick(View.java:7448)
at android.view.View.performClickInternal(View.java:7425)
at android.view.View.access$3600(View.java:810)
at android.view.View$PerformClick.run(View.java:28305)
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)

i've noticed that the involved code is not new, but not reproducible with older versions because view did not exist

Pixel 2, Android 11
d64538e7

@jesmrec
Copy link
Collaborator

jesmrec commented Sep 27, 2023

(3) [FIXED]

Placeholder for No files here has change position from center-alligned to top-alligned. Intended?

4.1 Current
Screenshot 2023-09-27 at 12 44 49 Screenshot 2023-09-27 at 12 43 53

Pixel 2, Android 11
d64538e7

@jesmrec
Copy link
Collaborator

jesmrec commented Sep 27, 2023

(4) [FIXED]

  1. Share any file with oC10, in a non-root folder and submit it
  2. Share other file to the same location -> location is shown in the picker

Current: Not posible to browse up in the folder structure
Expected: Browsing in posible in all directions

Pixel 2, Android 11
d64538e7

@jesmrec
Copy link
Collaborator

jesmrec commented Sep 27, 2023

(5) [FIXED]

this one does not seems to be directly related with the developed feature, but it's not reproducible in the current master and reproducible in the branch. Something related with the picker causing kind of regression.

  1. Open an oCIS account
  2. Select any item and Copy -> picker is displayed
  3. Change device orientation

Current: app crashes

Process: com.owncloud.android.debug, PID: 22795
                                             java.lang.RuntimeException: Unable to start activity ComponentInfo{com.owncloud.android.debug/com.owncloud.android.ui.activity.FolderPickerActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.owncloud.android.presentation.spaces.SpacesListFragment: could not find Fragment constructor
                                             	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
                                             	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
                                             	at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:5456)
                                             	at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5362)
                                             	at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:69)
                                             	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
                                             	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
                                             	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
                                             	at android.os.Handler.dispatchMessage(Handler.java:106)
                                             	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)
                                             Caused by: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.owncloud.android.presentation.spaces.SpacesListFragment: could not find Fragment constructor
                                             	at androidx.fragment.app.Fragment.instantiate(Fragment.java:681)
                                             	at androidx.fragment.app.FragmentContainer.instantiate(FragmentContainer.java:57)
                                             	at androidx.fragment.app.FragmentManager$3.instantiate(FragmentManager.java:507)
                                             	at androidx.fragment.app.FragmentState.instantiate(FragmentState.java:81)
                                             	at androidx.fragment.app.FragmentStateManager.<init>(FragmentStateManager.java:85)
                                             	at androidx.fragment.app.FragmentManager.restoreSaveStateInternal(FragmentManager.java:2507)
                                             	at androidx.fragment.app.FragmentManager.attachController(FragmentManager.java:2667)
                                             	at androidx.fragment.app.FragmentController.attachHost(FragmentController.java:117)
                                             	at androidx.fragment.app.FragmentActivity.lambda$init$3$androidx-fragment-app-FragmentActivity(FragmentActivity.java:140)
                                             	at androidx.fragment.app.FragmentActivity$$ExternalSyntheticLambda3.onContextAvailable(Unknown Source:2)
                                             	at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable(ContextAwareHelper.java:99)
                                             	at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:352)
                                             	at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:217)
                                             	at com.owncloud.android.ui.activity.DrawerActivity.onCreate(DrawerActivity.kt:581)
                                             	at com.owncloud.android.ui.activity.FileActivity.onCreate(FileActivity.java:118)
                                             	at com.owncloud.android.ui.activity.FolderPickerActivity.onCreate(FolderPickerActivity.kt:58)
                                             	at android.app.Activity.performCreate(Activity.java:8000)
                                             	at android.app.Activity.performCreate(Activity.java:7984)
                                             	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
                                             	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
                                             	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601) 
                                             	at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:5456) 
                                             	at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5362) 
                                             	at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:69) 
                                             	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
                                             	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
                                             	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) 
                                             	at android.os.Handler.dispatchMessage(Handler.java:106) 
                                             	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) 
                                             Caused by: java.lang.NoSuchMethodException: com.owncloud.android.presentation.spaces.SpacesListFragment.<init> []
                                             	at java.lang.Class.getConstructor0(Class.java:2332)
                                             	at java.lang.Class.getConstructor(Class.java:1728)
                                             	at androidx.fragment.app.Fragment.instantiate(Fragment.java:666)
                                             	at androidx.fragment.app.FragmentContainer.instantiate(FragmentContainer.java:57) 
                                             	at androidx.fragment.app.FragmentManager$3.instantiate(FragmentManager.java:507) 
                                             	at androidx.fragment.app.FragmentState.instantiate(FragmentState.java:81) 
                                             	at androidx.fragment.app.FragmentStateManager.<init>(FragmentStateManager.java:85) 
                                             	at androidx.fragment.app.FragmentManager.restoreSaveStateInternal(FragmentManager.java:2507) 
                                             	at androidx.fragment.app.FragmentManager.attachController(FragmentManager.java:2667) 
                                             	at androidx.fragment.app.FragmentController.attachHost(FragmentController.java:117) 
                                             	at androidx.fragment.app.FragmentActivity.lambda$init$3$androidx-fragment-app-FragmentActivity(FragmentActivity.java:140) 
                                             	at androidx.fragment.app.FragmentActivity$$ExternalSyntheticLambda3.onContextAvailable(Unknown Source:2) 
                                             	at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable(ContextAwareHelper.java:99) 
                                             	at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:352) 
                                             	at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:217) 
                                             	at com.owncloud.android.ui.activity.DrawerActivity.onCreate(DrawerActivity.kt:581) 
                                             	at com.owncloud.android.ui.activity.FileActivity.onCreate(FileActivity.java:118) 
                                             	at com.owncloud.android.ui.activity.FolderPickerActivity.onCreate(FolderPickerActivity.kt:58) 
                                             	at android.app.Activity.performCreate(Activity.java:8000) 
                                             	at android.app.Activity.performCreate(Activity.java:7984) 
                                             	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309) 
                                             	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422) 
                                             	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601) 
                                             	at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:5456) 
                                             	at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5362) 
                                             	at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:69) 
                                             	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
                                             	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
                                             	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) 
                                             	at android.os.Handler.dispatchMessage(Handler.java:106) 
                                             	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) 

Expected: no crash.

Pixel 2, Android 11
d64538e7

@Aitorbp Aitorbp requested a review from JuancaG05 September 28, 2023 07:01
Copy link
Collaborator

@JuancaG05 JuancaG05 left a comment

Choose a reason for hiding this comment

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

LGTM, we can keep on with QA @jesmrec

@jesmrec
Copy link
Collaborator

jesmrec commented Sep 29, 2023

(6) [FIXED]

  1. Add two oCIS accounts with different spaces' list
  2. Share something with oC from a 3rd party app -> list of accounts is displayed, the list of spaces of one of them is listed in the background
  3. In the account picker, select the other one

Current: the list of spaces does not change and is displayed the list of the incorrect account
Expected: the list of spaces is correct

Pixel 2, Android 11
7fe02775

@jesmrec
Copy link
Collaborator

jesmrec commented Sep 29, 2023

(7) [FIXED]

This one may be the same as (6) but i'm not totally sure, so, if it is finally the same just ignore it

  1. Add an oC10 account and an oCIS account to the device
  2. Share something with the oC10 account from a 3rd party app
  3. Share again with oC, but now select the oCIS account (the oC10 file list was in the background because it was selected in step 2.)

Current: list of spaces empty with error Spaces could not be refreshed because it was not found
Expected: list of spaces displayed

Screen_recording_20230929_124837.mp4

Pixel 2, Android 11
Samsung Galaxy A8, Android 13
7fe02775

@Aitorbp Aitorbp requested a review from JuancaG05 October 2, 2023 07:17
@jesmrec
Copy link
Collaborator

jesmrec commented Oct 3, 2023

Approved on my side. Great job!

@Aitorbp Aitorbp force-pushed the feature/share_to_allows_only_upload_personal_space_1 branch from 1827367 to 5dbd19d Compare October 4, 2023 07:02
@Aitorbp Aitorbp merged commit 0f3ee6f into master Oct 4, 2023
2 checks passed
@Aitorbp Aitorbp deleted the feature/share_to_allows_only_upload_personal_space_1 branch October 4, 2023 07:23
jesmrec pushed a commit that referenced this pull request Oct 20, 2023
…pload_personal_space_1

[FEATURE REQUEST] OCIS: "Share to" allows only upload to personal "space"
Aitorbp added a commit that referenced this pull request Feb 5, 2024
…pload_personal_space_1

[FEATURE REQUEST] OCIS: "Share to" allows only upload to personal "space"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] OCIS: "Share to" allows only upload to personal "space"
3 participants