Skip to content

Commit a5c9df2

Browse files
Copilotstnguyen90
andauthored
Add support wizard topics and fix space-to-dash conversion (#2618)
* Initial plan * Add additional topics to support wizard and fix space handling Co-authored-by: stnguyen90 <[email protected]> * Improve whitespace handling with trim and robust regex Co-authored-by: stnguyen90 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: stnguyen90 <[email protected]>
1 parent 273488f commit a5c9df2

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

src/routes/(console)/supportWizard.svelte

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,16 @@
3737
3838
// Topic options based on category
3939
const topicsByCategory = {
40-
general: ['Security', 'Compliance', 'Performance'],
41-
billing: ['Invoices', 'Plans'],
40+
general: [
41+
'Security',
42+
'Compliance',
43+
'Performance',
44+
'Account',
45+
'Project',
46+
'Regions',
47+
'Other'
48+
],
49+
billing: ['Invoice', 'Plans', 'Payment methods', 'Downgrade', 'Refund', 'Usage', 'Other'],
4250
technical: [
4351
'Auth',
4452
'Databases',
@@ -49,7 +57,14 @@
4957
'Migrations',
5058
'Webhooks',
5159
'SDKs',
52-
'Console'
60+
'Console',
61+
'Backups',
62+
'Blocked project',
63+
'Domains',
64+
'Outage',
65+
'Platforms',
66+
'Sites',
67+
'Other'
5368
]
5469
};
5570
@@ -89,7 +104,7 @@
89104
const topicOptions = $derived(
90105
($supportData.category ? topicsByCategory[$supportData.category] || [] : []).map(
91106
(topic) => ({
92-
value: topic.toLowerCase(),
107+
value: topic.toLowerCase().trim().replace(/\s+/g, '-'),
93108
label: topic
94109
})
95110
)

0 commit comments

Comments
 (0)