From 5ad32757c12acba5fba9b367f1811ac8b736385c Mon Sep 17 00:00:00 2001 From: Sudheer Salavadi Date: Thu, 3 Apr 2025 16:05:22 -0400 Subject: [PATCH] LongTask UI Improvements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Script name instead of repeating “Long Animation Frame” text. Showing script 2 by default, and + more if there are more scripts 2. Task timeline will use Green, Yellow and Red (<100ms, >100ms, >200ms) respectively. 3. Improved formatting, fonts, etc. --- .../DevTools/LongTaskPanel/LongTaskPanel.tsx | 63 +++++++++++++------ .../shared/DevTools/LongTaskPanel/Script.tsx | 20 +++--- .../DevTools/LongTaskPanel/TaskTimeline.tsx | 31 +++++---- 3 files changed, 71 insertions(+), 43 deletions(-) diff --git a/frontend/app/components/shared/DevTools/LongTaskPanel/LongTaskPanel.tsx b/frontend/app/components/shared/DevTools/LongTaskPanel/LongTaskPanel.tsx index 5c0a0dab6..09b052e06 100644 --- a/frontend/app/components/shared/DevTools/LongTaskPanel/LongTaskPanel.tsx +++ b/frontend/app/components/shared/DevTools/LongTaskPanel/LongTaskPanel.tsx @@ -1,13 +1,14 @@ import React from 'react'; import { observer } from 'mobx-react-lite'; import { useTranslation } from 'react-i18next'; -import { Input } from 'antd'; +import { Input, Tag } from 'antd'; import { VList, VListHandle } from 'virtua'; import { PlayerContext } from 'App/components/Session/playerContext'; import JumpButton from '../JumpButton'; import { useRegExListFilterMemo } from '../useListFilter'; import BottomBlock from '../BottomBlock'; -import { NoContent, Icon } from 'UI'; +import { NoContent, Icon, TagBadge } from 'UI'; +import { Hourglass } from 'lucide-react'; import { InfoCircleOutlined } from '@ant-design/icons'; import { mockData } from './__mock'; import { Segmented } from 'antd'; @@ -140,22 +141,24 @@ function LongTaskRow({ className={'mt-1'} /> -
+
{expanded ? ( <> -
-
First UI event timestamp:
-
{task.firstUIEventTimestamp.toFixed(2)} ms
+
+
First UI event timestamp:
+
{task.firstUIEventTimestamp.toFixed(2)} ms
-
Scripts:
-
- {task.scripts.map((script, index) => ( -