-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Redesign shared with list
- Loading branch information
Jan
authored
Jul 20, 2022
1 parent
c7fc417
commit 8aa1d3c
Showing
9 changed files
with
159 additions
and
112 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Enhancement: Redesign shared with list | ||
|
||
We've redesigned the shared with list, to achieve more spacing and a better user experience. | ||
We've also fixed a bug, where the role in a child of a share wasn't shown. | ||
|
||
https://github.com/owncloud/web/pull/7252 | ||
https://github.com/owncloud/web/issues/7110 |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -541,7 +541,7 @@ export function buildCollaboratorShare(s, file, allowSharePermission): Share { | |
share.customPermissions = SharePermissions.bitmaskToPermissions(s.permissions) | ||
share.role = PeopleShareRoles.getByBitmask( | ||
parseInt(s.permissions), | ||
file.isFolder, | ||
file.isFolder || file.type === 'folder', | ||
allowSharePermission | ||
) | ||
// share.email = '[email protected]' // hm, where do we get the mail from? share_with_additional_info:Object? | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ const selectors = { | |
notUserAvatar: 'oc-avatar-item-stub.files-collaborators-collaborator-indicator', | ||
collaboratorAdditionalInfo: '.files-collaborators-collaborator-additional-info', | ||
collaboratorName: '.files-collaborators-collaborator-name', | ||
shareType: '.files-collaborators-collaborator-share-type', | ||
accessDetailsButton: '.files-collaborators-collaborator-access-details-button', | ||
collaboratorRole: '.files-collaborators-collaborator-role', | ||
collaboratorEdit: '.files-collaborators-collaborator-edit', | ||
shareInheritanceIndicators: '.oc-resource-indicators' | ||
|
@@ -58,25 +58,9 @@ describe('Collaborator ListItem component', () => { | |
const wrapper = createWrapper() | ||
expect(wrapper.find(selectors.collaboratorName).text()).toEqual('Brian Murphy') | ||
}) | ||
describe('additionalInfo', () => { | ||
it('shows additional information about the collaborator if set', () => { | ||
const wrapper = createWrapper() | ||
expect(wrapper.find(selectors.collaboratorAdditionalInfo).text()).toEqual( | ||
'([email protected])' | ||
) | ||
}) | ||
it('does not show additional information about the collaborator if not set', () => { | ||
const wrapper = createWrapper({ | ||
collaborator: { | ||
displayName: 'Alice Hansen' | ||
} | ||
}) | ||
expect(wrapper.find(selectors.collaboratorAdditionalInfo).exists()).toBeFalsy() | ||
}) | ||
}) | ||
it.each(ShareTypes.authenticated)('shows a label for the share type', (shareType) => { | ||
it.each(ShareTypes.authenticated)('shows a button for the access details', (shareType) => { | ||
const wrapper = createWrapper({ shareType: shareType.value }) | ||
expect(wrapper.find(selectors.shareType).text()).toBe(shareType.label) | ||
expect(wrapper.find(selectors.accessDetailsButton).exists()).toBeTruthy() | ||
}) | ||
}) | ||
describe('modifiable property', () => { | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,22 +2,38 @@ | |
|
||
exports[`Collaborator ListItem component share inheritance indicators show when sharedParentRoute is given 1`] = ` | ||
<div data-testid="collaborator-user-item-brian" class="files-collaborators-collaborator oc-flex oc-flex-middle oc-py-xs oc-flex-between"> | ||
<div class="oc-width-2-3 oc-flex oc-flex-middle" style="gap: 10px;"> | ||
<div class="oc-width-1-1 oc-flex oc-flex-middle" style="gap: 10px;"> | ||
<avatar-image-stub userid="brian" user-name="Brian Murphy" width="48" class="files-collaborators-collaborator-indicator"></avatar-image-stub> | ||
<div class="oc-text-truncate"> | ||
<p class="oc-text-bold oc-text-truncate oc-m-rm"><span aria-hidden="true" class="files-collaborators-collaborator-name">Brian Murphy</span> <span aria-hidden="true" class="files-collaborators-collaborator-additional-info"> ([email protected])</span> <span class="oc-invisible-sr">Share receiver name: Brian Murphy ([email protected])</span></p> | ||
<p class="oc-m-rm oc-flex"><span aria-hidden="true" class="files-collaborators-collaborator-share-type">User</span> <span class="oc-resource-indicators oc-text-truncate"><span class="oc-mx-s">·</span> | ||
<router-link-stub to="[object Object]" class="parent-folder oc-text-truncate"><span class="text">via</span> | ||
<oc-icon-stub name="folder-2" size="small" fill-type="line" class="oc-px-xs"></oc-icon-stub> <span class="text oc-text-truncate">folder</span> | ||
</router-link-stub> | ||
</span> <span class="oc-invisible-sr">Share type: User</span> | ||
</p> | ||
<!----> | ||
<div class="oc-text-truncate oc-width-1-1"> | ||
<div class="oc-flex oc-flex-middle"><span class="oc-text-truncate oc-m-rm"><span aria-hidden="true" class="files-collaborators-collaborator-name">Brian Murphy</span></span> <span class="oc-invisible-sr">Share receiver name: Brian Murphy ([email protected])</span> | ||
<oc-button-stub id="share-access-details-toggle-asdf" appearance="raw" class="oc-ml-xs files-collaborators-collaborator-access-details-button"> | ||
<oc-icon-stub name="information" fill-type="line" size="small"></oc-icon-stub> | ||
</oc-button-stub> | ||
<oc-drop-stub toggle="#share-access-details-toggle-asdf" mode="click" class="share-access-details-drop"> | ||
<h5 class="oc-text-bold oc-mt-rm" data-msgid="Access details" data-current-language="en_US">Access details</h5> | ||
<oc-list-stub> | ||
<li class="oc-flex"><span class="oc-width-1-2" data-msgid="Addition" data-current-language="en_US">Addition</span><span class="files-collaborators-collaborator-additional-info oc-width-1-2">[email protected]</span></li> | ||
<li class="oc-flex"><span class="oc-width-1-2" data-msgid="Type" data-current-language="en_US">Type</span><span class="files-collaborators-collaborator-share-type oc-width-1-2">User</span></li> | ||
</oc-list-stub> | ||
</oc-drop-stub> | ||
</div> | ||
<div class="oc-m-rm oc-flex oc-flex-middle oc-flex-between"> | ||
<div> | ||
<div class="oc-flex oc-flex-nowrap oc-flex-right oc-flex-middle"> | ||
<role-dropdown-stub resource="[object Object]" existingrole="[object Object]" existingpermissions="" domselector="asdf" class="files-collaborators-collaborator-role"></role-dropdown-stub> | ||
</div> | ||
</div> | ||
<div class="oc-flex oc-flex-between oc-flex-middle oc-pl-s"> | ||
<!----> | ||
<edit-dropdown-stub sharecategory="user" data-testid="collaborator-edit" class="files-collaborators-collaborator-edit"></edit-dropdown-stub> | ||
</div> | ||
<div class="oc-resource-indicators oc-text-truncate"> | ||
<router-link-stub to="[object Object]" class="parent-folder oc-text-truncate"><span class="text">via</span> | ||
<oc-icon-stub name="folder-2" size="small" fill-type="line" class="oc-px-xs"></oc-icon-stub> <span class="text oc-text-truncate">folder</span> | ||
</router-link-stub> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="oc-width-1-3 oc-flex oc-flex-nowrap oc-flex-right oc-flex-middle"> | ||
<role-dropdown-stub resource="[object Object]" existingrole="[object Object]" existingpermissions="" domselector="asdf" class="files-collaborators-collaborator-role"></role-dropdown-stub> | ||
<edit-dropdown-stub sharecategory="user" data-testid="collaborator-edit" class="files-collaborators-collaborator-edit"></edit-dropdown-stub> | ||
</div> | ||
</div> | ||
`; |
This file contains 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
This file contains 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
This file contains 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