From 31f7178669b2ea4e45264de52fb753f552488cb5 Mon Sep 17 00:00:00 2001 From: Asier Isayas Date: Fri, 2 Feb 2024 11:52:37 -0500 Subject: [PATCH] Change RU Threshold to 5000 (#1735) * ru threshold beta * use new ru threshold package * fix typo * fix merge issue * fix package-lock.json * fix test * fixed settings pane test * fixed merge issue * sync with main * fixed settings pane check * fix checks * fixed aria-label error * fixed aria-label error * fixed aria-label error * fixed aria-label error * remove learn more * change default RU threshold to 5000 * change default RU threshold to 5000 * change default RU threshold to 5000 --------- Co-authored-by: Asier Isayas --- src/Explorer/Panes/SettingsPane/SettingsPane.tsx | 6 +++--- .../SettingsPane/__snapshots__/SettingsPane.test.tsx.snap | 8 ++++---- src/Explorer/Tabs/Tabs.tsx | 7 ++++++- src/Shared/StorageUtility.ts | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/Explorer/Panes/SettingsPane/SettingsPane.tsx b/src/Explorer/Panes/SettingsPane/SettingsPane.tsx index d0bc5b23d..1f0eda4f7 100644 --- a/src/Explorer/Panes/SettingsPane/SettingsPane.tsx +++ b/src/Explorer/Panes/SettingsPane/SettingsPane.tsx @@ -386,10 +386,10 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({ labelPosition={Position.top} defaultValue={(ruThreshold || DefaultRUThreshold).toString()} min={1} - step={10} + step={1000} onChange={handleOnRUThresholdSpinButtonChange} - incrementButtonAriaLabel="Increase value by 10" - decrementButtonAriaLabel="Decrease value by 10" + incrementButtonAriaLabel="Increase value by 1000" + decrementButtonAriaLabel="Decrease value by 1000" styles={spinButtonStyles} /> diff --git a/src/Explorer/Panes/SettingsPane/__snapshots__/SettingsPane.test.tsx.snap b/src/Explorer/Panes/SettingsPane/__snapshots__/SettingsPane.test.tsx.snap index f6e6a66ba..6f4ac0c06 100644 --- a/src/Explorer/Panes/SettingsPane/__snapshots__/SettingsPane.test.tsx.snap +++ b/src/Explorer/Panes/SettingsPane/__snapshots__/SettingsPane.test.tsx.snap @@ -137,14 +137,14 @@ exports[`Settings Pane should render Default properly 1`] = `
{ onDismiss={() => { setShowRUThresholdMessageBar(false); }} + styles={{ + innerText: { + fontWeight: "bold", + }, + }} > { - "Avoid high cost queries! We automatically abort them if they exceed the set RU limit. To adjust your limit go to Settings > RU threshold." + "To prevent queries from using excessive RUs, Data Explorer has a 5,000 RU default limit. To modify or remove the limit, go to the Settings cog on the right and find 'RU Threshold'." } )} diff --git a/src/Shared/StorageUtility.ts b/src/Shared/StorageUtility.ts index b9b02ff11..b229ac7db 100644 --- a/src/Shared/StorageUtility.ts +++ b/src/Shared/StorageUtility.ts @@ -51,4 +51,4 @@ export const getRUThreshold = (): number => { return DefaultRUThreshold; }; -export const DefaultRUThreshold = 100; +export const DefaultRUThreshold = 5000;