Fix name casing to make plugin more easily findable

Summary:
Noticed in https://fb.workplace.com/groups/flippersupport/permalink/1305583723255616/ that always shows at the end of the plugin list.

Fixed this on two levels:
1. uppercase the title for consistency
2. Make sorting case insensitive

Differential Revision: D33985518

fbshipit-source-id: 70bed519e1ae5b3251b103931472844b2b55a512
This commit is contained in:
Michel Weststrate
2022-02-04 01:14:01 -08:00
committed by Facebook GitHub Bot
parent c97cf6eaf8
commit 762267bccc

View File

@@ -125,7 +125,9 @@ export function sortPluginsByName(
if (isDevicePluginDefinition(b) && !isDevicePluginDefinition(a)) {
return 1;
}
return getPluginTitle(a) > getPluginTitle(b) ? 1 : -1;
return getPluginTitle(a).toLowerCase() > getPluginTitle(b).toLocaleLowerCase()
? 1
: -1;
}
export function isDevicePlugin(activePlugin: ActivePluginListItem) {