Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

MarconLP
Copy link
Member

@MarconLP MarconLP commented Sep 18, 2023

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

Screenshot 2023-09-19 at 00 04 45@2x
  • remove debug code

How did you test this code?

I created a bunch of zendesk tickets

@MarconLP MarconLP force-pushed the require-more-data-in-supportModal branch from f1980c8 to 8f8935d Compare September 18, 2023 22:15
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@MarconLP MarconLP marked this pull request as ready for review September 19, 2023 05:58
@MarconLP MarconLP requested a review from tiina303 September 19, 2023 05:59
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Comment on lines 91 to 89
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}`)
},
})

Copy link
Contributor

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

Copy link
Member Author

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

Comment on lines 247 to 249
message +
(message2 ? '\n\n' + message2 : '') +
(message3 ? '\n\n' + message3 : '') +
Copy link
Contributor

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

Comment on lines 59 to 67
// topics that will ask for additional information
export const EXTENDED_SUPPORT_TOPICS: string[] = [
'app_performance',
'analytics',
'data_management',
'apps',
'data_integrity',
'ingestion',
]
Copy link
Contributor

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

Copy link
Member Author

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?

Copy link
Contributor

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.

Comment on lines 43 to 57
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?',
}
Copy link
Contributor

@tiina303 tiina303 Sep 19, 2023

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.

Copy link
Member Author

@MarconLP MarconLP Sep 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this idea

Copy link
Member

@Twixes Twixes left a 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:

Screenshot 2023-09-21 at 15 22 43

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.

@MarconLP
Copy link
Member Author

maybe adding a defaultValue that looks like the github template would be better then?

for reference 13inch mac:
Screenshot 2023-09-22 at 16 20 02@2x

@Twixes
Copy link
Member

Twixes commented Sep 22, 2023

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

@MarconLP MarconLP force-pushed the require-more-data-in-supportModal branch from 0e30c3e to 460d000 Compare September 26, 2023 10:46
@MarconLP
Copy link
Member Author

we already can see the frontend thanks to session replay, and in the same vein, we don't necessarily need links from the user

It's possible but more time consuming compared to just include the links

@posthog-bot
Copy link
Contributor

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 stale label – otherwise this will be closed in another week.

@MarconLP MarconLP removed the stale label Oct 4, 2023
@posthog-bot
Copy link
Contributor

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 stale label – otherwise this will be closed in another week.

@MarconLP MarconLP force-pushed the require-more-data-in-supportModal branch from 460d000 to c11e054 Compare October 13, 2023 20:26
@MarconLP
Copy link
Member Author

Updated it to simply provide a message template

2023-10-13.at.22.13.32.mp4

@MarconLP MarconLP changed the title add additional fields to the supportModal feat: add additional fields to the supportModal Oct 13, 2023
@MarconLP
Copy link
Member Author

MarconLP commented Oct 16, 2023

things to do:

  • Also consider unauthenticated fields
  • do not change message if already modified

@MarconLP
Copy link
Member Author

updated behavior
2023-10-17 at 20 45 43

@MarconLP MarconLP requested review from tiina303 and Twixes October 17, 2023 18:48
@posthog-bot
Copy link
Contributor

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 stale label – otherwise this will be closed in another week.

@posthog-bot
Copy link
Contributor

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 stale label – otherwise this will be closed in another week.

@MarconLP MarconLP removed the stale label Nov 2, 2023
@posthog-bot
Copy link
Contributor

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 stale label – otherwise this will be closed in another week.

@MarconLP MarconLP removed the stale label Nov 10, 2023
@tiina303 tiina303 removed their request for review November 10, 2023 12:43
@posthog-bot
Copy link
Contributor

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 stale label – otherwise this will be closed in another week.

@posthog-bot
Copy link
Contributor

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 stale label – otherwise this will be closed in another week.

@posthog-bot
Copy link
Contributor

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants