From 8f10b2b098e11947ab859d7964d13f186e200961 Mon Sep 17 00:00:00 2001 From: sajald77 Date: Thu, 7 Nov 2024 19:13:35 +0545 Subject: [PATCH 01/10] fix: update padding for all components in --- language/translations/en.json | 19 ++++++++++++++++++- src/shared/markdown/helpers/StyleProvider.tsx | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/language/translations/en.json b/language/translations/en.json index 9b81dd444..1b7df0ff8 100644 --- a/language/translations/en.json +++ b/language/translations/en.json @@ -1248,5 +1248,22 @@ "Select rewards": "Select rewards", "Email will be sent to": "Email will be sent to", "members.": "members.", - "Completed Goals": "Completed Goals" + "Completed Goals": "Completed Goals", + "Bring great Bitcoin ideas to life on Geyser. Whether it’s a creative project, social cause or innovative new product around the world. We believe crowdfunding is how we can speed up Bitcoin Adoption.": "Bring great Bitcoin ideas to life on Geyser. Whether it’s a creative project, social cause or innovative new product around the world. We believe crowdfunding is how we can speed up Bitcoin Adoption.", + "Welcome to the Bitcoin Crowdfunding Platform": "Welcome to the Bitcoin Crowdfunding Platform", + "Projects exposing new stories through film and documentaries.": "Projects exposing new stories through film and documentaries.", + "Projects building or bringing about Nostr adoption around the world.": "Projects building or bringing about Nostr adoption around the world.", + "Projects focused on spreading Bitcoin in a variety of ways.": "Projects focused on spreading Bitcoin in a variety of ways.", + "Projects focused on open source development.": "Projects focused on open source development.", + "Projects focused on bringing people together around events in IRL.": "Projects focused on bringing people together around events in IRL.", + "Projects creating valuable content.": "Projects creating valuable content.", + "Refresh Page": "Refresh Page", + "Merch": "Merch", + "Continue with email": "Continue with email", + "Twitter (X)": "Twitter (X)", + "Facebook": "Facebook", + "Google": "Google", + "Successfully deleted post!": "Successfully deleted post!", + "Back to posts": "Back to posts", + "Failed to fetch featured project": "Failed to fetch featured project" } \ No newline at end of file diff --git a/src/shared/markdown/helpers/StyleProvider.tsx b/src/shared/markdown/helpers/StyleProvider.tsx index 1abf9952d..936811e51 100644 --- a/src/shared/markdown/helpers/StyleProvider.tsx +++ b/src/shared/markdown/helpers/StyleProvider.tsx @@ -12,7 +12,7 @@ import { tableCellStyles } from './typeMaps' const Container = styled(Box, { baseStyle: { '& p, & iframe, & h1, & h2, & h3, & h4, & h5': { - mt: 4, + mt: 6, }, '& table': { '& p': { From 4b9028f45bd05ca92aac10c312e6c92f7a2eb356 Mon Sep 17 00:00:00 2001 From: sajald77 Date: Fri, 8 Nov 2024 10:44:48 +0545 Subject: [PATCH 02/10] fix: loading icon for post image load --- language/translations/en.json | 5 ++++- src/shared/markdown/helpers/StyleProvider.tsx | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/language/translations/en.json b/language/translations/en.json index 1b7df0ff8..5e034212d 100644 --- a/language/translations/en.json +++ b/language/translations/en.json @@ -1265,5 +1265,8 @@ "Google": "Google", "Successfully deleted post!": "Successfully deleted post!", "Back to posts": "Back to posts", - "Failed to fetch featured project": "Failed to fetch featured project" + "Failed to fetch featured project": "Failed to fetch featured project", + "Post saved successfully!": "Post saved successfully!", + "failed to upload image": "failed to upload image", + "Contribute without login": "Contribute without login" } \ No newline at end of file diff --git a/src/shared/markdown/helpers/StyleProvider.tsx b/src/shared/markdown/helpers/StyleProvider.tsx index 936811e51..dd7338cd2 100644 --- a/src/shared/markdown/helpers/StyleProvider.tsx +++ b/src/shared/markdown/helpers/StyleProvider.tsx @@ -106,6 +106,13 @@ export const StyleProvider = ({ children, flex, display, ...rest }: { flex?: boo flexDirection: 'column', flexGrow: 1, }, + '& div.remirror-image-loader': { + justifySelf: 'center', + height: '60px', + width: '60px', + borderTopWidth: '8px', + borderTopColor: 'primary1.9', + }, '& div.remirror-editor': { padding: '0px !important', overflowY: 'visible !important', From f3d21bdd5ee88398a855cdad42c915a1a66a93d3 Mon Sep 17 00:00:00 2001 From: sajald77 Date: Fri, 8 Nov 2024 11:48:34 +0545 Subject: [PATCH 03/10] fix: fix email section in funding details --- language/translations/en.json | 13 +- .../project/funding/state/fundingFormAtom.ts | 2 +- .../sections/FundingDetailsUserEmail.tsx | 152 +++++++++--------- 3 files changed, 88 insertions(+), 79 deletions(-) diff --git a/language/translations/en.json b/language/translations/en.json index 9b81dd444..2a3a19b3c 100644 --- a/language/translations/en.json +++ b/language/translations/en.json @@ -1248,5 +1248,16 @@ "Select rewards": "Select rewards", "Email will be sent to": "Email will be sent to", "members.": "members.", - "Completed Goals": "Completed Goals" + "Completed Goals": "Completed Goals", + "Provide your Lightning Address for a full or partial refund": "Provide your Lightning Address for a full or partial refund", + "To a goal": "To a goal", + "Email and Updates": "Email and Updates", + "Rewards total": "Rewards total", + "Refresh Page": "Refresh Page", + "Follow Project and receive direct project updates to your email": "Follow Project and receive direct project updates to your email", + "See all badges": "See all badges", + "No projects": "No projects", + "Profile settings": "Profile settings", + "Disconnect twitter": "Disconnect twitter", + "Disconnect nostr": "Disconnect nostr" } \ No newline at end of file diff --git a/src/modules/project/funding/state/fundingFormAtom.ts b/src/modules/project/funding/state/fundingFormAtom.ts index f1925cc2c..2579be6f1 100644 --- a/src/modules/project/funding/state/fundingFormAtom.ts +++ b/src/modules/project/funding/state/fundingFormAtom.ts @@ -62,7 +62,7 @@ const initialState: FundFormType = { privateComment: '', email: '', media: '', - followProject: false, + followProject: true, subscribeToGeyserEmails: false, rewardsByIDAndCount: undefined, rewardCurrency: RewardCurrency.Usdcent, diff --git a/src/modules/project/pages1/projectFunding/views/fundingDetails/sections/FundingDetailsUserEmail.tsx b/src/modules/project/pages1/projectFunding/views/fundingDetails/sections/FundingDetailsUserEmail.tsx index 61a966c4e..24b1843b5 100644 --- a/src/modules/project/pages1/projectFunding/views/fundingDetails/sections/FundingDetailsUserEmail.tsx +++ b/src/modules/project/pages1/projectFunding/views/fundingDetails/sections/FundingDetailsUserEmail.tsx @@ -13,7 +13,6 @@ import { useUserNotificationSettings, } from '@/modules/profile/pages/profileSettings/hooks/useUserNotificationSettings' import { useFundingFormAtom } from '@/modules/project/funding/hooks/useFundingFormAtom' -import { useProjectAtom } from '@/modules/project/hooks/useProjectAtom' import { useFollowedProjectsValue } from '@/pages/auth/state' import { CardLayout } from '@/shared/components/layouts' import { H1 } from '@/shared/components/typography' @@ -34,9 +33,17 @@ const EMAIL_VALIDATION_STATE = { export const FundingDetailsUserEmailAndUpdates = () => { const { t } = useTranslation() const { user } = useAuthContext() - const { project } = useProjectAtom() const followedProjects = useFollowedProjectsValue() + const { + project, + formState: { needsShipping, followProject, subscribeToGeyserEmails, email }, + hasSelectedRewards, + setTarget, + fundingFormError, + setErrorstate, + } = useFundingFormAtom() + const [followsProject] = useState(followedProjects.find((p) => p.id === project.id) !== undefined) const [userId] = useState(user?.id || 0) @@ -48,13 +55,9 @@ export const FundingDetailsUserEmailAndUpdates = () => { const showEmailComponent = !user?.email || !followsProject || !subscribedToGeyserEmails - const { - formState: { needsShipping, followProject, subscribeToGeyserEmails, email }, - hasSelectedRewards, - setTarget, - fundingFormError, - setErrorstate, - } = useFundingFormAtom() + const descriptionCopy = hasSelectedRewards + ? t('This email will be used by the seller to reach out to you.') + : t('Follow Project and receive direct project updates to your email') /* Set the email from the user to the funding form. We do this because the input field @@ -120,77 +123,72 @@ export const FundingDetailsUserEmailAndUpdates = () => { } } + if (!showEmailComponent) return null + return ( - <> - {showEmailComponent && ( - -

- {t('Email and Updates')} -

- - - - - { - setTarget({ target: { name: 'email', value: e.target.value } }) - setEmailValidationState(EMAIL_VALIDATION_STATE.LOADING) - debouncedEmailValidation(e.target.value) - }} - isInvalid={Boolean(fundingFormError.email)} - onFocus={() => setErrorstate({ key: 'email', value: '' })} - /> - {renderEmailInputRightElement()} - - {fundingFormError.email && {fundingFormError.email}} - - - {needsShipping && ( - +

+ {t('Email and Updates')} +

+ + + + + { + setTarget({ target: { name: 'email', value: e.target.value } }) + setEmailValidationState(EMAIL_VALIDATION_STATE.LOADING) + debouncedEmailValidation(e.target.value) + }} + isInvalid={Boolean(fundingFormError.email)} + onFocus={() => setErrorstate({ key: 'email', value: '' })} /> + {renderEmailInputRightElement()} + + {fundingFormError.email && {fundingFormError.email}} + + + {needsShipping && ( + - { - setTarget({ target: { name: 'followProject', value: e.target.checked } }) - }} - /> - - )} - {!subscribedToGeyserEmails && ( - - setTarget({ target: { name: 'subscribeToGeyserEmails', value: e.target.checked } })} - /> - - )} -
+ /> + )} + {!followsProject && ( + + { + setTarget({ target: { name: 'followProject', value: e.target.checked } }) + }} + /> + + )} + {!subscribedToGeyserEmails && ( + + setTarget({ target: { name: 'subscribeToGeyserEmails', value: e.target.checked } })} + /> + )} - + ) } From b401d79fd731d9ab9a5e423f760d2dfad4fb77ee Mon Sep 17 00:00:00 2001 From: sajald77 Date: Fri, 8 Nov 2024 12:40:05 +0545 Subject: [PATCH 04/10] fix: issues with copy and rewards seo --- language/translations/en.json | 49 +++- .../FundingDetailsPrivateCommentPrompt.tsx | 8 +- .../sections/FundingDetailsUserComment.tsx | 4 +- .../projectView/views/rewards/RewardView.tsx | 264 +++++++++--------- 4 files changed, 182 insertions(+), 143 deletions(-) diff --git a/language/translations/en.json b/language/translations/en.json index 5e034212d..5e74b5e05 100644 --- a/language/translations/en.json +++ b/language/translations/en.json @@ -1249,7 +1249,6 @@ "Email will be sent to": "Email will be sent to", "members.": "members.", "Completed Goals": "Completed Goals", - "Bring great Bitcoin ideas to life on Geyser. Whether it’s a creative project, social cause or innovative new product around the world. We believe crowdfunding is how we can speed up Bitcoin Adoption.": "Bring great Bitcoin ideas to life on Geyser. Whether it’s a creative project, social cause or innovative new product around the world. We believe crowdfunding is how we can speed up Bitcoin Adoption.", "Welcome to the Bitcoin Crowdfunding Platform": "Welcome to the Bitcoin Crowdfunding Platform", "Projects exposing new stories through film and documentaries.": "Projects exposing new stories through film and documentaries.", "Projects building or bringing about Nostr adoption around the world.": "Projects building or bringing about Nostr adoption around the world.", @@ -1258,15 +1257,51 @@ "Projects focused on bringing people together around events in IRL.": "Projects focused on bringing people together around events in IRL.", "Projects creating valuable content.": "Projects creating valuable content.", "Refresh Page": "Refresh Page", - "Merch": "Merch", - "Continue with email": "Continue with email", - "Twitter (X)": "Twitter (X)", - "Facebook": "Facebook", - "Google": "Google", "Successfully deleted post!": "Successfully deleted post!", "Back to posts": "Back to posts", "Failed to fetch featured project": "Failed to fetch featured project", "Post saved successfully!": "Post saved successfully!", "failed to upload image": "failed to upload image", - "Contribute without login": "Contribute without login" + "Contribute without login": "Contribute without login", + "Follow Project and receive direct project updates to your email": "Follow Project and receive direct project updates to your email", + "See all badges": "See all badges", + "No projects": "No projects", + "Profile settings": "Profile settings", + "Disconnect twitter": "Disconnect twitter", + "Disconnect nostr": "Disconnect nostr", + "Goal": "Goal", + "Low 5% fees and no fees for node-runners": "Low 5% fees and no fees for node-runners", + "Update your community by email": "Update your community by email", + "Exit the creation flow": "Exit the creation flow", + "The project will be saved as a Draft and you can access it in your Profile page.": "The project will be saved as a Draft and you can access it in your Profile page.", + "Save as draft": "Save as draft", + "Project name should be between 3 and 280 characters.": "Project name should be between 3 and 280 characters.", + "Project region is required to proceed": "Project region is required to proceed", + "Please select a region": "Please select a region", + "Leave a public comment here.": "Leave a public comment here.", + "Send a private comment to the creator with a thank you note, feedback, or special requests. Sometimes, if you don’t provide these creator won’t be able to send you your reward.": "Send a private comment to the creator with a thank you note, feedback, or special requests. Sometimes, if you don’t provide these creator won’t be able to send you your reward.", + "Enter your comment here...": "Enter your comment here...", + "Private comments": "Private comments", + "Facebook": "Facebook", + "Google": "Google", + "Funded": "Funded", + "This project has not been launched yet.": "This project has not been launched yet.", + "This project has been flagged for violating our Terms & Conditions.": "This project has been flagged for violating our Terms & Conditions.", + "Merch": "Merch", + "Projects telling important stories through films, documentaries and other visual arts": "Projects telling important stories through films, documentaries and other visual arts", + "Projects building on, or bringing about Nostr adoption around the world": "Projects building on, or bringing about Nostr adoption around the world", + "Projects focused on spreading Bitcoin in a variety of ways": "Projects focused on spreading Bitcoin in a variety of ways", + "Projects focused on open source development": "Projects focused on open source development", + "Projects focused on bringing people together around events in IRL": "Projects focused on bringing people together around events in IRL", + "Projects creating valuable content": "Projects creating valuable content", + "Welcome to Bitcoin crowdfunding!": "Welcome to Bitcoin crowdfunding!", + "Bring great Bitcoin ideas to life on Geyser. Whether it’s a creative project, social cause or innovative new product around the world. We believe crowdfunding is how we can speed up Bitcoin Adoption.": "Bring great Bitcoin ideas to life on Geyser. Whether it’s a creative project, social cause or innovative new product around the world. We believe crowdfunding is how we can speed up Bitcoin Adoption.", + "Continue with email": "Continue with email", + "Twitter (X)": "Twitter (X)", + "Check your email": "Check your email", + "You can login securely by using One Time Password sent to your email.": "You can login securely by using One Time Password sent to your email.", + "Receive One Time Password": "Receive One Time Password", + "We sent you an OTP code to": "We sent you an OTP code to", + "Paste (or type) it below to continue.": "Paste (or type) it below to continue.", + "Resend code": "Resend code" } \ No newline at end of file diff --git a/src/modules/project/pages1/projectFunding/views/fundingDetails/sections/FundingDetailsPrivateCommentPrompt.tsx b/src/modules/project/pages1/projectFunding/views/fundingDetails/sections/FundingDetailsPrivateCommentPrompt.tsx index 2d6f1c913..473629551 100644 --- a/src/modules/project/pages1/projectFunding/views/fundingDetails/sections/FundingDetailsPrivateCommentPrompt.tsx +++ b/src/modules/project/pages1/projectFunding/views/fundingDetails/sections/FundingDetailsPrivateCommentPrompt.tsx @@ -34,17 +34,17 @@ export const FundingDetailsPrivateCommentPrompt = () => { return (

- {t('Private message')} + {t('Private comments')}

{t( - 'Send a private message to the creator with a thank you note, feedback, or special requests. Sometimes, if you don’t provide these creator won’t be able to send you your reward.', + 'Send a private comment to the creator with a thank you note, feedback, or special requests. Sometimes, if you don’t provide these creator won’t be able to send you your reward.', )} {mergedPrivateCommentPrompts.length > 0 && ( <> - {t('The creator has requested the following information from you. Make sure you add in the message box:')} + {t('The creator has requested the following information from you. Make sure you add in the comment box:')} @@ -56,7 +56,7 @@ export const FundingDetailsPrivateCommentPrompt = () => { )}