-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tracing): skeleton and reactivity fix (#1828)
* feat(tracing): skeleton and reactivity fix * fix: address comments
- Loading branch information
1 parent
aeae683
commit c9f624a
Showing
6 changed files
with
139 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,33 @@ | ||
<template> | ||
<KCard | ||
class="controls" | ||
title="Controls" | ||
> | ||
<KInputSwitch | ||
v-model="showSkeleton" | ||
label="Skeleton" | ||
/> | ||
</KCard> | ||
|
||
<WaterfallView | ||
v-for="(root, i) in spanRoots" | ||
:key="i" | ||
:root-span="root" | ||
:show-skeleton="showSkeleton" | ||
/> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed } from 'vue' | ||
import { computed, ref } from 'vue' | ||
import { buildSpanTrees, WaterfallView } from '../../src' | ||
import rawSpans from '../fixtures/spans.json' | ||
const showSkeleton = ref(false) | ||
const spanRoots = computed(() => buildSpanTrees(rawSpans)) | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.controls { | ||
margin-bottom: 16px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { Ref } from 'vue' | ||
|
||
/** | ||
* MarkReactiveInputRefs is a utility type that selectively wraps some properties in U of T with | ||
* `Ref<...>` to make `reactive(...)` accept refs for those properties, without modifying the original | ||
* shape. | ||
*/ | ||
export type MarkReactiveInputRefs<T, U extends keyof T> = { [P in U]: Ref<T[P]> } & Omit<T, U> |