Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -5,8 +5,10 @@
}`"
class="p-2 bg-role-surface-container rounded-xl"
>
<div class="w-full grid grid-cols-2 items-center files-collaborators-collaborator-details">
<div class="flex items-center">
<div
class="w-full grid grid-cols-[1fr_auto] items-center files-collaborators-collaborator-details"
>
<div class="flex items-center min-w-0">
<div>
<user-avatar
v-if="isAnyUserShareType"
Expand All @@ -23,9 +25,13 @@
class="files-collaborators-collaborator-indicator"
/>
</div>
<div class="files-collaborators-collaborator-name-wrapper pl-2 max-w-full">
<div class="files-collaborators-collaborator-name-wrapper pl-2 max-w-full min-w-0">
<div class="truncate">
<span aria-hidden="true" class="files-collaborators-collaborator-name">
<span
:title="shareDisplayName"
aria-hidden="true"
class="files-collaborators-collaborator-name"
>
<oc-filter-highlight :text="shareDisplayName" :term="filterTerm" />
</span>
<span class="sr-only" v-text="screenreaderShareDisplayName" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ describe('Collaborator ListItem component', () => {
const { wrapper } = createWrapper({ share })
expect(wrapper.find(selectors.collaboratorName).text()).toEqual(share.sharedWith.displayName)
})
it('shows the full collaborator display name as title', () => {
const share = getShareMock({
sharedWith: { id: '3', displayName: 'Albert Einstein with a very long display name' }
})
const { wrapper } = createWrapper({ share })
expect(wrapper.find(selectors.collaboratorName).attributes('title')).toEqual(
share.sharedWith.displayName
)
})
it('shows the share expiration date if given', () => {
const { wrapper } = createWrapper({
share: getShareMock({ expirationDateTime: '2000-01-01' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

exports[`Collaborator ListItem component > share inheritance indicators > show when sharedParentRoute is given 1`] = `
"<div data-testid="collaborator-user-item-einstein" class="p-2 bg-role-surface-container rounded-xl">
<div class="w-full grid grid-cols-2 items-center files-collaborators-collaborator-details">
<div class="flex items-center">
<div class="w-full grid grid-cols-[1fr_auto] items-center files-collaborators-collaborator-details">
<div class="flex items-center min-w-0">
<div>
<user-avatar-stub userid="3" username="einstein" width="36" class="files-collaborators-collaborator-indicator"></user-avatar-stub>
</div>
<div class="files-collaborators-collaborator-name-wrapper pl-2 max-w-full">
<div class="truncate"><span aria-hidden="true" class="files-collaborators-collaborator-name"><span class="oc-filter-highlight">einstein</span></span> <span class="sr-only">Share receiver name: einstein</span>
<div class="files-collaborators-collaborator-name-wrapper pl-2 max-w-full min-w-0">
<div class="truncate"><span title="einstein" aria-hidden="true" class="files-collaborators-collaborator-name"><span class="oc-filter-highlight">einstein</span></span> <span class="sr-only">Share receiver name: einstein</span>
<!--v-if-->
</div>
<div>
Expand Down
Loading