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

Add click to copy input and output #71

Closed
wants to merge 13 commits into from
Closed

Add click to copy input and output #71

wants to merge 13 commits into from

Conversation

jamesnw
Copy link

@jamesnw jamesnw commented Jul 16, 2024

Original design

image

TODO

  • Add Copy Notification
  • Design

@jamesnw
Copy link
Author

jamesnw commented Jul 16, 2024

Questions for @SondraE -

  • Should we add click to copy for Debug console? This would likely not copy well, and is not in the initial design
  • Should the buttons go to the left or right of the version and "CSS (Compiled)"? Those weren't present in original designs
  • What should the copy notification be? Ideas:
    • Reuse existing copy message banner space, but show "Copy [URL/input/css] to clipboard"
    • Show copy message banners to the left of each button- would need to consider space & position

@SondraE
Copy link

SondraE commented Jul 17, 2024

Should we add click to copy for Debug console? This would likely not copy well, and is not in the initial design

No need

Should the buttons go to the left or right of the version and "CSS (Compiled)"? Those weren't present in original designs

Let's go with the placement of the buttons in the corner of each box as you show above.

What should the copy notification be? Ideas:
Reuse existing copy message banner space, but show "Copy [URL/input/css] to clipboard"
Show copy message banners to the left of each button- would need to consider space & position

When selected, change each copy button to a checkmark for a few seconds. Also add the success message to the existing copy message banner space.

@jamesnw
Copy link
Author

jamesnw commented Jul 18, 2024

Feedback from Natalie on a PR I accidentally opened in the wrong repo 🤦 -

  • Can we make the copy icon color match the text color?
  • Can we add a copy icon to the "Copy URL" button in the upper right, so that that icon is consistently associated with copying everywhere it appears?

@jamesnw jamesnw linked an issue Jul 19, 2024 that may be closed by this pull request
3 tasks
@jamesnw
Copy link
Author

jamesnw commented Jul 19, 2024

@mirisuzanne and @stacyk This is ready for design.

@mirisuzanne mirisuzanne removed their assignment Sep 3, 2024
Copy link

netlify bot commented Sep 5, 2024

Deploy Preview for sass-site-oddbird ready!

Name Link
🔨 Latest commit fd9d982
🔍 Latest deploy log https://app.netlify.com/sites/sass-site-oddbird/deploys/66e09e59ffa9ac0008eb8b99
😎 Deploy Preview https://deploy-preview-71--sass-site-oddbird.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@stacyk stacyk left a comment

Choose a reason for hiding this comment

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

@jamesnw did you want to review this before we send it on?

class="sl-c-button sl-c-button--copy sl-c-button--icon-text">
<div class="sl-c-playground-button--copy--copy">
{%- render 'icons/copy' -%}
</div>
Copy link
Member

Choose a reason for hiding this comment

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

I removed the "Click to Copy" screen reader text here since the icon is paired with actual text in the button that says "button, Copy URL" so it felt unnecessary here.

</div>
<div class="sl-c-playground-button--copy--copied">
{%- render 'icons/circle-check' -%}
<span class="visuallyhidden">URL is Copied</span>
Copy link
Member

Choose a reason for hiding this comment

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

I kept the message here since the state is only shown visually, this message communicates that the URL has been copied.

</div>
<div class="sl-c-playground-button--copy--copied">
{%- render 'icons/circle-check' -%}
<span class="visuallyhidden">Code is Copied</span>
Copy link
Member

Choose a reason for hiding this comment

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

When using the screen reader, it was really hard to distinguish between the Select to "Copy" and the word "Copied" that is read right after. They sounded the exact same to me so I added the "Code is" before the word "Copied".

class="sl-c-button sl-c-button--copy sl-c-button--icon">
<div class="sl-c-playground-button--copy--copy">
{%- render 'icons/copy' -%}
<span class="visuallyhidden">Select to Copy</span>
Copy link
Member

Choose a reason for hiding this comment

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

I updated this to "Select" instead of "click" incase someone is on a touch screen.

@jamesnw jamesnw closed this Sep 10, 2024
@jamesnw
Copy link
Author

jamesnw commented Sep 10, 2024

Moved to sass#1177

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.

Playground- Copy contents
4 participants