Skip to content

Conversation

@Mbeaulne
Copy link
Collaborator

@Mbeaulne Mbeaulne commented Dec 5, 2025

Description

This may be a little much, but I think its pretty cool (and self contained!)

Added a new CopyText component that allows users to copy text to clipboard with visual feedback. Implemented this component in the AppMenu to make the title copyable.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

title.mov (uploaded via Graphite)

before:

Screenshot 2025-12-05 at 1.45.46 PM.png

after:

Screenshot 2025-12-05 at 1.41.04 PM.png

Screenshot 2025-12-05 at 1.42.20 PM.png

Test Instructions

  1. Navigate to any page with a title in the app menu
  2. Hover over the title to see the copy button appear
  3. Click either the title or the copy button to copy the text
  4. Verify the visual feedback (green check mark and brief flash effect)

Additional Comments

The CopyText component provides the following features:

  • Click to copy functionality
  • Visual feedback with a brief flash effect when copied
  • Icon transition between copy and check mark
  • Configurable display of the copy button

Copy link
Collaborator Author

Mbeaulne commented Dec 5, 2025

@Mbeaulne Mbeaulne force-pushed the fix_long_titles branch 3 times, most recently from df184c5 to 00cce07 Compare December 5, 2025 19:25
@Mbeaulne Mbeaulne requested a review from maxy-shpfy December 5, 2025 19:52
@Mbeaulne Mbeaulne mentioned this pull request Dec 5, 2025
8 tasks
import { copyToClipboard } from "@/utils/string";

interface CopyTextProps {
children: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

obviously we only want to copy strings and not jsx elements, but something about children: string instead of children: ReactNode feels weird to me. I won't block on this, but I did want to flag it because it seems somewhat like an antipattern

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Screenshot 2025-12-05 at 4.29.37 PM.png

I think its fine because the result of anything but a string will throw a type error

Copy link
Collaborator

Choose a reason for hiding this comment

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

I did see this also, which is why I'm not blocking. That doesn't make it feel any less weird though 😅

</Text>

<Button
variant={null}
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is a red flag to me. A null variant button? Hmmmm. That suggests to me there's a major gap in our coverage of button styles. I think I'd rather see a new variant added than a custom button made in-place via null

Copy link
Collaborator

@camielvs camielvs left a comment

Choose a reason for hiding this comment

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

Not sure about the null button variant but otherwise LGTM

Copy link
Collaborator Author

Mbeaulne commented Dec 5, 2025

Merge activity

  • Dec 5, 10:00 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Dec 5, 10:01 PM UTC: Graphite rebased this pull request as part of a merge.
  • Dec 5, 10:02 PM UTC: @Mbeaulne merged this pull request with Graphite.

@Mbeaulne Mbeaulne merged commit 75d6880 into master Dec 5, 2025
5 checks passed
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.

4 participants