-
Notifications
You must be signed in to change notification settings - Fork 24
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 "Copy to Clipboard" option for "Unsaved Draft" #2352
Comments
Here's the PR! #2368.⚡ Sweep Basic Tier: I'm creating this ticket using GPT-4. You have 3 GPT-4 tickets left for the month and 1 for the day. For more GPT-4 tickets, visit our payment portal.
Actions (click)
Install Sweep Configs: Pull Request
Step 1: 🔎 SearchingI found the following snippets in your repository. I will now analyze these snippets and come up with a plan. Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description.squiggle/packages/website/theme.config.tsx Lines 1 to 55 in 13b14b8
squiggle/packages/components/README.md Lines 1 to 55 in 13b14b8
squiggle/packages/hub/src/app/about/page.tsx Lines 8 to 74 in 13b14b8
I also found the following external resources that might be helpful:Summaries of links found in the content: Step 2: ⌨️ Coding
Modify packages/components/src/components/SquiggleEditor.tsx with contents:
Modify packages/components/src/components/SquiggleEditor.tsx with contents: Remove the duplicate calls to `useUncontrolledCode` hook. There should only be one call to this hook in the `SquiggleEditor` component. Also, ensure that the `useClipboard` hook is properly imported from 'react-use' and used correctly to copy the code to the clipboard when the "Copy to Clipboard" button is clicked.
Modify packages/components/src/components/SquiggleEditor.tsx with contents: Remove the first return statement in the `SquiggleEditor` component. This return statement is a duplicate and is not valid in JavaScript. The component should only have one return statement that returns the JSX to be rendered.
Step 3: 🔁 Code ReviewHere are my self-reviews of my changes at Here is the 1st review Thank you for your contribution. However, there are a few changes that need to be made before this PR is ready: I finished incorporating these changes. 🎉 Latest improvements to Sweep:
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. |
Note: You'll need to edit SquiggleSnippetDraftDialog.tsx |
Description of suggestion or shortcoming:
There have been instances where my code breaks the editor, but I still want to get it to edit it and similar.
Checklist
packages/components/src/components/SquiggleEditor.tsx
✓ 4b74c7cpackages/components/src/components/SquiggleEditor.tsx
✗packages/components/src/components/SquiggleEditor.tsx
✓ 31cdd7dpackages/components/src/components/SquiggleEditor.tsx
✗packages/components/src/components/SquiggleEditor.tsx
✓ ef2ad6dpackages/components/src/components/SquiggleEditor.tsx
✗packages/components/src/components/SquiggleEditor.tsx
✗packages/components/src/components/SquiggleEditor.tsx
✗The text was updated successfully, but these errors were encountered: