Skip to content

Commit

Permalink
chore: intend to put v-bind in lower position to main the current att…
Browse files Browse the repository at this point in the history
…ribute selection in vue 2 (individual attributes are always selected over those in v-bind). In vue 3, it depends on the order.

Signed-off-by: DorraJaouad <dorra.jaoued7@gmail.com>
  • Loading branch information
DorraJaouad committed Apr 4, 2024
1 parent 5b870fc commit 3d67844
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 78 deletions.
54 changes: 0 additions & 54 deletions src/assets/missingMaterialDesignIcons/PromotedView.vue

This file was deleted.

3 changes: 1 addition & 2 deletions src/components/BreakoutRoomsEditor/BreakoutRoomsEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
-->

<template>
<NcModal v-bind="$attrs"
:container="container"
<NcModal :container="container"
:class="{'modal-mask__participants-step': isEditingParticipants}"
v-on="$listeners">
<div class="breakout-rooms-editor"
Expand Down
2 changes: 1 addition & 1 deletion src/components/CallView/CallView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@

<!-- Stripe or fullscreen grid depending on `isGrid` -->
<Grid v-if="!isSidebar"
v-bind="$attrs"
:is-stripe="!isGrid"
:is-recording="isRecording"
:token="token"
Expand All @@ -108,6 +107,7 @@
:local-media-model="localMediaModel"
:local-call-participant-model="localCallParticipantModel"
:shared-datas="sharedDatas"
v-bind="$attrs"
@select-video="handleSelectVideo"
@click-local-video="handleClickLocalVideo" />

Expand Down
6 changes: 3 additions & 3 deletions src/components/CallView/shared/VideoVue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@
{{ connectionMessage }}
</div>
<slot v-if="!hideBottomBar" name="bottom-bar">
<VideoBottomBar v-bind="$props"
:has-shadow="hasVideo"
:participant-name="participantName" />
<VideoBottomBar :has-shadow="hasVideo"
:participant-name="participantName"
v-bind="$props" />
</slot>
</div>
</template>
Expand Down
8 changes: 4 additions & 4 deletions src/components/MessagesList/MessagesGroup/Message/Message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
'system' : isSystemMessage,
'combined-system': isCombinedSystemMessage}"
class="message-body">
<MessageBody v-bind="{...$props, ...readInfoProps}"
:rich-parameters="richParameters"
<MessageBody :rich-parameters="richParameters"
:is-deleting="isDeleting"
:has-call="conversation.hasCall" />
:has-call="conversation.hasCall"
v-bind="{...$props, ...readInfoProps}" />

<!-- reactions buttons and popover with details -->
<Reactions v-if="Object.keys(reactions).length"
Expand All @@ -55,13 +55,13 @@
<MessageButtonsBar v-if="showMessageButtonsBar"
ref="messageButtonsBar"
class="message-buttons-bar"
v-bind="{...$props, ...readInfoProps}"
:is-translation-available="isTranslationAvailable"
:is-action-menu-open.sync="isActionMenuOpen"
:is-emoji-picker-open.sync="isEmojiPickerOpen"
:is-reactions-menu-open.sync="isReactionsMenuOpen"
:is-forwarder-open.sync="isForwarderOpen"
:can-react="canReact"
v-bind="{...$props, ...readInfoProps}"
@show-translate-dialog="isTranslateDialogOpen = true"
@reply="handleReply"
@edit="handleEdit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

<template>
<component :is="filePreviewElement"
v-bind="filePreviewBinding"
:tabindex="wrapperTabIndex"
class="file-preview"
:class="{ 'file-preview--viewer-available': isViewerAvailable,
'file-preview--upload-editor': isUploadEditor,
'file-preview--shared-items-grid': isSharedItems && !rowLayout,
'file-preview--row-layout': rowLayout }"
v-bind="filePreviewBinding"
@click.exact="handleClick"
@keydown.enter="handleClick">
<span v-if="!isLoading || fallbackLocalUrl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
<!-- Additional controls -->
<CallButton v-if="showJoinCallButton" />
<Poll v-if="showResultsButton"
v-bind="messageParameters.poll"
:token="token"
show-as-button />
show-as-button
v-bind="messageParameters.poll" />
</div>

<!-- Normal message body content -->
Expand Down
4 changes: 2 additions & 2 deletions src/components/MessagesList/MessagesGroup/MessagesGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
</li>
<Message v-for="(message, index) of messages"
:key="message.id"
v-bind="message"
:token="token"
:is-temporary="message.timestamp === 0"
:next-message-id="(messages[index + 1] && messages[index + 1].id) || nextMessageId"
:previous-message-id="(index > 0 && messages[index - 1].id) || previousMessageId"
:actor-type="actorType"
:actor-id="actorId" />
:actor-id="actorId"
v-bind="message" />
</ul>
</li>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,26 @@
class="messages-group__system">
<ul v-if="messagesCollapsed.messages?.length > 1"
class="messages messages--header">
<Message v-bind="createCombinedSystemMessage(messagesCollapsed)"
:token="token"
<Message :token="token"
is-combined-system-message
:is-combined-system-message-collapsed="messagesCollapsed.collapsed"
:next-message-id="getNextMessageId(messagesCollapsed.messages.at(-1))"
:previous-message-id="getPrevMessageId(messagesCollapsed.messages.at(0))"
:last-collapsed-message-id="messagesCollapsed.lastId"
v-bind="createCombinedSystemMessage(messagesCollapsed)"
@toggle-combined-system-message="toggleCollapsed(messagesCollapsed)" />
</ul>
<ul v-show="messagesCollapsed.messages?.length === 1 || !messagesCollapsed.collapsed"
class="messages"
:class="{'messages--collapsed': messagesCollapsed.messages?.length > 1}">
<Message v-for="message in messagesCollapsed.messages"
:key="message.id"
v-bind="message"
:token="token"
is-collapsed-system-message
:last-collapsed-message-id="messagesCollapsed.lastId"
:next-message-id="getNextMessageId(message)"
:previous-message-id="getPrevMessageId(message)" />
:previous-message-id="getPrevMessageId(message)"
v-bind="message" />
</ul>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/components/NewMessage/NewMessageUploadEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
<template v-for="file in files">
<FilePreview :key="file[1].temporaryMessage.id"
:token="token"
is-upload-editor
v-bind="file[1].temporaryMessage.messageParameters.file"
:is-upload-editor="true"
@remove-file="handleRemoveFileFromSelection" />
</template>
<div :key="'addMore'"
Expand Down
3 changes: 1 addition & 2 deletions src/components/TopBar/TopBarMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ import MicrophoneOff from 'vue-material-design-icons/MicrophoneOff.vue'
import RecordCircle from 'vue-material-design-icons/RecordCircle.vue'
import StopIcon from 'vue-material-design-icons/Stop.vue'
import VideoIcon from 'vue-material-design-icons/Video.vue'
import PromotedView from 'vue-material-design-icons/ViewGallery.vue'
import GridView from 'vue-material-design-icons/ViewGrid.vue'

import { getCapabilities } from '@nextcloud/capabilities'
Expand All @@ -186,8 +187,6 @@ import NcActionSeparator from '@nextcloud/vue/dist/Components/NcActionSeparator.
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'

import PromotedView from '../../assets/missingMaterialDesignIcons/PromotedView.vue'

import { useIsInCall } from '../../composables/useIsInCall.js'
import { CALL, CONVERSATION, PARTICIPANT } from '../../constants.js'
import { useBreakoutRoomsStore } from '../../stores/breakoutRooms.ts'
Expand Down
4 changes: 2 additions & 2 deletions src/components/UIShared/TransitionWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
<template>
<TransitionGroup v-if="group"
class="transition-group"
v-bind="$attrs"
:name="name"
v-bind="$attrs"
v-on="$listeners">
<slot />
</TransitionGroup>
<Transition v-else
v-bind="$attrs"
:name="name"
v-bind="$attrs"
v-on="$listeners">
<slot />
</Transition>
Expand Down

0 comments on commit 3d67844

Please sign in to comment.