Introduce support request details form
Summary: Initial setup for a support detail form. Will only show up if meta data is present in the flipper file, so use the attached one to see it. Reviewed By: jknoxville Differential Revision: D18479193 fbshipit-source-id: 61da089f1e883fea20b2422a6bea99b2f8a4434b
This commit is contained in:
committed by
Facebook Github Bot
parent
a578b4d559
commit
d2ab55a6f8
@@ -48,6 +48,7 @@ export type ExportType = {
|
||||
pluginStates: PluginStatesExportState;
|
||||
activeNotifications: Array<PluginNotification>;
|
||||
};
|
||||
supportRequestDetails?: SupportRequestDetailsMetaData;
|
||||
};
|
||||
|
||||
type ProcessPluginStatesOptions = {
|
||||
@@ -81,6 +82,15 @@ type AddSaltToDeviceSerialOptions = {
|
||||
statusUpdate?: (msg: string) => void;
|
||||
};
|
||||
|
||||
export type SupportRequestDetailsMetaData = {
|
||||
title: string;
|
||||
app: string;
|
||||
description: string;
|
||||
commitHash: string;
|
||||
screenshots: {image: string; description: string}[];
|
||||
videos: {url: string; description: string}[];
|
||||
};
|
||||
|
||||
export function processClients(
|
||||
clients: Array<ClientExport>,
|
||||
serial: string,
|
||||
@@ -577,7 +587,7 @@ export const exportStoreToFile = (
|
||||
export function importDataToStore(source: string, data: string, store: Store) {
|
||||
getLogger().track('usage', IMPORT_FLIPPER_TRACE_EVENT);
|
||||
const json: ExportType = JSON.parse(data);
|
||||
const {device, clients} = json;
|
||||
const {device, clients, supportRequestDetails} = json;
|
||||
if (device == null) {
|
||||
return;
|
||||
}
|
||||
@@ -593,6 +603,7 @@ export function importDataToStore(source: string, data: string, store: Store) {
|
||||
})
|
||||
: [],
|
||||
source,
|
||||
supportRequestDetails,
|
||||
);
|
||||
const devices = store.getState().connections.devices;
|
||||
const matchedDevices = devices.filter(
|
||||
|
||||
Reference in New Issue
Block a user