Skip to content

Hide summary file actions when a selected file does not match - #7046

Merged
MorrisJobke merged 1 commit into
masterfrom
hide-summary-file-actions-when-selected-file-does-not-match
Nov 9, 2017
Merged

Hide summary file actions when a selected file does not match#7046
MorrisJobke merged 1 commit into
masterfrom
hide-summary-file-actions-when-selected-file-does-not-match

Conversation

@danxuliu

Copy link
Copy Markdown
Member

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 ;-)

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>
@danxuliudanxuliu added the 3. to review Waiting for reviews label Nov 2, 2017
@danxuliudanxuliu added this to the Nextcloud 13 milestone Nov 2, 2017
@codecov

codecovBot commented Nov 2, 2017

Copy link
Copy Markdown

Codecov Report

Merging #7046 into master will not change coverage.
The diff coverage is n/a.

@@ 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

@danxuliudanxuliu mentioned this pull request Nov 2, 2017
3 tasks
@MorrisJobke
MorrisJobke merged commit e0aaca1 into masterNov 9, 2017
@MorrisJobke
MorrisJobke deleted the hide-summary-file-actions-when-selected-file-does-not-match branch November 9, 2017 08:45
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@danxuliu@MorrisJobke@schiessle