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

[stable31] fix: RTL support in call view #14256

Merged
merged 1 commit into from
Jan 30, 2025
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
4 changes: 2 additions & 2 deletions src/components/CallView/CallView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ export default {

<style lang="scss" scoped>
@import '../../assets/variables';
/* stylelint-disable csstools/use-logical */

#call-container {
width: 100%;
height: 100%;
Expand Down Expand Up @@ -867,7 +867,7 @@ export default {

.local-video {
position: absolute;
right: 0;
inset-inline-end: 0;
bottom: 0;
width: 300px;
height: 250px;
Expand Down
48 changes: 28 additions & 20 deletions src/components/CallView/Grid/Grid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
:aria-label="stripeButtonTitle"
@click="handleClickStripeCollapse">
<template #icon>
<ChevronDown v-if="stripeOpen"
<IconChevronDown v-if="stripeOpen"
fill-color="#ffffff"
:size="20" />
<ChevronUp v-else
<IconChevronUp v-else
fill-color="#ffffff"
:size="20" />
</template>
Expand All @@ -29,7 +29,8 @@
:aria-label="t('spreed', 'Previous page of videos')"
@click="handleClickPrevious">
<template #icon>
<ChevronLeft fill-color="#ffffff"
<IconChevronLeft class="bidirectional-icon"
fill-color="#ffffff"
:size="20" />
</template>
</NcButton>
Expand Down Expand Up @@ -90,7 +91,8 @@
:aria-label="t('spreed', 'Next page of videos')"
@click="handleClickNext">
<template #icon>
<ChevronRight fill-color="#ffffff"
<IconChevronRight class="bidirectional-icon"
fill-color="#ffffff"
:size="20" />
</template>
</NcButton>
Expand All @@ -111,7 +113,10 @@
aria-label="Toggle screenshot mode"
@click="screenshotMode = !screenshotMode">
<template #icon>
<ChevronLeft v-if="!screenshotMode" fill-color="#00FF41" :size="20" />
<IconChevronLeft v-if="!screenshotMode"
class="bidirectional-icon"
fill-color="#00FF41"
:size="20" />
</template>
</NcButton>
<div v-if="!screenshotMode" class="dev-mode__data">
Expand Down Expand Up @@ -143,10 +148,10 @@
import debounce from 'debounce'
import { inject, ref } from 'vue'

import ChevronDown from 'vue-material-design-icons/ChevronDown.vue'
import ChevronLeft from 'vue-material-design-icons/ChevronLeft.vue'
import ChevronRight from 'vue-material-design-icons/ChevronRight.vue'
import ChevronUp from 'vue-material-design-icons/ChevronUp.vue'
import IconChevronDown from 'vue-material-design-icons/ChevronDown.vue'
import IconChevronLeft from 'vue-material-design-icons/ChevronLeft.vue'
import IconChevronRight from 'vue-material-design-icons/ChevronRight.vue'
import IconChevronUp from 'vue-material-design-icons/ChevronUp.vue'

import { subscribe, unsubscribe } from '@nextcloud/event-bus'
import { loadState } from '@nextcloud/initial-state'
Expand Down Expand Up @@ -179,10 +184,10 @@ export default {
NcButton,
TransitionWrapper,
VideoBottomBar,
ChevronRight,
ChevronLeft,
ChevronUp,
ChevronDown,
IconChevronDown,
IconChevronLeft,
IconChevronRight,
IconChevronUp,
},

props: {
Expand Down Expand Up @@ -958,7 +963,6 @@ export default {
</script>

<style lang="scss" scoped>
/* stylelint-disable csstools/use-logical */
.grid-main-wrapper {
--navigation-position: calc(var(--default-grid-baseline) * 2);
position: relative;
Expand All @@ -978,7 +982,7 @@ export default {
display: flex;
position: relative;
bottom: 0;
left: 0;
inset-inline-start: 0;
}

.grid {
Expand Down Expand Up @@ -1028,6 +1032,7 @@ export default {

.dev-mode__title {
position: absolute;
/* stylelint-disable-next-line csstools/use-logical */
left: var(--default-clickable-area);
color: #00FF41;
z-index: 100;
Expand All @@ -1040,14 +1045,17 @@ export default {

.dev-mode__toggle {
position: fixed !important;
/* stylelint-disable-next-line csstools/use-logical */
left: 20px;
top: calc(2 * var(--header-height));
}

.dev-mode__data {
direction: ltr;
font-family: monospace;
position: fixed;
color: #00FF41;
/* stylelint-disable-next-line csstools/use-logical */
left: 20px;
top: calc(2 * var(--header-height) + 40px);
padding: 5px;
Expand Down Expand Up @@ -1082,11 +1090,11 @@ export default {
top: calc(50% - var(--default-clickable-area) / 2);

&__previous {
left: calc(var(--default-grid-baseline) * 2);
inset-inline-start: calc(var(--default-grid-baseline) * 2);
}

&__next {
right: calc(var(--default-grid-baseline) * 2);
inset-inline-end: calc(var(--default-grid-baseline) * 2);
}
}

Expand All @@ -1095,19 +1103,19 @@ export default {
top: calc(var(--navigation-position) + var(--grid-gap));

&__previous {
left: var(--navigation-position);
inset-inline-start: var(--navigation-position);
}

&__next {
right: calc(var(--navigation-position) + var(--grid-gap));
inset-inline-end: calc(var(--navigation-position) + var(--grid-gap));
}
}
}

.stripe--collapse {
position: absolute !important;
top: calc(-1 * (var(--default-clickable-area) + var(--navigation-position) / 2));
right: calc(var(--navigation-position) / 2) ;
inset-inline-end: calc(var(--navigation-position) / 2) ;
}

.stripe--collapse,
Expand Down
2 changes: 1 addition & 1 deletion src/components/CallView/shared/LocalAudioControlButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,6 @@ export default {
.popover-hint {
padding: calc(3 * var(--default-grid-baseline));
max-width: 300px;
text-align: left;
text-align: start;
}
</style>
7 changes: 3 additions & 4 deletions src/components/CallView/shared/LocalVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ export default {
</script>

<style lang="scss" scoped>
/* stylelint-disable csstools/use-logical */
.not-connected {
video,
.avatar-container {
Expand Down Expand Up @@ -422,7 +421,7 @@ export default {
.video-loading {
position: absolute;
top: 0;
right: 0;
inset-inline-end: 0;
height: 100%;
width: 100%;
}
Expand Down Expand Up @@ -451,7 +450,7 @@ export default {
height: 100%;
width: 100%;
top: 0;
left: 0;
inset-inline-start: 0;
border-radius: var(--border-radius-element, calc(var(--default-clickable-area) / 2));
}

Expand Down Expand Up @@ -508,7 +507,7 @@ export default {
.presenter-icon__hide {
position: absolute;
color: white;
left: calc(50% - var(--default-clickable-area) / 2);
inset-inline-start: calc(50% - var(--default-clickable-area) / 2);
top: calc(100% - var(--default-grid-baseline) - var(--default-clickable-area));
opacity: 0.7;
background-color: rgba(0, 0, 0, 0.5);
Expand Down
17 changes: 13 additions & 4 deletions src/components/CallView/shared/PresenterOverlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:resizable="false"
:h="presenterOverlaySize"
:w="presenterOverlaySize"
:x="10"
:x="isRTL ? parentWidth - presenterOverlaySize - 10 : 10"
:y="10"
@dragging="isDragging = true"
@dragstop="isDragging = false">
Expand Down Expand Up @@ -50,11 +50,12 @@

<script>

import { ref } from 'vue'
import VueDraggableResizable from 'vue-draggable-resizable'

import AccountBox from 'vue-material-design-icons/AccountBoxOutline.vue'

import { t } from '@nextcloud/l10n'
import { t, isRTL } from '@nextcloud/l10n'

import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'

Expand Down Expand Up @@ -106,6 +107,14 @@ export default {

emits: ['click'],

setup() {
const parentWidth = ref(document.getElementById('videos').getBoundingClientRect().width)
return {
parentWidth,
isRTL,
}
},

data() {
return {
resizeObserver: null,
Expand Down Expand Up @@ -150,10 +159,10 @@ export default {
</script>

<style lang="scss" scoped>
/* stylelint-disable csstools/use-logical */
.presenter-overlay {
position: absolute;
top: 0;
/* stylelint-disable-next-line csstools/use-logical */
left: 0;
}

Expand Down Expand Up @@ -181,7 +190,7 @@ export default {
position: absolute !important;
opacity: .7;
bottom: 48px;
right: 0;
inset-inline-end: 0;

#call-container:hover & {
background-color: rgba(0, 0, 0, 0.1) !important;
Expand Down
5 changes: 2 additions & 3 deletions src/components/CallView/shared/ReactionToaster.vue
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,10 @@ export default {
</script>

<style lang="scss" scoped>
/* stylelint-disable csstools/use-logical */
.toaster {
position: absolute;
bottom: 20px;
left: 0;
inset-inline-start: 0;
display: flex;
flex-direction: column;
gap: 20px;
Expand All @@ -231,7 +230,7 @@ export default {
.toast {
position: absolute;
bottom: 0;
left: var(--horizontal-offset, 0);
inset-inline-start: var(--horizontal-offset, 0);
display: flex;
align-items: center;
gap: 8px;
Expand Down
3 changes: 1 addition & 2 deletions src/components/CallView/shared/Screen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ export default {
</script>

<style lang="scss" scoped>
/* stylelint-disable csstools/use-logical */
.screenContainer {
width: 100%;
height: 100%;
Expand All @@ -215,7 +214,7 @@ export default {
height: 100%;
position: absolute;
top: 0;
left: 0;
inset-inline-start: 0;
&--fit {
object-fit: contain;
}
Expand Down
5 changes: 2 additions & 3 deletions src/components/CallView/shared/VideoBackground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ export default {
</script>

<style lang="scss" scoped>
/* stylelint-disable csstools/use-logical */
.video-background {
position: absolute;
left: 0;
inset-inline-start: 0;
top: 0;
height: 100%;
width: 100%;
Expand All @@ -55,7 +54,7 @@ export default {
width: 100%;
height: 100%;
top: 0;
left: 0;
inset-inline-start: 0;
}
}
</style>
9 changes: 4 additions & 5 deletions src/components/CallView/shared/VideoVue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,6 @@ export default {
</script>

<style lang="scss" scoped>
/* stylelint-disable csstools/use-logical */
.not-connected {
video,
.avatar-container {
Expand Down Expand Up @@ -693,7 +692,7 @@ export default {
& > .dev-mode-video--presenter {
position: absolute;
top: 0;
left: 0;
inset-inline-start: 0;
height: 100%;
width: 100%;
object-fit: cover;
Expand All @@ -704,7 +703,7 @@ export default {
.video-loading {
position: absolute;
top: 0;
right: 0;
inset-inline-end: 0;
height: 100%;
width: 100%;
}
Expand Down Expand Up @@ -742,7 +741,7 @@ export default {
height: 100%;
width: 100%;
top: 0;
left: 0;
inset-inline-start: 0;
border-radius: var(--border-radius-element, calc(var(--default-clickable-area) / 2));
}

Expand All @@ -765,7 +764,7 @@ export default {
.presenter-icon__hide {
position: absolute;
color: white;
left: calc(50% - var(--default-clickable-area) / 2);
inset-inline-start: calc(50% - var(--default-clickable-area) / 2);
top: calc(100% - var(--default-grid-baseline) - var(--default-clickable-area));
opacity: 0.7;
background-color: rgba(0, 0, 0, 0.5);
Expand Down
Loading
Loading