Skip to content

Conversation

@clicktodev
Copy link
Contributor

@clicktodev clicktodev commented Sep 2, 2025

Why:

Closes: #4779

What's being changed (if available, include any code snippets, screenshots, or gifs):

Adjust the layout of the CopyPage component within ClientWrapper for better alignment.
Add copilot link.
Introduce a new CopyCheckIcon to provide visual feedback when content is copied.
Use link component directly for better a11y.
Add open and close animations
Change copy icon to markdown icon in list item

image
Screen.Recording.2025-09-11.at.11.19.24.AM.mp4

Check off the following:

  • I have reviewed my changes in staging, available via the View
    deployment
    link in this PR's timeline (this link will be available after
    opening the PR).

@changeset-bot
Copy link

changeset-bot bot commented Sep 2, 2025

⚠️ No Changeset found

Latest commit: 7976d82

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Sep 2, 2025

@clicktodev is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Sep 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
nextra Error Error Sep 22, 2025 8:23am
nextra-v2 Error Error Sep 22, 2025 8:23am

@clicktodev
Copy link
Contributor Author

@dimaMachina

@clicktodev clicktodev changed the title Enhance CopyPage layout and functionality Enhance CopyPage layout and functionality + Copilot link Sep 18, 2025
Copy link
Collaborator

@dimaMachina dimaMachina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer keep Copied text after clicking (we need fixed with for button), also now there is a gap of unused space
image

@clicktodev
Copy link
Contributor Author

clicktodev commented Sep 22, 2025

it's usually best to keep the button label the same and just change the icon to indicate the action state (loading, success).
also changing the button label causes content shift as you can see in the linked issue.

the open ai docs don't change the text as well which helps avoid button resize and potential content shift.
image

same with shadcn docs
image

the openai docs implement the button on the same line as the page title with flex wrap which works pretty nicely.

@clicktodev
Copy link
Contributor Author

I personally don't mind the extra space, we can use it as a command bar for more tools in the future.
I also think it makes sense to separate it since it's not part of the md content.

or we can put the copy button on the right above the toc component when it's rendered.
when the toc component isn't rendered, then we fallback to the current render position on top of the page title.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy button pushes centered page titles to the left

2 participants