-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: add additional fields to the supportModal #17513
Conversation
f1980c8
to
8f8935d
Compare
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
const { | ||
setFilesToUpload: setFilesToUpload2, | ||
filesToUpload: filesToUpload2, | ||
uploading: uploading2, | ||
} = useUploadFiles({ | ||
onUpload: (url, fileName) => { | ||
setSendSupportRequestValue('message2', sendSupportRequest.message + `\n\nAttachment "${fileName}": ${url}`) | ||
}, | ||
onError: (detail) => { | ||
lemonToast.error(`Error uploading image: ${detail}`) | ||
}, | ||
}) | ||
|
||
const { | ||
setFilesToUpload: setFilesToUpload3, | ||
filesToUpload: filesToUpload3, | ||
uploading: uploading3, | ||
} = useUploadFiles({ | ||
onUpload: (url, fileName) => { | ||
setSendSupportRequestValue('message3', sendSupportRequest.message + `\n\nAttachment "${fileName}": ${url}`) | ||
}, | ||
onError: (detail) => { | ||
lemonToast.error(`Error uploading image: ${detail}`) | ||
}, | ||
}) | ||
|
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.
can't you already upload several files, why this copy paste and let's not have a hardcoded limit of 3
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.
this is the important part: ..setSendSupportRequestValue('message3'..
so that the uploaded file will be added into the correct field
message + | ||
(message2 ? '\n\n' + message2 : '') + | ||
(message3 ? '\n\n' + message3 : '') + |
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.
stuff like message2
, message3
is generally not easy to read / extend and hence best to be avoided
// topics that will ask for additional information | ||
export const EXTENDED_SUPPORT_TOPICS: string[] = [ | ||
'app_performance', | ||
'analytics', | ||
'data_management', | ||
'apps', | ||
'data_integrity', | ||
'ingestion', | ||
] |
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.
let's not do this, we're definitely going to forget adding items here and it doesn't really make sense to users either
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.
how are we going to decide if this topic is going to ask for more information or not?
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.
nothing is topic specific -> it's the support kind that determines what we ask, if you want something specific you can add a special support kind for it.
const SUPPORT_TICKET_KIND_TO_PROMPT_EXTENDED_1: Record<SupportTicketKind, string> = { | ||
bug: "What's the bug?", | ||
feedback: 'Is your feedback related to a problem? (make sure to include links if relevant)', | ||
support: 'What can we help you with? (make sure to include links if relevant)', | ||
} | ||
const SUPPORT_TICKET_KIND_TO_PROMPT_EXTENDED_2: Record<SupportTicketKind, string> = { | ||
bug: 'How to reproduce?', | ||
feedback: "Describe the solution you'd like?", | ||
support: 'What is happening?', | ||
} | ||
const SUPPORT_TICKET_KIND_TO_PROMPT_EXTENDED_3: Record<SupportTicketKind, string> = { | ||
bug: 'Additional context? (make sure to include links if relevant)', | ||
feedback: "Describe alternatives you've considered.", | ||
support: 'What do you expect to happen?', | ||
} |
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.
This is hard to read/extend imho.
You'd more likely want to create a type for this sth like (think about this a bit first, not sure if I provided the best approach
SupportTicketFormKind:
inputFields: Field[]
...
then have:
const BUG_TICKET: SupportTicketFormKind(inputFields = [
Field(prompt = "Description of the Bug", placeholder = "make sure to include links and attachments if relevant", ticketKey = 'description'),
Field(prompt = "How to reproduce?", ...)
]
^ that way we could easily add / remove fields from the form in the future.
If needed the file upload thing could be a field, but I'd prefer it to be within.
I'd encourage you to keep it the same for all the types not depending on the area, if needed we can create a new type called 'MinimalTicket' or whatever.
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.
I like this idea
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.
Hmm, I see what kinds of problems this is supposed to solve. On the other hand, the complexity of the form becomes intimidating with so many large fields. On a 14-inch MacBook viewport, scrolling is now necessary:
It's fair to add some clarifying guidance to the existing placeholders, but the changes in this PR add a lot of friction to the support modal experience. I suggest we reach for more restrained guidance first.
That's definitely more lightweight. Though we don't need the whole template – the big advantage of Zendesk tickets vs. GitHub issues is that we already can see the frontend thanks to session replay, and in the same vein, we don't necessarily need links from the user. I think the only thing we don't have that's easy to forget is reproduction steps. But to highlight that, perhaps a note below the text area, or a different text area placeholder would do? Ofc I may be missing what classes of lacking info there are exactly, so happy to take in any context |
0e30c3e
to
460d000
Compare
It's possible but more time consuming compared to just include the links |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
460d000
to
c11e054
Compare
Updated it to simply provide a message template 2023-10-13.at.22.13.32.mp4 |
things to do:
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR was closed due to lack of activity. Feel free to reopen if it's still relevant. |
Problem
There are a lot of instances where we have to ask users to provide additional information (context, links, etc..). This will hopefully reduce that.
Changes
How did you test this code?
I created a bunch of zendesk tickets