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

Fix "no selection" panel for root nodes in all files and public links #6505

Merged
merged 2 commits into from
Mar 2, 2022

Conversation

kulmann
Copy link
Member

@kulmann kulmann commented Mar 1, 2022

Description

We recently introduced a bug that causes the "no selection" info panel to not be shown anymore in the root of All files (path of All files root changed from `` to /). This PR fixes it, also fixes it for public link roots (which have the public link token as first path segment) and adds unit tests for it.

Also saw, that fetching the file info didn't work for public links (was using the fileInfo sdk method for authenticate files context). Fixed it as well. Didn't seem to hurt before, though, except for the console error about missing authentication.

Related Issue

Motivation and Context

Hardening.

How Has This Been Tested?

  • added unit tests

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@kulmann kulmann mentioned this pull request Mar 1, 2022
31 tasks
item: simpleOwnFolder,
selectedItems: [simpleOwnFolder],
mocks: { $client: { files: { fileInfo: mockFileInfo } } }
describe('file info', () => {
Copy link
Member Author

@kulmann kulmann Mar 2, 2022

Choose a reason for hiding this comment

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

wrapped the file info related test cases into its own describe block, so the following lines are mostly indentation changes. Additional tests start in line 96.

Copy link
Member Author

Choose a reason for hiding this comment

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

Needed to make some adjustments though, because I'm mocking buildResource now in this file.

@ownclouders
Copy link
Contributor

Results for oCISSharingPublic1 https://drone.owncloud.com/owncloud/web/23156/67/1
The following scenarios passed on retry:

  • webUISharingPublicBasic/publicLinkPublicActions.feature:44

Copy link
Contributor

@fschade fschade left a comment

Choose a reason for hiding this comment

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

tested and works like a charm, just found one unused getter

packages/web-app-files/src/components/SideBar/SideBar.vue Outdated Show resolved Hide resolved
@kulmann kulmann force-pushed the fix-root-node-info-right-sidebar branch from c271131 to db22aa5 Compare March 2, 2022 09:02
@kulmann kulmann requested a review from fschade March 2, 2022 09:03
Copy link
Contributor

@fschade fschade left a comment

Choose a reason for hiding this comment

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

LGTM 🎸

@pascalwengerter pascalwengerter force-pushed the fix-root-node-info-right-sidebar branch from b6dea90 to f33196e Compare March 2, 2022 09:57
@sonarcloud
Copy link

sonarcloud bot commented Mar 2, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

90.0% 90.0% Coverage
0.0% 0.0% Duplication

@pascalwengerter pascalwengerter merged commit 18668e1 into master Mar 2, 2022
@delete-merged-branch delete-merged-branch bot deleted the fix-root-node-info-right-sidebar branch March 2, 2022 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Right sidebar panel for no selection is not triggered anymore Public link-view shows token in right sidebar
4 participants