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

[TECHNICAL] Move available operations in file list to UseCase #4009

Closed
15 tasks done
jesmrec opened this issue Apr 10, 2023 · 10 comments · Fixed by #4039
Closed
15 tasks done

[TECHNICAL] Move available operations in file list to UseCase #4009

jesmrec opened this issue Apr 10, 2023 · 10 comments · Fixed by #4039
Assignees
Labels
Estimation - 3 (M) p2-high Escalation, on top of current planning, release blocker Technical
Milestone

Comments

@jesmrec
Copy link
Collaborator

jesmrec commented Apr 10, 2023

Let's move the legacy FileMenuFilter.java class to Kotlin and transform it to use case.

TASKS

  • Research (if needed)
  • Create branch feature/filter_menu_usecase
  • Development tasks
    • Create new enum with the different menu options
    • Move FileMenuFilter to use case
    • Create Fragment extension to show or hide menu options
    • Replace FileMenuFilter uses by the new use case
    • Remove old FileMenuFilter
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/filter_menu_usecase into master

QA

Test plan:

Reports & improvements

@jesmrec jesmrec added this to the 4.0 - Current milestone Apr 10, 2023
@JuancaG05 JuancaG05 changed the title [FEATURE REQUEST] Move available operations in file list to UserCases [FEATURE REQUEST] Move available operations in file list to UseCase Apr 12, 2023
@jesmrec jesmrec modified the milestones: 4.0 - Current, 4.1 - Next Apr 13, 2023
@michaelstingl michaelstingl added the p2-high Escalation, on top of current planning, release blocker label Apr 13, 2023
@JuancaG05 JuancaG05 self-assigned this May 12, 2023
@JuancaG05 JuancaG05 changed the title [FEATURE REQUEST] Move available operations in file list to UseCase [TECHNICAL] Move available operations in file list to UseCase May 16, 2023
@JuancaG05 JuancaG05 linked a pull request May 16, 2023 that will close this issue
1 task
@JuancaG05
Copy link
Collaborator

The old filter, and thus the new use case, is used in the next screens:

  • Main file list (when selecting at least 1 file)
  • Details screen
  • Audio preview screen
  • Image preview screen
  • Text preview screen
  • Video preview screen

The filter consists of various menu options and parameters to select which of them must be shown in each case:

  • SELECT ALL: shown always in the main file list except when all the files in the screen are already selected.
  • SELECT INVERSE: shown always in the main file list.
  • DOWNLOAD: shown when none of the selected files is synchronizing, no videos are being previewed, we're not in the av. offline screen, we're not in the shared by link screen, there are no folders among the selected files and there are no downloaded files among the selected ones.
  • RENAME: shown when none of the selected files is synchronizing, no videos are being previewed, we're not in the av. offline screen, we're not in the shared by link screen, it is a single file or folder and we do have permission to rename it.
  • MOVE: shown when none of the selected files is synchronizing, no videos are being previewed, we're not in the av. offline screen, we're not in the shared by link screen and we do have permissions to move the selection.
  • COPY: shown when none of the selected files is synchronizing, no videos are being previewed, we're not in the av. offline screen and we're not in the shared by link screen.
  • REMOVE: shown when none of the selected files is synchronizing, we're not in the av. offline screen, we're not in the shared by link screen and we do have permissions to remove the selection.
  • OPEN WITH: shown when none of the selected files is synchronizing and it is a single file.
  • SYNCHRONIZE: shown when none of the selected files is synchronizing, we're not in the av. offline screen, we're not in the shared by link screen and in the selection there is at least one file downloaded or one folder.
  • CANCEL SYNC: shown when at least one of the selected files is synchronizing, we're not in the av. offline screen, we're not in the shared by link screen and none of the selected files is available offline.
  • SHARE: shown when we're not in the av. offline screen, share via link or with users is allowed, resharing is allowed, we're in the personal space and it is a single file or folder.
  • DETAILS: shown when it is a single file.
  • SEND: shown when none of the selected files is synchronizing, no videos are streaming, we're not in the av. offline screen, there are no folders in the selection and all files in the selection are downloaded or it is a single file and send is allowed.
  • SET AS AVAILABLE OFFLINE: shown when none of the selected files is synchronizing, there is at least one not-available offline file in the selection and no videos are streaming.
  • UNSET AS AVAILABLE OFFLINE: shown when there is at least one available offline file in the selection and no videos are streaming.

In addition, the following screens have additional restrictions:

  • Details screen: DETAILS, MOVE and COPY options are always removed.
  • Audio preview screen: RENAME, MOVE, COPY and SYNC options are always removed.
  • Image preview screen: RENAME, MOVE, COPY and SYNC options are always removed.
  • Text preview screen: RENAME, MOVE, COPY and SYNC options are always removed.

@jesmrec
Copy link
Collaborator Author

jesmrec commented May 31, 2023

Let's QA

@jesmrec
Copy link
Collaborator Author

jesmrec commented May 31, 2023

(1) [FIXED]

  1. Open a oC10 account
  2. Select any item in the list

Not reproducible in oCIS

Current: Share option is not available
Expected: Share option is available (sharing allowed via capability)

Pixel2, Android11
766480781

@jesmrec
Copy link
Collaborator Author

jesmrec commented May 31, 2023

(2) [FIXED]

  1. Open a oC10 account
  2. Create a public link over any item
  3. Open the Links view
  4. Select any item in that list

Current: Share option is not available
Expected: Share option is available (sharing allowed via capability)

Pixel2, Android11
766480781

@jesmrec
Copy link
Collaborator Author

jesmrec commented May 31, 2023

(3) [FIXED]

May be related with (1)

  1. In oC10, open Details of any file

Current: Share option is not available
Expected: Share option is available (sharing allowed via capability)

Pixel2, Android11
766480781

@jesmrec
Copy link
Collaborator Author

jesmrec commented Jun 2, 2023

(4)

Questions:

  • options Select All and Select inverse are part of the filter? they shouldn't since they are going to be static in the list of files, no matter selections and operations. Indeed, when all available operations will be moved to the new menu, Select All and Select inverse will keep in the top-bar 3-bot-button.

  • New markdown support is inserted in txt preview right? it's not another kind of preview.

@JuancaG05
Copy link
Collaborator

JuancaG05 commented Jun 6, 2023

(1), (2) and (3) should be fixed now 👍
About (4):

  • options Select All and Select inverse are part of the filter? they shouldn't since they are going to be static in the list of files, no matter selections and operations. Indeed, when all available operations will be moved to the new menu, Select All and Select inverse will keep in the top-bar 3-bot-button.

Yes, they are. They have a tiny dynamic behaviour since "Select all" is only shown when not every file is selected and we are in the main file list, and "Select inverse" only when we are in the main file list. We could separate them from the filter but then we would spread the menu options logic in several parts of the code...

  • New markdown support is inserted in txt preview right? it's not another kind of preview.

That's correct, it is the same preview but displayed differently if it's a .md file

@jesmrec
Copy link
Collaborator Author

jesmrec commented Jun 8, 2023

This is the test matrix:

Single selection

File List Links (oC10) Details Av. Offline Img preview Video preview Audio preview Txt preview While Sync
Download (only files) Available
Not available
Available
Not available
Not available
Not available
Not available
Not available
Not available
Rename Available
Not available
Available
Not available
Not available
Not available
Not available
Not available
Not available
Move Available
Not available
Not available
Not available
Not available
Not available
Not available
Not available
Not available
Copy Available
Not available
Not available
Not available
Not available
Not available
Not available
Not available
Not available
Remove Available
Not available
Available
Not available
Available
Available
Available
Available
Not available
Open with (only files) Available
Available
Available
Available
Available
Available
Available
Available
Not available
Sync Available
Not available
Available (downloaded files)
Not available
Not available
Available
Not available
Not available
Not available
Cancel sync Not available
Not available
Available (downloaded files)
Not available
Not available
Available
Not available
Not available
Available
Share Available
Available
Available
Not available
Available
Available
Available
Available
Available
Details (only files) Available
Available
Not available
Available
Available
Available
Available
Available
Available
Send (downloaded files) Available
Available
Available
Not Available
Available
Available
Available
Available
Not available
Set as av. off. Available
Available
Available
Not available
Available
Available (no streaming)
Available
Available
Not available
Unset as av. off. Available
Available
Available
Available
Available
Available (no streaming)
Available
Available
Not available

Multiple selection

File List Links Details Av. Offline Img preview Video preview Audio preview Txt preview While Sync
Download (not downloaded files) Available
Not available
NA Not available
NA NA NA NA NA
Rename Not available
Not available
NA Not available
NA NA NA NA Not available
Move Available
Not available
NA Not available
NA NA NA NA Not available
Copy Available
Not available
NA Not available
NA NA NA NA Not available
Remove Available
Not available
NA Not available
NA NA NA NA Not available
Open with Not available
Not available
NA Not available
NA NA NA NA Not available
Sync Available
Not available
NA Not available
NA NA NA NA Not available
Cancel sync Not available
Not available
NA Not available
NA NA NA NA Available
Share Not available
Available
NA Not available
NA NA NA NA Not available
Send (downloaded files) Available
Available
NA Not available
NA NA NA NA Not available
Set as av. off. Available
Available
NA Not available
NA NA NA NA Not available
Unset as av. off. Available
Available
NA Available
NA NA NA NA Not available

@jesmrec
Copy link
Collaborator Author

jesmrec commented Jun 8, 2023

Approved on my side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Estimation - 3 (M) p2-high Escalation, on top of current planning, release blocker Technical
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants