From ae2e60ed654e47ddb9ebf29d078992c1dd384453 Mon Sep 17 00:00:00 2001 From: Andreas Date: Sun, 14 Jan 2024 21:55:00 -0500 Subject: [PATCH 1/6] chore: remove all feedback related components fixes #65. there shouldn't be any more feedback related components or anything referencing to them. Signed-off-by: Andreas --- .env.example | 2 - .../src/components/dialogs/FeedbackDialog.tsx | 74 ------------------- .../shared/src/components/dialogs/index.ts | 1 - .../src/components/generic/FeedbackButton.tsx | 14 ---- .../shared/src/components/generic/index.ts | 1 - 5 files changed, 92 deletions(-) delete mode 100644 libs/client/shared/src/components/dialogs/FeedbackDialog.tsx delete mode 100644 libs/client/shared/src/components/generic/FeedbackButton.tsx diff --git a/.env.example b/.env.example index 7a2105c1..0f2e063d 100644 --- a/.env.example +++ b/.env.example @@ -17,8 +17,6 @@ NX_PLAID_SECRET= NX_FINICITY_APP_KEY= NX_FINICITY_PARTNER_SECRET= -NEXT_PUBLIC_ZAPIER_FEEDBACK_HOOK_URL= - # Email credentials NX_POSTMARK_FROM_ADDRESS=account@example.com NX_POSTMARK_REPLY_TO_ADDRESS=support@example.com diff --git a/libs/client/shared/src/components/dialogs/FeedbackDialog.tsx b/libs/client/shared/src/components/dialogs/FeedbackDialog.tsx deleted file mode 100644 index d6f86e9f..00000000 --- a/libs/client/shared/src/components/dialogs/FeedbackDialog.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import { useSession } from 'next-auth/react' -import { Button, Dialog } from '@maybe-finance/design-system' -import { useState } from 'react' -import axios from 'axios' -import toast from 'react-hot-toast' - -export interface FeedbackDialogProps { - isOpen: boolean - onClose: () => void - notImplementedNotice?: boolean -} - -export function FeedbackDialog({ isOpen, onClose, notImplementedNotice }: FeedbackDialogProps) { - const [feedback, setFeedback] = useState('') - const { data: session } = useSession() - - return ( - - Send us your feedback! - - {notImplementedNotice ? ( -

- This feature has not been implemented yet, but is coming soon! Mind helping - us out and telling us what you want with this particular feature below? -

- ) : ( -

- Maybe is built in public and relies heavily on user feedback. We'd love to - hear what you think could be better (please be constructive, we're still in - the early days!{' '} - - 😄 - - ) -

- )} -
{ - e.preventDefault() - - try { - await axios - .create({ transformRequest: [(data) => JSON.stringify(data)] }) - .post( - process.env.NEXT_PUBLIC_ZAPIER_FEEDBACK_HOOK_URL || - 'REPLACE_THIS', - { - comment: `**From user:** ${session?.user?.email}\n\n${feedback}`, - page: `**Main app feedback**: ${window.location.href}`, - } - ) - - toast.success('Your feedback was submitted!') - } catch (e) { - toast.error('Feedback not submitted') - } - - onClose() - }} - > - - -
-
-
- ) -} diff --git a/libs/client/shared/src/components/dialogs/index.ts b/libs/client/shared/src/components/dialogs/index.ts index 92655e0b..50dbd5b0 100644 --- a/libs/client/shared/src/components/dialogs/index.ts +++ b/libs/client/shared/src/components/dialogs/index.ts @@ -1,2 +1 @@ -export * from './FeedbackDialog' export * from './NonUSDDialog' diff --git a/libs/client/shared/src/components/generic/FeedbackButton.tsx b/libs/client/shared/src/components/generic/FeedbackButton.tsx deleted file mode 100644 index c3611ff0..00000000 --- a/libs/client/shared/src/components/generic/FeedbackButton.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { Button } from '@maybe-finance/design-system' -import { useState } from 'react' -import { FeedbackDialog } from '../dialogs' - -export function FeedbackButton() { - const [isOpen, setIsOpen] = useState(false) - - return ( -
- - setIsOpen(false)} /> -
- ) -} diff --git a/libs/client/shared/src/components/generic/index.ts b/libs/client/shared/src/components/generic/index.ts index df90b1a4..47d27df0 100644 --- a/libs/client/shared/src/components/generic/index.ts +++ b/libs/client/shared/src/components/generic/index.ts @@ -1,4 +1,3 @@ -export * from './FeedbackButton' export * from './TrendBadge' export * from './Toaster' export * from './BoxIcon' From 1957217a58144d016ad0edcf46b769a737daeb32 Mon Sep 17 00:00:00 2001 From: saurabh yadav Date: Mon, 15 Jan 2024 15:01:15 +0530 Subject: [PATCH 2/6] Country limitation while signup is removed --- .../src/onboarding/steps/CountryWaitlist.tsx | 62 ------------------- .../features/src/onboarding/steps/Profile.tsx | 14 +---- 2 files changed, 2 insertions(+), 74 deletions(-) delete mode 100644 libs/client/features/src/onboarding/steps/CountryWaitlist.tsx diff --git a/libs/client/features/src/onboarding/steps/CountryWaitlist.tsx b/libs/client/features/src/onboarding/steps/CountryWaitlist.tsx deleted file mode 100644 index ebbca2fe..00000000 --- a/libs/client/features/src/onboarding/steps/CountryWaitlist.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import Link from 'next/link' -import { useUserApi } from '@maybe-finance/client/shared' -import { Button } from '@maybe-finance/design-system' -import toast from 'react-hot-toast' -import { signOut } from 'next-auth/react' - -export function CountryWaitlist({ country }: { country?: string }) { - const { useDelete } = useUserApi() - - const deleteUser = useDelete({ - onSuccess() { - toast.success(`Account deleted`) - setTimeout(() => signOut(), 500) - }, - onError() { - toast.error(`Error deleting account`) - }, - }) - - return ( -
-

- Unfortunately we're only accepting users from the US for now -

-
-

We hate doing this, but for now we’re only accepting users from the US. Why?

-

- Well besides not being able to automatically connect to your institution, our - financial advisors wouldn’t be able to give you relevant localized advice and - would likely breach some regulations. -

-

- That being said, we do plan on expanding Maybe to other countries soon. So we’ll - let you know via email once we launch Maybe in {country || 'your country'}. -

-
- - - - -
- ) -} diff --git a/libs/client/features/src/onboarding/steps/Profile.tsx b/libs/client/features/src/onboarding/steps/Profile.tsx index b91938a3..6a7250d3 100644 --- a/libs/client/features/src/onboarding/steps/Profile.tsx +++ b/libs/client/features/src/onboarding/steps/Profile.tsx @@ -29,7 +29,6 @@ import type { StepProps } from './StepProps' import { Switch } from '@headlessui/react' import { BrowserUtil, useUserApi } from '@maybe-finance/client/shared' import type { Household, MaybeGoal } from '@prisma/client' -import { CountryWaitlist } from './CountryWaitlist' import { DateUtil, Geo } from '@maybe-finance/shared' type FormValues = { @@ -108,7 +107,6 @@ function ProfileForm({ title, onSubmit, defaultValues }: ProfileViewProps) { }) const country = watch('country') - const [showCountryWaitlist, setShowCountryWaitlist] = useState(false) useEffect(() => { trigger() @@ -116,9 +114,7 @@ function ProfileForm({ title, onSubmit, defaultValues }: ProfileViewProps) { const { errors } = useFormState({ control }) - return showCountryWaitlist ? ( - c.code === country)?.name} /> - ) : ( + return (

{title}

@@ -216,13 +212,7 @@ function ProfileForm({ title, onSubmit, defaultValues }: ProfileViewProps) { label="Where are you based?" onClick={() => setCurrentQuestion('residence')} back={() => setCurrentQuestion('household')} - next={() => { - if (country === 'US') { - setCurrentQuestion('goals') - } else { - setShowCountryWaitlist(true) - } - }} + next={() => setCurrentQuestion('goals')} >

Date: Mon, 15 Jan 2024 08:27:02 -0500 Subject: [PATCH 3/6] Fix assets and debts 'other' expanding in tandem --- libs/client/features/src/account/AccountsSidebar.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/client/features/src/account/AccountsSidebar.tsx b/libs/client/features/src/account/AccountsSidebar.tsx index da001352..43d350cb 100644 --- a/libs/client/features/src/account/AccountsSidebar.tsx +++ b/libs/client/features/src/account/AccountsSidebar.tsx @@ -187,7 +187,9 @@ export default function AccountsSidebar() { label={title} balances={balances.data} inverted={classification === 'liability'} - onToggle={(isExpanded) => updateToggleState(title, isExpanded)} + onToggle={(isExpanded) => + updateToggleState(`${title}-${classification}`, isExpanded) + } expanded={toggleState[title] !== false} level={1} syncing={items.some((a) => a.syncing)} From 4eedbc0d1c65d9ce43ecc38cfff44e29353d57c6 Mon Sep 17 00:00:00 2001 From: saurabh yadav Date: Mon, 15 Jan 2024 19:12:59 +0530 Subject: [PATCH 4/6] More occurrences of country blocker removed --- .../features/src/onboarding/steps/Profile.tsx | 27 ++----------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/libs/client/features/src/onboarding/steps/Profile.tsx b/libs/client/features/src/onboarding/steps/Profile.tsx index 6a7250d3..7201ead9 100644 --- a/libs/client/features/src/onboarding/steps/Profile.tsx +++ b/libs/client/features/src/onboarding/steps/Profile.tsx @@ -72,7 +72,7 @@ export function Profile({ title, onNext }: StepProps) { dob: data.dob, household: data.household, country: data.country, - state: data.country === 'US' ? data.state : null, // should be NULL if country is not US + state: null, // should always be null for now maybeGoals: data.maybeGoals, maybeGoalsDescription: data.maybeGoalsDescription, }) @@ -207,7 +207,7 @@ function ProfileForm({ title, onSubmit, defaultValues }: ProfileViewProps) { setCurrentQuestion('residence')} @@ -236,29 +236,6 @@ function ProfileForm({ title, onSubmit, defaultValues }: ProfileViewProps) { )} /> - - {country === 'US' && ( - ( - - - {Geo.states.find((s) => s.code === field.value)?.name || - 'Select'} - - - {Geo.states.map((state) => ( - - {state.name} - - ))} - - - )} - /> - )}
Date: Mon, 15 Jan 2024 08:55:48 -0600 Subject: [PATCH 5/6] Issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..dd84ea78 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..bbcbbe7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 07fe4cf0a7d603ed681694817291c75878f8afd8 Mon Sep 17 00:00:00 2001 From: Josh Pigford Date: Mon, 15 Jan 2024 08:56:58 -0600 Subject: [PATCH 6/6] Updated issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea78..f3d5c415 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a report to help us improve title: '' -labels: '' +labels: bug assignees: '' ---