New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add InspectableTimestampedPointContext to TestEventDetails #9813
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
8ee7b5e
to
7b8a5a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved in general, I'm just not sure why the useMemo
is even needed :)
@@ -62,6 +63,14 @@ function UserActionEventDetails({ | |||
variable | |||
); | |||
|
|||
const context = useMemo( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ is there even any reason to memoize this? Why not just pass value={timeStampedPoint}
directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this is necessary because TimeStampedPoint
has a point
property but InspectableTimestampedPointContext
expects an executionPoint
property.
The objects shown in the
TestEventDetails
panel are from a different point than the one that we seek to when the user clicks on the test step. If the objects contain an HTML element and the user clicks the inspect button on that element (to show it in the Elements panel), we need to seek to that point. This is achieved by adding anInspectableTimestampedPointContext
containing that point toTestEventDetails
.This fixes one of the issues in FE-1962, see this comment.