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

[stable24] Fix modal heights #2314

Merged
merged 2 commits into from
Apr 19, 2022
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 js/editor-collab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor-collab.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/editor-rich.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor-rich.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/files-modal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/files-modal.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/components/EditorWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ export default {
max-width: 100%;
height: 100%;
left: 0;
top: 50px;
margin: 0 auto;
position: relative;
background-color: var(--color-main-background);
Expand Down
17 changes: 3 additions & 14 deletions src/components/HelpModal.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<Modal size="large"
<Modal size="normal"
:title="t('text', 'Formatting help')"
@close="$emit('close')">
<h2>{{ t('text', 'Formatting help') }}</h2>
Expand Down Expand Up @@ -204,26 +204,15 @@ export default {

<style lang="scss" scoped>
::v-deep .modal-wrapper {
// TODO: can be removed once migrated to @nextcloud-vue >= 5.0
.prev, .next {
display: none !important;
}

.modal-container {
// TODO: can be removed once migrated to @nextcloud-vue >= 5.0
overflow: auto;
// Diverge from upstream modal styling
padding: 30px 40px 20px;
user-select: text;
}

// TODO: can be removed once migrated to @nextcloud-vue >= 5.0
// Make modal full screen on mobile
// Remove padding-right on mobile, screen might not be wide enough
@media only screen and (max-width: 512px) {
.modal-container {
position: absolute;
top: var(--header-height);
height: calc(100% - var(--header-height));
padding: 30px 0px 20px 40px;
}
}
}
Expand Down
12 changes: 9 additions & 3 deletions src/components/ViewerComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,15 @@ export default {
},
}
</script>
<style>
<style lang="scss">
#editor-container {
height: calc(100% - 50px);
top: 50px;
top: var(--header-height);
}

@media only screen and (max-width: 512px) {
// on mobile, modal-container has top: 50px
#editor-container {
top: auto;
}
}
</style>