Skip to content

Commit

Permalink
add Sentry error
Browse files Browse the repository at this point in the history
clean up css and components from unnecessary class
  • Loading branch information
misterpekert committed Oct 24, 2023
1 parent b3a5fcd commit f42bfe4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
8 changes: 0 additions & 8 deletions assets/css/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,3 @@ label {
font-size: 1.8rem;
}
}

.modal-above-fade {
// We can't get this quite how we'd like. We'd like these ads to appear above the modal fade, and below the modal content.
// But we can't do that, because of the way that position: fixed locks the z-index of the children. That means the
// effective z-index of the fade and the modal contents is the same. So we do this, which will occasionally overlap
// the modal contents in an annoying way. It would be nice to figure out something better.
//z-index: 1056 !important;
}
10 changes: 4 additions & 6 deletions components/ExternalDa.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
</div>
</template>
<script setup>
import * as Sentry from '@sentry/vue';
import { nextTick } from 'vue'
import { useMiscStore } from '../stores/misc'
import { ref, computed, onBeforeUnmount } from '#imports'
Expand Down Expand Up @@ -136,12 +137,9 @@ async function visibilityChanged(visible) {
}, 45000)
}
}).addEventListener("slotVisibilityChanged", (event) => {
const slot = event.slot;
console.group("Visibility of slot", slot.getSlotElementId(), "changed.");
// Log details of the event.
console.log("Visible area:", `${event.inViewPercentage}%`);
console.groupEnd();
if (event.inViewPercentage < 51) {
Sentry.captureMessage(`Visibility of slot ${event.slot.getSlotElementId()} changed. New visibility: ${event.inViewPercentage}%.Viewport size: ${window.innerWidth}x${window.innerHeight}`);
}
});
window.googletag.enableServices()
Expand Down
4 changes: 2 additions & 2 deletions pages/browse/[[term]].vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<b-col cols="0" lg="3" class="p-0 pr-1">
<VisibleWhen
:not="['xs', 'sm', 'md', 'lg']"
class="position-fixed modal-above-fade"
class="position-fixed"
style="width: 300px"
>
<ExternalDa
Expand Down Expand Up @@ -111,7 +111,7 @@
<div class="d-flex justify-content-end">
<VisibleWhen
:not="['xs', 'sm', 'md', 'lg']"
class="position-fixed modal-above-fade"
class="position-fixed"
style="right: 5px"
>
<ExternalDa
Expand Down
4 changes: 2 additions & 2 deletions pages/message/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<b-col cols="0" xl="3" class="d-none d-xl-block">
<VisibleWhen
:not="['xs', 'sm', 'md', 'lg']"
class="position-fixed modal-above-fade"
class="position-fixed"
style="width: 300px"
>
<ExternalDa
Expand Down Expand Up @@ -96,7 +96,7 @@
<b-col cols="0" xl="3" class="d-none d-xl-block">
<VisibleWhen
:not="['xs', 'sm', 'md', 'lg']"
class="position-fixed modal-above-fade"
class="position-fixed"
style="width: 300px"
>
<ExternalDa
Expand Down
4 changes: 2 additions & 2 deletions pages/myposts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<b-col cols="0" lg="3" class="p-0 pr-1">
<VisibleWhen
:not="['xs', 'sm', 'md', 'lg']"
class="position-fixed modal-above-fade"
class="position-fixed"
style="width: 300px"
>
<ExternalDa
Expand Down Expand Up @@ -67,7 +67,7 @@
<b-col cols="0" lg="3" class="p-0 pl-1">
<VisibleWhen
:not="['xs', 'sm', 'md', 'lg']"
class="position-fixed modal-above-fade"
class="position-fixed"
style="right: 5px"
>
<ExternalDa
Expand Down

0 comments on commit f42bfe4

Please sign in to comment.