-
Notifications
You must be signed in to change notification settings - Fork 213
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
(#757) Allow Users to Manually Edit the Generated Email in Cold Email Generator App #765
Conversation
Allow users to manually edit the generated email
👋 Thank you for opening this pull request! We're excited to review your contribution. Please give us a moment, and we'll get back to you shortly! Feel free to join our community on Discord to discuss more! |
with col3: | ||
if st.button("Copy to Clipboard"): | ||
st.markdown(f"<script>navigator.clipboard.writeText(`{edited_email}`);</script>") | ||
st.success("Email copied to clipboard!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try adding a few seconds of delay before the message disappears in the event of "Copy to Clipboard". Otherwise looks good. Update this and I will approve the PR. Thank you.
with col2: | ||
if st.button("Download Email"): | ||
# Save the email as a text file for download | ||
st.download_button("Download Email", edited_email, file_name="email.txt", mime="text/plain") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just make a few checks, there are some issues when downloading email (no .txt file is saved) but the code is fine no improvement required.
@ruhi47 Change request implemented, please review and merge . |
6a1fc16
to
331cbb0
Compare
Resolved the issues with the 'Save Draft', 'Copy to Clipboard', and 'Download' buttons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Allow users to manually edit the generated email
Pull Request for PyVerse 💡
Requesting to submit a pull request to the PyVerse repository.
Issue Title
Allow Users to Manually Edit the Generated Email in Cold Email Generator App
Info about the Related Issue
This pull request aims to enhance the Cold Email Generator app by allowing users to manually edit the generated email and providing multiple options for further actions. These actions include saving the email as a draft, downloading it as a .txt file, and copying it to the clipboard.
Name
SHREYAS SHRENIK PARAJ PATIL
GitHub ID
@shreyasparaj
Email ID
shreyasparaj1@gmail.com
Identify Yourself
GSSOC CONTRIBUTOR
Closes
Closes: #757
Describe the Add-ons or Changes You've Made
Type of Change
Select the type of change:
How Has This Been Tested?
Verified the text area correctly displays the initial generated email.
Tested the "Save as Draft" feature by storing the edited email in the session state and retrieving it.
Ensured the "Download" button correctly saves the content as a .txt file.
Checked the functionality of the "Copy to Clipboard" button for accuracy.
I have described my testing process.
Checklist
Please confirm the following: