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

Copy button component #172

Merged
merged 8 commits into from
May 5, 2022
Merged

Copy button component #172

merged 8 commits into from
May 5, 2022

Conversation

pomber
Copy link
Contributor

@pomber pomber commented May 4, 2022

Fix #138

📦 Published PR as canary version: 0.5.0--canary.172.d21f95c.0

✨ Test out this PR locally via:

npm install @code-hike/mdx@0.5.0--canary.172.d21f95c.0
# or 
yarn add @code-hike/mdx@0.5.0--canary.172.d21f95c.0

Version

Published prerelease version: v0.5.0-next.1

Changelog

🚀 Enhancement

🐛 Bug Fix

Authors: 1

@pomber pomber added minor release PR created automatically for new releases labels May 4, 2022
@vercel
Copy link

vercel bot commented May 4, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
chtest ✅ Ready (Inspect) Visit Preview May 5, 2022 at 0:24AM (UTC)

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2022

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

Three Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/just-code 30.38 KB 101.82 KB 29.09% (🟡 +0.16%)
/scrollycoding-preview 33.47 KB 104.9 KB 29.97% (🟡 +0.16%)
/spotlight 30.96 KB 102.39 KB 29.25% (🟡 +0.17%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@pomber
Copy link
Contributor Author

pomber commented May 4, 2022

Hover copy button:

.ch-codeblock .ch-copy-button {
  display: none;
}

.ch-codeblock:hover .ch-copy-button {
  display: block;
}

@github-actions
Copy link
Contributor

🚀 PR was released in v0.5.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release PR created automatically for new releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Copy button
1 participant