diff --git a/docs/getting-started/features.md b/docs/getting-started/features.md index ed1dc5912..e2f0f6f8b 100644 --- a/docs/getting-started/features.md +++ b/docs/getting-started/features.md @@ -20,6 +20,12 @@ Components tab shows your components information, including the node tree, state ![components](/features/components.png) +## Timeline + +Timeline tab shows the performance of your app, including the time spent on rendering, updating, and so on. + +![timeline](/features/timeline.png) + ## Assets(Vite only) Assets tab shows your files from the project directory, you can see the information of selected file with some helpful actions. diff --git a/docs/guide/migration.md b/docs/guide/migration.md index 8a9a4ba32..07ae4e439 100644 --- a/docs/guide/migration.md +++ b/docs/guide/migration.md @@ -8,20 +8,11 @@ The v7 version of devtools only supports Vue3. If your application is still usin In v7, we've made some feature-level adjustments compared to v6. You can view the v7 feature overview in the [Features](/getting-started/features). Here, we mainly mention some of the main feature changes. -### Deprecated Features - -Due to high performance costs and potential memory leak risks, we have removed some features in v7. These features are: - -- `Performance` Timeline -- `Component Events` Timeline - -💡 By the way, we are looking for a balanced approach to re-enable it with better performance. You can follow the latest progress [here](https://github.com/vuejs/devtools-next/issues/609). - ### Feature Adjustments -- Timeline Tab +- Plugin Timeline Tab -In v7, we moved the timeline tab to be managed within each plugin's menu. Here is a screenshot of the pinia devtools plugin: +In v7, we moved the plugin timeline tab to be managed within each plugin's menu. Here is a screenshot of the pinia devtools plugin: ![pinia-timeline](/features/pinia-timeline.png) diff --git a/docs/public/features/timeline.png b/docs/public/features/timeline.png new file mode 100644 index 000000000..126d0d89b Binary files /dev/null and b/docs/public/features/timeline.png differ diff --git a/packages/applet/src/components/timeline/index.vue b/packages/applet/src/components/timeline/index.vue index c94db069e..09f30b29f 100644 --- a/packages/applet/src/components/timeline/index.vue +++ b/packages/applet/src/components/timeline/index.vue @@ -12,11 +12,14 @@ import RootStateViewer from '~/components/state/RootStateViewer.vue' import { createExpandedContext } from '~/composables/toggle-expanded' import EventList from './EventList.vue' -const props = defineProps<{ +const props = withDefaults(defineProps<{ layerIds: string[] docLink: string githubRepoLink?: string -}>() + headerVisible?: boolean +}>(), { + headerVisible: true, +}) const { expanded: expandedStateNodes } = createExpandedContext('timeline-state') @@ -92,11 +95,18 @@ rpc.functions.on(DevToolsMessagingEvents.TIMELINE_EVENT_UPDATED, onTimelineEvent onUnmounted(() => { rpc.functions.off(DevToolsMessagingEvents.TIMELINE_EVENT_UPDATED, onTimelineEventUpdated) }) + +defineExpose({ + clear() { + eventList.value = [] + groupList.value.clear() + }, +})