Skip to content

Commit

Permalink
fix: set mainContainerSelector to 'body'
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Sep 19, 2024
1 parent d922845 commit a37fbf0
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 13 deletions.
18 changes: 18 additions & 0 deletions src/FilesSidebarTabApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,24 @@ export default {
}
</script>

<style>
/* FIXME: remove after https://github.com/nextcloud-libraries/nextcloud-vue/pull/4959 is released */
body .modal-wrapper * {
box-sizing: border-box;
}
/* FIXME: Align styles of NcModal header with NcDialog header. Remove if all are migrated */
body .modal-wrapper h2.nc-dialog-alike-header {
font-size: 21px;
text-align: center;
height: fit-content;
min-height: var(--default-clickable-area);
line-height: var(--default-clickable-area);
overflow-wrap: break-word;
margin-block: 0 12px;
}
</style>

<style scoped>
.talkChatTab {
height: 100%;
Expand Down
5 changes: 5 additions & 0 deletions src/PublicShareAuthSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ export default {
#talk-sidebar *::after {
box-sizing: border-box;
}
/* FIXME: remove after https://github.com/nextcloud-libraries/nextcloud-vue/pull/4959 is released */
body .modal-wrapper * {
box-sizing: border-box;
}
</style>

<style lang="scss" scoped>
Expand Down
7 changes: 7 additions & 0 deletions src/PublicShareSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,13 @@ export default {
}
</script>

<style>
/* FIXME: remove after https://github.com/nextcloud-libraries/nextcloud-vue/pull/4959 is released */
body .modal-wrapper * {
box-sizing: border-box;
}
</style>

<style lang="scss" scoped>
/* Properties based on the app-sidebar */
#talk-sidebar {
Expand Down
7 changes: 7 additions & 0 deletions src/Recording.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ export default {
}
</script>

<style>
/* FIXME: remove after https://github.com/nextcloud-libraries/nextcloud-vue/pull/4959 is released */
body .modal-wrapper * {
box-sizing: border-box;
}
</style>

<style lang="scss" scoped>
/* The CallView descendants expect border-box to be set, as in the normal UI the
* CallView is a descendant of NcContent, which applies the border-box to all
Expand Down
4 changes: 2 additions & 2 deletions src/components/BreakoutRoomsEditor/SendMessageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-->

<template>
<NcDialog ref="modal"
<NcDialog ref="dialog"
:name="dialogTitle"
:container="container"
close-on-click-outside
Expand Down Expand Up @@ -91,7 +91,7 @@ export default {
mounted() {
// Postpone render of NewMessage until modal container is mounted
this.modalContainerId = `#modal-description-${this.$refs.modal.navigationId}`
this.modalContainerId = '#' + this.$refs.dialog.$el.querySelector('.modal-container')?.id
this.$nextTick(() => {
this.$refs.newMessage.focusInput()
})
Expand Down
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ Vue.use(VueRouter)

const pinia = createPinia()

TooltipOptions.container = '#content-vue'
store.dispatch('setMainContainerSelector', '#content-vue')
TooltipOptions.container = 'body'
store.dispatch('setMainContainerSelector', 'body')

const instance = new Vue({
el: '#content',
Expand Down
2 changes: 1 addition & 1 deletion src/mainFilesSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Vue.use(Vuex)

const pinia = createPinia()

store.dispatch('setMainContainerSelector', '.talkChatTab')
store.dispatch('setMainContainerSelector', 'body')

const newCallView = () => new Vue({
store,
Expand Down
2 changes: 1 addition & 1 deletion src/mainPublicShareAuthSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Vue.use(PiniaVuePlugin)
Vue.use(Vuex)

const pinia = createPinia()
store.dispatch('setMainContainerSelector', '#talk-sidebar')
store.dispatch('setMainContainerSelector', 'body')

/**
* Wraps all the body contents in its own container.
Expand Down
2 changes: 1 addition & 1 deletion src/mainPublicShareSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Vue.use(Vuex)

const pinia = createPinia()

store.dispatch('setMainContainerSelector', '#talk-sidebar')
store.dispatch('setMainContainerSelector', 'body')

/**
*
Expand Down
4 changes: 2 additions & 2 deletions src/mainRecording.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Vue.use(VueRouter)

const pinia = createPinia()

TooltipOptions.container = '#call-container'
store.dispatch('setMainContainerSelector', '#call-container')
TooltipOptions.container = 'body'
store.dispatch('setMainContainerSelector', 'body')

window.store = store

Expand Down
5 changes: 1 addition & 4 deletions src/store/uiModeStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { useDocumentFullscreen } from '../composables/useDocumentFullscreen.ts'

/**
* This store handles the values that need to be customized depending on the
* current UI mode of Talk (main UI, embedded in Files sidebar, video
Expand All @@ -17,8 +15,7 @@ const state = {

const getters = {
getMainContainerSelector: (state, getters, rootState, rootGetters) => () => {
const isFullscreen = useDocumentFullscreen()
return isFullscreen.value ? state.mainContainerSelector : 'body'
return state.mainContainerSelector
},
}

Expand Down

0 comments on commit a37fbf0

Please sign in to comment.