From e3b924a046399ac29c7f5f2d6ba3b8c464c6d96f Mon Sep 17 00:00:00 2001 From: sylenien Date: Mon, 24 Oct 2022 16:52:04 +0200 Subject: [PATCH] change(ui): sort and pick events around selected time, add components around picking, allow selecting pick range etc --- .../Session_/BugReport/BugReportModal.tsx | 2 +- .../BugReport/components/Comments.tsx | 6 +- .../BugReport/components/MetaInfo.tsx | 32 ++-- .../BugReport/components/ReportTitle.tsx | 2 +- .../Session_/BugReport/components/Steps.tsx | 125 ++++++---------- .../components/StepsComponents/EventStep.tsx | 37 +++++ .../components/StepsComponents/StepRadius.tsx | 36 +++++ .../StepsComponents/StepRenderer.tsx | 28 ++++ .../components/StepsComponents/XRay.tsx | 141 ++++++++++++++++++ .../components/Session_/BugReport/utils.ts | 28 ++++ .../components/EventRow/EventRow.tsx | 9 +- frontend/app/constants/zindex.ts | 4 +- frontend/app/hooks/useInputState.ts | 8 +- frontend/app/mstore/bugReportStore.ts | 15 +- 14 files changed, 368 insertions(+), 105 deletions(-) create mode 100644 frontend/app/components/Session_/BugReport/components/StepsComponents/EventStep.tsx create mode 100644 frontend/app/components/Session_/BugReport/components/StepsComponents/StepRadius.tsx create mode 100644 frontend/app/components/Session_/BugReport/components/StepsComponents/StepRenderer.tsx create mode 100644 frontend/app/components/Session_/BugReport/components/StepsComponents/XRay.tsx diff --git a/frontend/app/components/Session_/BugReport/BugReportModal.tsx b/frontend/app/components/Session_/BugReport/BugReportModal.tsx index 8c04595c3..adb7ca39c 100644 --- a/frontend/app/components/Session_/BugReport/BugReportModal.tsx +++ b/frontend/app/components/Session_/BugReport/BugReportModal.tsx @@ -69,7 +69,7 @@ function BugReportModal({ hideModal, session, width, height, account, xrayProps } bugReportStore.updateReportDefaults(defaults) - bugReportStore.setSteps(mapEvents(events)) + bugReportStore.setDefaultSteps(mapEvents(events)) return (
{ - if (inputRef.current && bugReportStore.isTitleEdit) { + if (inputRef.current && bugReportStore.isCommentEdit) { inputRef.current?.focus(); } }, [bugReportStore.isCommentEdit]); @@ -26,13 +26,13 @@ function Comments() { return (
- Comments{' '} + Comments
(Optional)
{bugReportStore.isCommentEdit ? (