-
Notifications
You must be signed in to change notification settings - Fork 1.2k
chore: option for disabling the "New code pasted" warning #5941
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
Conversation
👷 Deploy request for remixproject pending review.Visit the deploys page to approve it
|
@gap-editor build is failing |
will work on it on this week |
I am going to finish my work this week. Sorry for delay |
Hey! The failing tests don’t seem related to this PR — the errors are coming from GitHub auth steps and build memory issues. This PR doesn’t touch anything related to GitHub integration or build config. |
@gap-editor pls check the lint
|
I have modified the libs/remix-ui/editor/src/lib/remix-ui-editor.tsx file.
I've added:
A state variable showPasteWarning that checks localStorage when the component mounts to see if the user has previously chosen to hide the warning.
A checkbox labeled "Do not show this warning again" within the "New code pasted" modal.
Logic within the modal's close functions (okFn and cancelFn) to save the preference to localStorage if the checkbox is checked when the modal is dismissed.
Now, when you paste more than 10 lines of code, the warning modal will appear with the new checkbox. If you check it and close the modal (either via "Close" or "Ask RemixAI"), the warning should not appear again in future sessions.