Skip to content
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

feat: copy repo page PR chart as image #4027

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions pages/s/[org]/[repo]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -575,14 +575,33 @@ export default function RepoPage({ repoData, ogImageUrl }: RepoPageProps) {
className="lg:col-span-6 h-fit"
/>

<PRChart
stats={prStats}
range={range}
velocity={repoStats?.pr_velocity_count ?? 0}
syncId={syncId}
isLoading={isPrDataLoading}
className="lg:col-span-6 h-fit"
/>
<div className="lg:col-span-6 h-fit">
<CopyContainer
onCopyClick={() => {
posthog.capture("Repo Pages: copied PR chart", {
repository: repoData.full_name,
});
}}
options={{
windowWidth: 1700,
allowTaint: true,
onclone: (document, element) => {
element.querySelectorAll("[data-copy-image-branding]").forEach((el) => {
el.classList.remove("hidden");
});
},
}}
>
<CopyImageBranding repository={repoData.full_name} />
<PRChart
stats={prStats}
range={range}
velocity={repoStats?.pr_velocity_count ?? 0}
syncId={syncId}
isLoading={isPrDataLoading}
/>
</CopyContainer>
</div>
</div>
</section>

Expand Down
Loading