Skip to content

Commit d6bc43c

Browse files
committed
support form changes (#8414)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on refactoring and enhancing various support forms in the application, including the removal of outdated components and the introduction of new fields to improve user input for support tickets. ### Detailed summary - Deleted `payments`, `contracts`, and `AffectedAreaInput` components. - Updated `OtherSupportForm` with a new label. - Modified `TokensMarketplaceSupportForm` to include a new input for "Support ID in logs". - Removed dynamic imports for `ContractSupportForm` and `PaymentsSupportForm`. - Updated `productOptions` labels for clarity. - Replaced `ENGINE_TYPES` and `ENGINE_PROBLEM_AREAS` with `API_SDK_OPTIONS`. - Enhanced `EngineSupportForm` with new inputs and logic based on selected SDK. - Introduced new components for user wallet issues and account abstraction. - Updated `PROBLEM_AREAS` to include new components for social/email login and user wallet custom auth. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added "Agents/x402 and AI" support option and an optional "Support ID in logs" field. * **Improvements** * Reorganized and simplified support forms: Wallets → Working with User Wallets, Transactions → API/SDKs, Tokens/Marketplace → Creating, Bridging and swapping tokens; token input accepts address or symbol. * Streamlined Connect and Engine flows with focused issue categories (social/email login, custom auth, account abstraction, third‑party wallets, API/SDK selection). * **Chores** * Removed legacy Contracts, Payments and affected-area form screens. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent ef57702 commit d6bc43c

File tree

8 files changed

+118
-404
lines changed

8 files changed

+118
-404
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/support/_components/SupportTicketForm.tsx

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ const EngineSupportForm = dynamic(
2626
ssr: false,
2727
},
2828
);
29-
const ContractSupportForm = dynamic(
30-
() =>
31-
import("./contact-forms/contracts").then((mod) => mod.ContractSupportForm),
32-
{
33-
loading: () => <Skeleton className="h-12" />,
34-
ssr: false,
35-
},
36-
);
3729
const AccountSupportForm = dynamic(
3830
() => import("./contact-forms/account").then((mod) => mod.AccountSupportForm),
3931
{
@@ -48,14 +40,6 @@ const OtherSupportForm = dynamic(
4840
ssr: false,
4941
},
5042
);
51-
const PaymentsSupportForm = dynamic(
52-
() =>
53-
import("./contact-forms/payments").then((mod) => mod.PaymentsSupportForm),
54-
{
55-
loading: () => <Skeleton className="h-12" />,
56-
ssr: false,
57-
},
58-
);
5943
const TokensMarketplaceSupportForm = dynamic(
6044
() =>
6145
import("./contact-forms/tokens-marketplace").then(
@@ -68,13 +52,14 @@ const TokensMarketplaceSupportForm = dynamic(
6852
);
6953

7054
const productOptions = [
71-
{ component: <ConnectSupportForm />, label: "Wallets" },
72-
{ component: <EngineSupportForm />, label: "Transactions" },
73-
{ component: <PaymentsSupportForm />, label: "Payments" },
74-
{ component: <ContractSupportForm />, label: "Contracts" },
55+
{ component: <ConnectSupportForm />, label: "Working with User Wallets" },
56+
{
57+
component: <EngineSupportForm />,
58+
label: "Using API/SDK’s, errored transactions",
59+
},
7560
{
7661
component: <TokensMarketplaceSupportForm />,
77-
label: "Tokens / Marketplace",
62+
label: "Creating, Bridging and swapping tokens",
7863
},
7964
{ component: <AccountSupportForm />, label: "Account" },
8065
{ component: <OtherSupportForm />, label: "Other" },

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/support/_components/contact-forms/connect/AffectedAreaInput.tsx

Lines changed: 0 additions & 67 deletions
This file was deleted.

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/support/_components/contact-forms/connect/index.tsx

Lines changed: 60 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,91 @@
1+
"use client";
2+
13
import { type ReactElement, useState } from "react";
24
import { DescriptionInput } from "../../shared/SupportForm_DescriptionInput";
35
import { SupportForm_SelectInput } from "../../shared/SupportForm_SelectInput";
46
import { SupportForm_TextInput } from "../../shared/SupportForm_TextInput";
5-
import { UnitySupportForm } from "../../shared/SupportForm_UnityInput";
6-
import { AffectedAreaInput } from "./AffectedAreaInput";
77

88
type ProblemAreaItem = {
99
label: string;
1010
component: ReactElement;
1111
};
1212

13-
const SDKVersionInput = () => (
14-
<SupportForm_TextInput
15-
formLabel="SDK Version"
16-
formValue="extraInfo_SDK_Version"
17-
inputType="text"
18-
required={true}
19-
/>
20-
);
13+
const SocialEmailLoginIssuesComponent = () => {
14+
const [description, setDescription] = useState<string>("");
15+
return (
16+
<>
17+
<SupportForm_TextInput
18+
formLabel="User ID/Email with issue"
19+
formValue="extraInfo_User_ID_Email"
20+
inputType="text"
21+
placeholder="Enter user ID or email"
22+
required={true}
23+
/>
24+
<DescriptionInput value={description} onChange={setDescription} />
25+
</>
26+
);
27+
};
2128

22-
const OSSelect = () => {
23-
const [selectedOS, setSelectedOS] = useState<string>("");
29+
const UserWalletCustomAuthComponent = () => {
30+
const [description, setDescription] = useState<string>("");
2431
return (
25-
<SupportForm_SelectInput
26-
formLabel="OS"
27-
name="extraInfo_OS"
28-
onValueChange={setSelectedOS}
29-
options={["Windows", "MacOS", "Linux", "Other"]}
30-
promptText="Select an operating system"
31-
required={true}
32-
value={selectedOS}
33-
/>
32+
<>
33+
<SupportForm_TextInput
34+
formLabel="Custom auth endpoint"
35+
formValue="extraInfo_Custom_Auth_Endpoint"
36+
inputType="text"
37+
placeholder="Enter custom auth endpoint"
38+
required={true}
39+
/>
40+
<SupportForm_TextInput
41+
formLabel="Support ID"
42+
formValue="extraInfo_Support_ID"
43+
inputType="text"
44+
placeholder="Enter support ID (optional)"
45+
required={false}
46+
/>
47+
<DescriptionInput value={description} onChange={setDescription} />
48+
</>
3449
);
3550
};
3651

37-
const DescriptionInputWrapper = () => {
52+
const AccountAbstractionComponent = () => {
53+
const [description, setDescription] = useState<string>("");
54+
return (
55+
<>
56+
<SupportForm_TextInput
57+
formLabel="Support ID"
58+
formValue="extraInfo_Support_ID"
59+
inputType="text"
60+
placeholder="Enter support ID (optional)"
61+
required={false}
62+
/>
63+
<DescriptionInput value={description} onChange={setDescription} />
64+
</>
65+
);
66+
};
67+
68+
const ThirdPartyEOAWalletsComponent = () => {
3869
const [description, setDescription] = useState<string>("");
3970
return <DescriptionInput value={description} onChange={setDescription} />;
4071
};
4172

4273
const PROBLEM_AREAS: ProblemAreaItem[] = [
4374
{
44-
component: <AffectedAreaInput />,
45-
label: "In-app wallet login issues",
46-
},
47-
{
48-
component: <AffectedAreaInput />,
49-
label: "In-app wallet transaction issues",
75+
component: <SocialEmailLoginIssuesComponent />,
76+
label: "Social/Email login issues",
5077
},
5178
{
52-
component: <AffectedAreaInput />,
53-
label: "In-app wallet Custom Auth",
79+
component: <UserWalletCustomAuthComponent />,
80+
label: "User wallet with custom auth",
5481
},
5582
{
56-
component: <AffectedAreaInput />,
83+
component: <AccountAbstractionComponent />,
5784
label: "Account Abstraction",
5885
},
5986
{
60-
component: (
61-
<>
62-
<SDKVersionInput />
63-
<SupportForm_TextInput
64-
formLabel="Application URL"
65-
formValue="extraInfo_Application_URL"
66-
inputType="url"
67-
required={false}
68-
/>
69-
<DescriptionInputWrapper />
70-
</>
71-
),
72-
label: "thirdweb SDKs",
73-
},
74-
{
75-
component: (
76-
<>
77-
<UnitySupportForm />
78-
<SDKVersionInput />
79-
<DescriptionInputWrapper />
80-
</>
81-
),
82-
label: "Unity SDK",
83-
},
84-
{
85-
component: (
86-
<>
87-
<SDKVersionInput />
88-
<OSSelect />
89-
<SupportForm_TextInput
90-
formLabel="Framework"
91-
formValue="extraInfo_dotNET_Framework"
92-
inputType="text"
93-
placeholder="MAUI | Blazor | Godot, etc"
94-
required={false}
95-
/>
96-
<SupportForm_TextInput
97-
formLabel="Target OS"
98-
formValue="extraInfo_dotNET_Target_OS"
99-
inputType="text"
100-
required={false}
101-
/>
102-
<DescriptionInputWrapper />
103-
</>
104-
),
105-
label: ".NET SDK",
106-
},
107-
{
108-
component: <AffectedAreaInput />,
109-
label: "Pay",
110-
},
111-
{
112-
component: <AffectedAreaInput />,
113-
label: "Auth",
87+
component: <ThirdPartyEOAWalletsComponent />,
88+
label: "Third party/EOA wallets",
11489
},
11590
];
11691

0 commit comments

Comments
 (0)