From 229f7bd0364866398ac596226df3887bd36df8a8 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Thu, 12 Nov 2020 07:28:51 -0800 Subject: [PATCH] Add papercuts support to the support form Summary: For groups that have a papercuts entry, the support form will now link to them. This will hopefully increase the amount of feedback we get. Reviewed By: nikoant Differential Revision: D24921296 fbshipit-source-id: c6d07a10838a7abb1c70e8d61197a7b339f611bc --- desktop/app/src/fb-stubs/constants.tsx | 1 + desktop/app/src/reducers/supportForm.tsx | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/desktop/app/src/fb-stubs/constants.tsx b/desktop/app/src/fb-stubs/constants.tsx index de896b002..ec49417ba 100644 --- a/desktop/app/src/fb-stubs/constants.tsx +++ b/desktop/app/src/fb-stubs/constants.tsx @@ -38,6 +38,7 @@ export default Object.freeze({ defaultPlugins: ['DeviceLogs'], supportedOS: ['Android'] as Array, deeplinkSuffix: 'default', + papercuts: '', }, SUPPORT_GROUPS: [], diff --git a/desktop/app/src/reducers/supportForm.tsx b/desktop/app/src/reducers/supportForm.tsx index 56bb9a9c0..b2fe2d467 100644 --- a/desktop/app/src/reducers/supportForm.tsx +++ b/desktop/app/src/reducers/supportForm.tsx @@ -49,6 +49,7 @@ export class Group { defaultPlugins: Array, supportedOS: Array, deeplinkSuffix: string, + papercuts?: string, ) { this.name = name; this.requiredPlugins = requiredPlugins; @@ -56,6 +57,7 @@ export class Group { this.workplaceGroupID = workplaceGroupID; this.supportedOS = supportedOS; this.deeplinkSuffix = deeplinkSuffix; + this.papercuts = papercuts; } readonly name: string; requiredPlugins: Array; @@ -63,6 +65,7 @@ export class Group { workplaceGroupID: number; supportedOS: Array; deeplinkSuffix: string; + papercuts?: string; getPluginsToSelect(): Array { return Array.from( @@ -261,6 +264,7 @@ const DEFAULT_GROUP = new Group( DEFAULT_SUPPORT_GROUP.defaultPlugins, DEFAULT_SUPPORT_GROUP.supportedOS, DEFAULT_SUPPORT_GROUP.deeplinkSuffix, + DEFAULT_SUPPORT_GROUP.papercuts, ); export const SUPPORTED_GROUPS: Array = [ @@ -273,6 +277,7 @@ export const SUPPORTED_GROUPS: Array = [ defaultPlugins, supportedOS, deeplinkSuffix, + papercuts, }) => { return new Group( name, @@ -281,6 +286,7 @@ export const SUPPORTED_GROUPS: Array = [ defaultPlugins, supportedOS, deeplinkSuffix, + papercuts, ); }, ),