Skip to content

Commit

Permalink
fix(TopBar): migrate to NcPopover
Browse files Browse the repository at this point in the history
Signed-off-by: DorraJaouad <[email protected]>
  • Loading branch information
DorraJaouad authored and backportbot[bot] committed Sep 19, 2024
1 parent 3c8e80d commit 0c3c143
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions src/components/TopBar/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,22 @@
:class="{'description__in-chat' : !isInCall }">
{{ statusMessage }}
</p>
<template v-if="conversation.description">
<p v-tooltip.bottom="{
content: renderedDescription,
delay: { show: 500, hide: 500 },
autoHide: false,
html: true,
}"
class="description"
:class="{'description__in-chat' : !isInCall }">
{{ conversation.description }}
</p>
</template>
<NcPopover v-if="conversation.description"
:focus-trap="false"
:delay="500"
:boundary="boundaryElement"
:popper-triggers="['hover']"
:triggers="['hover']">
<template #trigger="{ attrs }">
<p v-bind="attrs"
class="description"
:class="{'description__in-chat' : !isInCall }">
{{ conversation.description }}
</p>
</template>
<!-- eslint-disable-next-line vue/no-v-html -->
<div class="description__popover" v-html="renderedDescription" />
</NcPopover>
</div>
</a>

Expand Down Expand Up @@ -123,6 +127,7 @@ import { t, n } from '@nextcloud/l10n'
import moment from '@nextcloud/moment'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcPopover from '@nextcloud/vue/dist/Components/NcPopover.js'
import { useIsMobile } from '@nextcloud/vue/dist/Composables/useIsMobile.js'
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js'
import richEditor from '@nextcloud/vue/dist/Mixins/richEditor.js'
Expand All @@ -138,7 +143,6 @@ import ConversationIcon from '../ConversationIcon.vue'
import { useGetParticipants } from '../../composables/useGetParticipants.js'
import { AVATAR, CONVERSATION } from '../../constants.js'
import BrowserStorage from '../../services/BrowserStorage.js'
import { getTalkConfig } from '../../services/CapabilitiesManager.ts'
import { useChatExtrasStore } from '../../stores/chatExtras.js'
import { getStatusMessage } from '../../utils/userStatus.js'
Expand All @@ -159,6 +163,7 @@ export default {
ConversationIcon,
TopBarMediaControls,
NcButton,
NcPopover,
TopBarMenu,
TasksCounter,
ReactionMenu,
Expand Down Expand Up @@ -200,6 +205,7 @@ export default {
data: () => {
return {
showBreakoutRoomsEditor: false,
boundaryElement: document.querySelector('.main-view'),
}
},
Expand Down Expand Up @@ -450,6 +456,12 @@ export default {
}
}
.description__popover {
padding: var(--default-grid-baseline);
width: fit-content;
max-width: 50em;
}
.icon {
display: flex;
}
Expand Down

0 comments on commit 0c3c143

Please sign in to comment.