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

Add a new file details window, unify file activity and sharing #4929

Merged
merged 27 commits into from
Oct 31, 2022

Conversation

claucambra
Copy link
Collaborator

@claucambra claucambra commented Sep 12, 2022

This rather big PR contains the following changes:

  1. The sharing dialog has been completely rewritten in QML.
  2. The sharing backend has been almost completely rewritten to be compatible with the new UI components
  3. The file activities dialog has been combined with the sharing dialog

These changes have the following advantages:

  1. The share dialog now looks far, far nicer :)
  2. We properly separate share editing logic from the UI components
  3. We use models to present this data, letting us better react to changes
  4. All the advantages of QML (now very easy to integrate with the rest of the tray, far better support for touch-screens and gestures, far easier customisation and responsiveness)

Some screengrabs:

Screen.Recording.2022-09-12.at.18.20.58.mov
Screen.Recording.2022-09-12.at.18.15.35.mov
Screen.Recording.2022-09-12.at.18.16.22.mov
Screen.Recording.2022-09-12.at.18.16.43.mov
Screen.Recording.2022-09-12.at.18.18.33.mov
Screen.Recording.2022-09-12.at.18.18.50.mov

Closes #3845, closes #4777, closes #4947

Signed-off-by: Claudio Cambra claudio.cambra@gmail.com

@codecov
Copy link

codecov bot commented Sep 12, 2022

Codecov Report

Merging #4929 (6d85d91) into master (1dbdd88) will increase coverage by 0.44%.
The diff coverage is n/a.

❗ Current head 6d85d91 differs from pull request most recent head d79312b. Consider uploading reports for the commit d79312b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4929      +/-   ##
==========================================
+ Coverage   57.22%   57.66%   +0.44%     
==========================================
  Files         138      138              
  Lines       17441    17418      -23     
==========================================
+ Hits         9980    10044      +64     
+ Misses       7461     7374      -87     
Impacted Files Coverage Δ
src/libsync/syncengine.h 43.75% <0.00%> (-6.25%) ⬇️
src/libsync/vfs/cfapi/cfapiwrapper.cpp 74.09% <0.00%> (-0.23%) ⬇️
src/libsync/account.h 33.33% <0.00%> (ø)
src/libsync/clientsideencryption.h 38.46% <0.00%> (ø)
src/libsync/syncengine.cpp 84.23% <0.00%> (+0.07%) ⬆️
src/libsync/propagatedownload.cpp 64.75% <0.00%> (+0.14%) ⬆️
src/libsync/discoveryphase.cpp 73.46% <0.00%> (+0.27%) ⬆️
src/libsync/account.cpp 38.00% <0.00%> (+0.40%) ⬆️
src/libsync/networkjobs.cpp 50.70% <0.00%> (+0.42%) ⬆️
src/libsync/clientsideencryption.cpp 26.80% <0.00%> (+0.47%) ⬆️
... and 6 more

@claucambra claucambra force-pushed the feature/qml-file-details branch 3 times, most recently from 772f326 to deed325 Compare September 13, 2022 00:57
@tobiasKaminsky tobiasKaminsky linked an issue Sep 13, 2022 that may be closed by this pull request
@claucambra claucambra force-pushed the feature/qml-file-details branch 7 times, most recently from 09679c8 to 4a427b0 Compare September 13, 2022 21:09
@jancborchardt
Copy link
Member

@nimishavijay @marcoambrosini would love to get your feedback on this cause I looked at it so much already, would be cool to get new input. :)

@nimishavijay
Copy link
Member

nimishavijay commented Sep 15, 2022

Super super great work! Love the animation for switching between activity and sharing :D I have some feedback, but not sure how much of it is feasible:

  • Hover feedback for the 3 dot icon (and all icon buttons) can be a circle if possible

  • The colour of the email icon can be --color-primary-light background and --color-primary icon (similar to the share icon in the main dialogue) to distinguish easier between share links and individual emails

  • "Link share" --> "Share link" just for consistency with Files :)

  • What happens if an invalid date is entered?

  • The background for the password error message is very strong. Maybe we could use 10% opacity of the same colour and a 100% opacity border-left? Similar to a callout
    image

  • Is it possible to show the password error message nearer to the password field? Otherwise there could be something like a modal with the message (What do you think? also cc @jancborchardt )

  • Is it possible to shorten the password error message to something like "Your password is common. Use a unique password which is at least 10 characters long"

  • The checkbox style looks different to for eg. in the settings. Any way to make it look more similar to the native style? Like in windows it can look similar to this:
    image

  • In the hover feedback for Activity and Sharing tab, the top edge is very close to the icon. Maybe 4-6px more padding? And possibly border-radius of 8px or so if possible?

What do you think?

@marcoambrosini
Copy link
Member

So I'm lacking context here and this is a quick impression from the top of my head.
I think that what's wrong here is that we're trying again to squeeze very complex flows into a tiny tooltip. This is a clear problem in files already but here even more.
This would require a whole share settings "page" or dialog, with nice captions and explanations on what's going on when you toggle things on and off.

@marcoambrosini
Copy link
Member

marcoambrosini commented Sep 15, 2022

eg: we could have a share settings page for each share similar to google drive. And in files this should prob be a dialog

Screen.Recording.2022-09-15.at.16.27.59.mov

@claucambra
Copy link
Collaborator Author

eg: we could have a share settings page for each share similar to google drive. And in files this should prob be a dialog

Screen.Recording.2022-09-15.at.16.27.59.mov

Yes, @jancborchardt has already shown mockups of a share settings page rather than a pop-up. However this PR is already massive and I thought it best for the sake of my fellow desktop team members' sanity to leave this for a different pull request :)

@claucambra
Copy link
Collaborator Author

claucambra commented Sep 15, 2022

@nimishavijay

  • Hover feedback for the 3 dot icon (and all icon buttons) can be a circle if possible

This is doable

  • The colour of the email icon can be --color-primary-light background and --color-primary icon (similar to the share icon in the main dialogue) to distinguish easier between share links and individual emails

Sorry, do you have an example of what this would look like? We don't use these variables in the desktop client

Are you sure we also want to differ from the way it looks in the server?

  • "Link share" --> "Share link" just for consistency with Files

Sure, no problem

  • What happens if an invalid date is entered?

As soon as you confirm the input this gets set to the server, which replies with a valid date. So if today is 15/09/2022 and you try to set 14/09/2022 the date field will send this data, show a loading indicator, and reset to the 15/09/2022 date which the server forces. If you enforce a maximum 7 day expire days and try to set an expire date further in the future than that, the max expire date gets set

  • The background for the password error message is very strong. Maybe we could use 10% opacity of the same colour and a 100% opacity border-left? Similar to a callout
    image

This is an independent component that is used elsewhere in the client, not just in this PR. We can certainly change the design -- I will open an issue and we can put it on the task list :)

  • Is it possible to show the password error message nearer to the password field? Otherwise there could be something like a modal with the message (What do you think? also cc @jancborchardt )

Yes, this should be possible.

  • Is it possible to shorten the password error message to something like "Your password is common. Use a unique password which is at least 10 characters long"

Not possible. The error messages come from the server and we have no way of knowing, from the desktop client side, why exactly the password has been rejected specifically. We only receive a notice that the password was rejected and a string with the error message from the server

  • The checkbox style looks different to for eg. in the settings. Any way to make it look more similar to the native style? Like in windows it can look similar to this:
    image

Yes, we have discussed this. But like with Marco's feedback this is already a massive PR and it is something that can be worked on separately. Also, more specifically, native style will take a lot of work to do at the moment. We are planning to move to Qt 6 in the near future which should make this much more trivial to implement -- right now we would be forced to design checkboxes specific to each operating system, which is IMO not the way to go

  • In the hover feedback for Activity and Sharing tab, the top edge is very close to the icon. Maybe 4-6px more padding? And possibly border-radius of 8px or so if possible?

Sure, can do

I have added the stuff we can do in this PR to the PR description at the top

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
…file detail dialogs, raise existing dialog instead of always deleting

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>

Test ShareModel error handling

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>

Improve testing of user/group shares in ShareModel

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>

Add testing for maximum share expire date enforcement in ShareModel

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
…reTestUtils file

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-4929-d79312b2f7d32af4565221aab71cf694cad917cf-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarcloud
Copy link

sonarcloud bot commented Oct 31, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 130 Code Smells

48.1% 48.1% Coverage
0.0% 0.0% Duplication

@allexzander allexzander self-requested a review October 31, 2022 17:34
@AndyXheli
Copy link

HI @claucambra The auto password generator is not working on client 3.7.4 tested on windows once i click on share via lin i get an option to set password and dose not auto generate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
9 participants