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

[full-ci] Fix: Sharing Panel - Show label instead of description #7364

Merged
merged 8 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@
/>
</div>
<div v-else-if="share.role">
<span class="oc-mr-xs" v-text="share.role.label" />
<span
v-oc-tooltip="share.role.description(false)"
class="oc-mr-xs"
v-text="share.role.label"
/>
</div>
</div>
<div class="oc-flex oc-flex-between oc-flex-middle oc-pl-s">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
class="edit-public-link-role-dropdown-toggl oc-text-left"
gap-size="none"
>
<span class="oc-invisible-sr" v-text="currentLinkRoleLabel" />
<span v-text="visibilityHint" />
<span v-text="currentLinkRoleLabel" />
<oc-icon name="arrow-down-s" />
</oc-button>
<oc-drop
Expand Down Expand Up @@ -56,8 +55,7 @@
</oc-drop>
</div>
<p v-else class="oc-my-rm">
<span class="oc-invisible-sr" v-text="currentLinkRoleLabel" />
<span v-text="visibilityHint" />
<span v-oc-tooltip="currentLinkRoleDescription" v-text="currentLinkRoleLabel" />
</p>
<div :class="{ 'oc-pr-s': !isModifiable }" class="details-buttons">
<oc-button
Expand Down Expand Up @@ -187,7 +185,7 @@ export default {
}
},
computed: {
visibilityHint() {
currentLinkRoleDescription() {
return LinkShareRoles.getByBitmask(
parseInt(this.link.permissions),
this.isFolderShare
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`DetailsAndEdit component if user can edit renders dropdown and edit button 1`] = `
<div class="link-details oc-flex oc-flex-between oc-flex-middle oc-pl-s">
<div>
<oc-button-stub id="edit-public-link-role-dropdown-toggl-undefined" appearance="raw" gap-size="none" class="edit-public-link-role-dropdown-toggl oc-text-left"><span class="oc-invisible-sr">Viewer</span> <span>Recipients can view and download contents.</span>
<oc-button-stub id="edit-public-link-role-dropdown-toggl-undefined" appearance="raw" gap-size="none" class="edit-public-link-role-dropdown-toggl oc-text-left"><span>Viewer</span>
<oc-icon-stub name="arrow-down-s"></oc-icon-stub>
</oc-button-stub>
<oc-drop-stub drop-id="edit-public-link-role-dropdown" toggle="#edit-public-link-role-dropdown-toggl-undefined" padding-size="remove" mode="click">
Expand Down Expand Up @@ -52,7 +52,7 @@ exports[`DetailsAndEdit component if user can edit renders dropdown and edit but

exports[`DetailsAndEdit component if user can not edit does not render dropdown or edit button 1`] = `
<div class="link-details oc-flex oc-flex-between oc-flex-middle oc-pl-s">
<p class="oc-my-rm"><span class="oc-invisible-sr">Viewer</span> <span>Recipients can view and download contents.</span></p>
<p class="oc-my-rm"><span>Viewer</span></p>
<div class="details-buttons oc-pr-s">
<!---->
<!---->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ function getWrapper() {
currentRoute: createLocationSpaces('files-spaces-projects'),
resolve: (r) => {
return { href: r.name }
}
},
push: jest.fn()
},
$gettext: jest.fn()
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ function getMountedWrapper({ propsData = {} } = {}) {
propsData: {
groups: [],
selectedGroups: [],
headerPosition: 0,
...propsData
},
stubs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function getWrapper({ propsData = {} } = {}) {
propsData: {
users: [],
selectedUsers: [],
headerPosition: 0,
...propsData
},
stubs: {
Expand Down