chore: Enable YearInReview for everyone, include analytics (#13090)
Remove the query param condition and enable it for everyone.
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
import Auth from 'dashboard/api/auth';
|
import Auth from 'dashboard/api/auth';
|
||||||
import { useMapGetter } from 'dashboard/composables/store';
|
import { useMapGetter } from 'dashboard/composables/store';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
@@ -25,7 +24,6 @@ defineOptions({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
|
||||||
const { uiSettings } = useUISettings();
|
const { uiSettings } = useUISettings();
|
||||||
|
|
||||||
const currentUser = useMapGetter('getCurrentUser');
|
const currentUser = useMapGetter('getCurrentUser');
|
||||||
@@ -47,7 +45,7 @@ const isBannerClosed = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const showYearInReviewMenuItem = computed(() => {
|
const showYearInReviewMenuItem = computed(() => {
|
||||||
return route.query['year-in-review'] === 'true' && isBannerClosed.value;
|
return isBannerClosed.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
const openYearInReviewModal = () => {
|
const openYearInReviewModal = () => {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useUISettings } from 'dashboard/composables/useUISettings';
|
import { useUISettings } from 'dashboard/composables/useUISettings';
|
||||||
import { useStoreGetters } from 'dashboard/composables/store';
|
import { useStoreGetters } from 'dashboard/composables/store';
|
||||||
@@ -9,7 +8,6 @@ import Icon from 'dashboard/components-next/icon/Icon.vue';
|
|||||||
|
|
||||||
const yearInReviewBannerImage =
|
const yearInReviewBannerImage =
|
||||||
'/assets/images/dashboard/year-in-review/year-in-review-sidebar.png';
|
'/assets/images/dashboard/year-in-review/year-in-review-sidebar.png';
|
||||||
const route = useRoute();
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { uiSettings, updateUISettings } = useUISettings();
|
const { uiSettings, updateUISettings } = useUISettings();
|
||||||
const getters = useStoreGetters();
|
const getters = useStoreGetters();
|
||||||
@@ -31,10 +29,7 @@ const isBannerClosed = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const shouldShowBanner = computed(
|
const shouldShowBanner = computed(
|
||||||
() =>
|
() => !isBannerClosed.value && !isACustomBrandedInstance.value
|
||||||
route.query['year-in-review'] === 'true' &&
|
|
||||||
!isBannerClosed.value &&
|
|
||||||
!isACustomBrandedInstance.value
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const openModal = () => {
|
const openModal = () => {
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import YearInReviewAPI from 'dashboard/api/yearInReview';
|
|||||||
import { useKeyboardEvents } from 'dashboard/composables/useKeyboardEvents';
|
import { useKeyboardEvents } from 'dashboard/composables/useKeyboardEvents';
|
||||||
import { useUISettings } from 'dashboard/composables/useUISettings';
|
import { useUISettings } from 'dashboard/composables/useUISettings';
|
||||||
import { useStoreGetters } from 'dashboard/composables/store';
|
import { useStoreGetters } from 'dashboard/composables/store';
|
||||||
|
import { useTrack } from 'dashboard/composables';
|
||||||
|
import { YEAR_IN_REVIEW_EVENTS } from 'dashboard/helper/AnalyticsHelper/events';
|
||||||
import IntroSlide from './slides/IntroSlide.vue';
|
import IntroSlide from './slides/IntroSlide.vue';
|
||||||
import ConversationsSlide from './slides/ConversationsSlide.vue';
|
import ConversationsSlide from './slides/ConversationsSlide.vue';
|
||||||
import BusiestDaySlide from './slides/BusiestDaySlide.vue';
|
import BusiestDaySlide from './slides/BusiestDaySlide.vue';
|
||||||
@@ -108,6 +110,7 @@ const fetchYearInReviewData = async () => {
|
|||||||
|
|
||||||
const nextSlide = () => {
|
const nextSlide = () => {
|
||||||
if (currentSlide.value < 4) {
|
if (currentSlide.value < 4) {
|
||||||
|
useTrack(YEAR_IN_REVIEW_EVENTS.NEXT_CLICKED);
|
||||||
if (!hasConversations.value && currentSlide.value === 1) {
|
if (!hasConversations.value && currentSlide.value === 1) {
|
||||||
currentSlide.value = 4;
|
currentSlide.value = 4;
|
||||||
} else {
|
} else {
|
||||||
@@ -141,6 +144,7 @@ const close = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const open = () => {
|
const open = () => {
|
||||||
|
useTrack(YEAR_IN_REVIEW_EVENTS.MODAL_OPENED);
|
||||||
isOpen.value = true;
|
isOpen.value = true;
|
||||||
fetchYearInReviewData();
|
fetchYearInReviewData();
|
||||||
playDrumroll();
|
playDrumroll();
|
||||||
@@ -151,6 +155,7 @@ const currentSlideBackground = computed(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const shareCurrentSlide = async () => {
|
const shareCurrentSlide = async () => {
|
||||||
|
useTrack(YEAR_IN_REVIEW_EVENTS.SHARE_CLICKED);
|
||||||
showShareModal.value = true;
|
showShareModal.value = true;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (shareModalRef.value) {
|
if (shareModalRef.value) {
|
||||||
|
|||||||
@@ -131,3 +131,9 @@ export const LINEAR_EVENTS = Object.freeze({
|
|||||||
LINK_ISSUE: 'Linked a linear issue',
|
LINK_ISSUE: 'Linked a linear issue',
|
||||||
UNLINK_ISSUE: 'Unlinked a linear issue',
|
UNLINK_ISSUE: 'Unlinked a linear issue',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const YEAR_IN_REVIEW_EVENTS = Object.freeze({
|
||||||
|
MODAL_OPENED: 'Year in Review: Modal opened',
|
||||||
|
NEXT_CLICKED: 'Year in Review: Next clicked',
|
||||||
|
SHARE_CLICKED: 'Year in Review: Share clicked',
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user