-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
ref: Merge ReplayClipPreviewWrapper into GroupReplaysTableInner where its used #87818
Conversation
… its used
pageLinks={pageLinks} | ||
visibleColumns={visibleColumns(allMobileProj)} |
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.
two unused props are gone now
const replayReaderData = useLoadReplayReader({ | ||
orgSlug: props.orgSlug, | ||
replaySlug: props.replaySlug, | ||
group: props.group, | ||
}); |
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.
We were already calling useLoadReplayReader
from groupReplays.tsx
, so this is redundant (caching helps with the fetches... but while constructing the Class we did a bunch of redundant processing and memoizing too)
type Props = { | ||
group: Group; | ||
orgSlug: string; | ||
pageLinks: string | null; | ||
replaySlug: string; | ||
replays: ReplayListRecord[] | undefined; | ||
selectedReplayIndex: number; | ||
setSelectedReplayIndex: (index: number) => void; | ||
visibleColumns: ReplayColumn[]; | ||
overlayContent?: React.ReactNode; | ||
}; |
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.
Not all of these props were used. So they also came out of the parent components in groupReplays.tsx
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.
This was only imported from groupReplays.tsx, so safe to delete.
… its used (#87818) Before we had: `<GroupReplaysTableInner>` with a child of `<ReplayClipPreviewWrapper>`. The Wrapper would then unconditionally render `<ReplayClipPreviewPlayer>` as it's child. These components render replay clips inside the Issues Details > Replays tab. Users can watch clips from all events within an issue. The names are each a bit confusing, and more-so because the component in the middle of the stack, `<ReplayClipPreviewWrapper>` didn't really have a strong job to do. It mostly proxied props down through the layers. This PR removes `<ReplayClipPreviewWrapper>`. Now `<GroupReplaysTableInner>` includes `<ReplayClipPreviewPlayer>` as it's direct child. The wrapper component is removed from the codebase as this was the only callsite. Also some props were required by the Wrapper, but never used by the PreviewPlayer, so I cleaned up those unused fields.
Before we had:
<GroupReplaysTableInner>
with a child of<ReplayClipPreviewWrapper>
. The Wrapper would then unconditionally render<ReplayClipPreviewPlayer>
as it's child.These components render replay clips inside the Issues Details > Replays tab. Users can watch clips from all events within an issue.
The names are each a bit confusing, and more-so because the component in the middle of the stack,
<ReplayClipPreviewWrapper>
didn't really have a strong job to do. It mostly proxied props down through the layers.This PR removes
<ReplayClipPreviewWrapper>
. Now<GroupReplaysTableInner>
includes<ReplayClipPreviewPlayer>
as it's direct child. The wrapper component is removed from the codebase as this was the only callsite. Also some props were required by the Wrapper, but never used by the PreviewPlayer, so I cleaned up those unused fields.