Skip to content

Hide favourite icon in details view if favourite action is not available - #7716

Merged
MorrisJobke merged 1 commit into
masterfrom
hide-favourite-icon-in-details-view-if-favourite-action-is-not-available
Jan 8, 2018
Merged

Hide favourite icon in details view if favourite action is not available#7716
MorrisJobke merged 1 commit into
masterfrom
hide-favourite-icon-in-details-view-if-favourite-action-is-not-available

Conversation

@danxuliu

Copy link
Copy Markdown
Member

Fixes (in master) #4568

The problem was that the Favorite file action is added only to some of the file lists, but the icon in the details view was shown unconditionally for every file list, so when it was clicked and the Favorite action was tried to be triggered it was not found and the Download action was executed instead.

Now the favourite icon is hidden if its action is not available.

When the favourite icon in the details view is clicked the "Favorite"
action is triggered. However, if the action name given to
"triggerAction" is not found then the "Download" action is triggered
instead. As the "Favorite" action is not available in some file lists
(like "Recents") the "Download" action was executed instead in those
cases, which was a strange behaviour. Now the favourite icon is
hidden if its action is not available.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliudanxuliu added 3. to review Waiting for reviews backport-request bug feature: files papercut Annoying recurring UX issue with possibly simple fix. labels Jan 5, 2018
@codecov

codecovBot commented Jan 5, 2018

Copy link
Copy Markdown

Codecov Report

Merging #7716 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@ Coverage Diff @@## master #7716 +/- ##
============================================
+ Coverage 51.18% 51.18% +<.01% 
Complexity 24948 24948 ============================================
Files 1605 1605 Lines 94923 94923 Branches 1376 1376 ============================================
+ Hits 48583 48584 +1 + Misses 46340 46339 -1
Impacted FilesCoverage ΔComplexity Δ
lib/private/Server.php81.43% <0%> (-0.12%)134% <0%> (ø)
apps/files_trashbin/lib/Trashbin.php72.53% <0%> (+0.24%)136% <0%> (ø)⬇️
lib/private/Security/CertificateManager.php92.07% <0%> (+0.99%)39% <0%> (ø)⬇️

@MorrisJobkeMorrisJobke added this to the Nextcloud 13 milestone Jan 5, 2018

@rullzerrullzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested and works 👍

@MorrisJobke
MorrisJobke merged commit 9c3ac19 into masterJan 8, 2018
@MorrisJobke
MorrisJobke deleted the hide-favourite-icon-in-details-view-if-favourite-action-is-not-available branch January 8, 2018 14:43
@MorrisJobke

Copy link
Copy Markdown
Member

#962074

@MorrisJobke

Copy link
Copy Markdown
Member

@danxuliu Could you open a backport against stable12?

@danxuliu

Copy link
Copy Markdown
MemberAuthor

@MorrisJobke Here you have: #7742

@MorrisJobkeMorrisJobke mentioned this pull request Jan 9, 2018
18 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugfeature: filespapercutAnnoying recurring UX issue with possibly simple fix.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@danxuliu@MorrisJobke@rullzer