Skip to content

Commit

Permalink
fix(search): Make search dialog stick to the bottom with sticky
Browse files Browse the repository at this point in the history
`position: absolute` has unwanted drawbacks. `width: 100%` means the
full monitor width there - which breaks the design if the browser is not
in full screen mode - or if you have developer tools open.

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Sep 10, 2024
1 parent 51637cc commit aa97274
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/components/Collective.vue
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ export default {
</script>

<style lang="scss">
.app-content-details {
// Required for search dialog to stick to the bottom
height: 100%;
}
/* Format page title in Page.vue and Version.vue */
.page-title {
position: sticky;
Expand Down
7 changes: 6 additions & 1 deletion src/components/Page/TextEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-->

<template>
<div>
<div class="collectives-text-container">
<WidgetHeading v-if="isLandingPage"
:title="t('collectives', 'Landing page')"
class="text-container-heading" />
Expand Down Expand Up @@ -178,6 +178,11 @@ export default {
</script>
<style lang="scss" scoped>
.collectives-text-container {
// Required for search dialog to stick to the bottom
height: 100%;
}
.text-container-heading {
padding-left: 14px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ $button-gap: calc(var(--default-grid-baseline) * 3);
.search-dialog__container {
width: 100%;
display: flex;
position: absolute;
position: sticky;
align-items: center;
bottom: 0;
background-color: var(--color-main-background);
Expand Down
6 changes: 6 additions & 0 deletions src/css/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@
}

.full-width-view {
// Required for search dialog to stick to the bottom
height: 100%;

--text-editor-max-width: false !important;
max-width: unset;
}

.sheet-view {
// Required for search dialog to stick to the bottom
height: 100%;

--text-editor-max-width: 670px !important;

.landing-page-widgets,
Expand Down

0 comments on commit aa97274

Please sign in to comment.