Hide summary file actions when a selected file does not match#7046
Merged
MorrisJobke merged 1 commit intomasterfrom Nov 9, 2017
Merged
Conversation
When several files are selected and one of them can not be deleted the
"Delete" file action is not shown in the summary. This commit extends
that behaviour too to the other file actions in the summary ("Move or
copy" and "Download"), so now an action is shown in the summary only if
it can be executed on all the currently selected files.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #7046 +/- ##
=========================================
Coverage 50.62% 50.62%
Complexity 24290 24290
=========================================
Files 1577 1577
Lines 92890 92890
Branches 1358 1358
=========================================
Hits 47028 47028
Misses 45862 45862 |
3 tasks
schiessle
approved these changes
Nov 6, 2017
MorrisJobke
approved these changes
Nov 9, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When several files are selected and one of them can not be deleted the Delete file action is not shown in the summary. This pull request extends that behaviour too to the other file actions in the summary (Move or copy and Download), so now an action is shown in the summary only if it can be executed on all the currently selected files.
This is a requisite for proper handling of encrypted folders in #6670.
Hiding the actions may not be the best solution regarding the user experience, as a user may not understand why the actions do not appear if she selects all the files in a folder, or she may expect the actions to always be available and to be performed only on the matching files.
In the future it may be worth considering an alternative approach, like a notification letting the user know on which files the action was not executed, or a dialog informing about that before performing the action, or a visible but disabled action that hints on why it is disabled, or whatever (there are probably much better solutions, those are just examples ;-) ).
But for the time being I am afraid that we will have to live with hidden actions ;-)