From e87ec625524a5055820ae8834655160c6e562551 Mon Sep 17 00:00:00 2001 From: Andrey Goncharov Date: Wed, 30 Aug 2023 07:26:35 -0700 Subject: [PATCH] Remove ordering support for mvp Summary: Project doc: https://docs.google.com/document/d/1miofxds9DJgWScj0zFyBbdpRH5Rj0T9FqiCapof5-vU Reviewed By: lblasa Differential Revision: D48600046 fbshipit-source-id: 9ded79616a822759f0c74dd1e5c6ce6c120b8350 --- .../src/ui/PowerSearch/PowerSearchConfig.tsx | 2 -- .../PowerSearch/PowerSearchExampleConfig.tsx | 22 ------------------- 2 files changed, 24 deletions(-) diff --git a/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchConfig.tsx b/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchConfig.tsx index f69e3782f..0bc887d52 100644 --- a/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchConfig.tsx +++ b/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchConfig.tsx @@ -85,11 +85,9 @@ export type FieldConfig = { key: string; label: string; operators: {[key: string]: OperatorConfig}; - operatorMenuDisplayOrder: string[]; }; export type PowerSearchConfig = { name: string; fields: {[key: string]: FieldConfig}; - fieldKeyTypeaheadOrder?: string[]; }; diff --git a/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchExampleConfig.tsx b/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchExampleConfig.tsx index 851e97f01..1f67d420b 100644 --- a/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchExampleConfig.tsx +++ b/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchExampleConfig.tsx @@ -165,7 +165,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { in: operators.in, not_in: operators.not_in, }, - operatorMenuDisplayOrder: ['in', 'not_in'], }, title: { key: 'title', @@ -174,7 +173,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { contain: operators.contain, not_contain: operators.not_contain, }, - operatorMenuDisplayOrder: ['contain', 'not_contain'], }, description: { key: 'description', @@ -183,7 +181,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { contain: operators.contain, not_contain: operators.not_contain, }, - operatorMenuDisplayOrder: ['contain', 'not_contain'], }, placeholder: { key: 'placeholder', @@ -192,10 +189,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { predictive_contain: operators.predictive_contain, predictive_not_contain: operators.predictive_not_contain, }, - operatorMenuDisplayOrder: [ - 'predictive_contain', - 'predictive_not_contain', - ], }, lines: { key: 'lines', @@ -204,7 +197,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { greater_than: operators.greater_than, less_than: operators.less_than, }, - operatorMenuDisplayOrder: ['greater_than', 'less_than'], }, cost: { key: 'cost', @@ -213,7 +205,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { greater_than_float: operators.greater_than_float, less_than_float: operators.less_than_float, }, - operatorMenuDisplayOrder: ['greater_than_float', 'less_than_float'], }, status: { key: 'status', @@ -222,7 +213,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { status_any: operators.status_any, status_not_any: operators.status_not_any, }, - operatorMenuDisplayOrder: ['status_any', 'status_not_any'], }, caller: { key: 'caller', @@ -230,7 +220,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { operators: { caller_is: operators.caller_is, }, - operatorMenuDisplayOrder: ['caller_is'], }, macro: { key: 'macro', @@ -239,7 +228,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { macro_is: operators.macro_is, macro_is_not: operators.macro_is_not, }, - operatorMenuDisplayOrder: ['macro_is', 'macro_is_not'], }, time: { key: 'time', @@ -247,7 +235,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { operators: { time_after: operators.time_after, }, - operatorMenuDisplayOrder: ['time_after'], }, filtered_time: { key: 'filtered_time', @@ -255,7 +242,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { operators: { filtered_time_after: operators.filtered_time_after, }, - operatorMenuDisplayOrder: ['filtered_time_after'], }, last_update: { key: 'last_update', @@ -266,11 +252,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { newer_than_absolute_date_no_time: operators.newer_than_absolute_date_no_time, }, - operatorMenuDisplayOrder: [ - 'newer_than_relative_date', - 'newer_than_absolute_date', - 'newer_than_absolute_date_no_time', - ], }, unread_only: { key: 'unread_only', @@ -278,7 +259,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { operators: { unread: operators.unread, }, - operatorMenuDisplayOrder: ['unread_only'], }, NESTED_FIELD: { key: 'NESTED_FIELD', @@ -300,7 +280,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { valueType: 'NESTED', }, }, - operatorMenuDisplayOrder: ['AND', 'NOT', 'OR'], }, CONTEXT_TOKEN: { key: 'CONTEXT_TOKEN', @@ -312,7 +291,6 @@ export const powerSearchExampleConfig: PowerSearchConfig = { valueType: 'NO_VALUE', }, }, - operatorMenuDisplayOrder: [], }, }, };