From 9d47c4b417295a640bbc0284e34342cbf4bf85be Mon Sep 17 00:00:00 2001
From: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Date: Mon, 26 May 2025 06:38:38 -0700
Subject: [PATCH] [no gbp] more input changes (#91271)
## About The Pull Request
turns out simply debouncing input wasn't the correct answer to solving
many of the inputs in the game. on that account, i apologize for my
mistake. now that we have the `onBlur` prop (which was the old and
erroneously named `onChange`), most interfaces that were once marked
`expensive` are now only triggered on clicking out, escape, or enter.
here are interfaces which i deemed still worthy of the `expensive` prop,
and yes this is okay to debate me on:
- smartvend
- stackcrafting
- vending
- cargo catalog
- design browser (fabricators)
- records (security/medical consoles)
- orbit
- techweb
Generally these UIs just deal with big lists or do some sort of data
manipulation for filtering
([example](https://github.com/tgstation/tgstation/blob/master/tgui/packages/tgui/interfaces/Cargo/helpers.ts)),
thus I thought were valid to slow down while you finish typing (but not
totally freeze)
## Why It's Good For The Game
this should fix a number of issues, some unreported still.
## Changelog
:cl:
fix: Tgui inputs have been tweaked again to fix issues and seem more
responsive.
/:cl:
---
tgui/packages/tgui-panel/chat/ChatPageSettings.tsx | 3 +--
.../packages/tgui-panel/settings/SettingsGeneral.tsx | 3 +--
tgui/packages/tgui-panel/settings/TextHighlight.tsx | 6 ++----
tgui/packages/tgui/interfaces/AiVoiceChanger.tsx | 6 ++----
tgui/packages/tgui/interfaces/AirlockElectronics.tsx | 6 ++----
.../tgui/interfaces/AutomatedAnnouncement.tsx | 10 ++--------
tgui/packages/tgui/interfaces/BountyBoard.tsx | 3 +--
tgui/packages/tgui/interfaces/CameraConsole.tsx | 1 -
tgui/packages/tgui/interfaces/Cargo/CargoCatalog.tsx | 1 +
tgui/packages/tgui/interfaces/ChemPress.tsx | 3 +--
tgui/packages/tgui/interfaces/CommandReport.tsx | 2 +-
.../tgui/interfaces/ControllerOverview/index.tsx | 1 -
tgui/packages/tgui/interfaces/CrewConsole.tsx | 1 -
tgui/packages/tgui/interfaces/CyborgBootDebug.jsx | 3 +--
.../tgui/interfaces/Fabrication/DesignBrowser.tsx | 1 +
tgui/packages/tgui/interfaces/Filteriffic.jsx | 6 ++----
tgui/packages/tgui/interfaces/FishAnalyzer.tsx | 1 -
tgui/packages/tgui/interfaces/ForceEvent.tsx | 1 -
.../packages/tgui/interfaces/GreyscaleModifyMenu.tsx | 9 +++------
.../tgui/interfaces/HighLuminosityEyesMenu.tsx | 9 +++------
tgui/packages/tgui/interfaces/HoloPay.tsx | 3 +--
tgui/packages/tgui/interfaces/HypnoChair.jsx | 3 +--
.../interfaces/IntegratedCircuit/ComponentMenu.jsx | 1 -
.../tgui/interfaces/IntegratedCircuit/index.jsx | 3 +--
tgui/packages/tgui/interfaces/LTSRBT.tsx | 6 ++----
tgui/packages/tgui/interfaces/LaunchpadConsole.tsx | 3 +--
.../packages/tgui/interfaces/LibraryAdmin/Search.tsx | 12 ++++--------
.../LibraryConsole/components/PageSelect.tsx | 3 +--
.../interfaces/LibraryConsole/components/Search.tsx | 9 +++------
.../interfaces/LibraryConsole/screens/Upload.tsx | 6 ++----
tgui/packages/tgui/interfaces/LibraryVisitor.jsx | 9 +++------
.../interfaces/ListInputWindow/ListInputModal.tsx | 1 -
tgui/packages/tgui/interfaces/LogViewer.tsx | 7 +------
tgui/packages/tgui/interfaces/LootPanel/index.tsx | 1 -
tgui/packages/tgui/interfaces/MechpadConsole.jsx | 3 +--
tgui/packages/tgui/interfaces/Newscaster.jsx | 9 +++------
tgui/packages/tgui/interfaces/NtosCard.tsx | 6 ++----
tgui/packages/tgui/interfaces/NtosEmojipedia.tsx | 1 -
tgui/packages/tgui/interfaces/NtosNetDownloader.tsx | 1 -
.../packages/tgui/interfaces/NtosPortraitPrinter.jsx | 3 +--
tgui/packages/tgui/interfaces/NtosScipaper.jsx | 9 +++------
tgui/packages/tgui/interfaces/OreContainer.tsx | 1 -
.../tgui/interfaces/OreRedemptionMachine.tsx | 1 +
tgui/packages/tgui/interfaces/Pandemic/Virus.tsx | 3 +--
.../tgui/interfaces/ParticleEdit/EntriesBasic.tsx | 9 +++------
.../interfaces/ParticleEdit/EntriesGenerators.tsx | 3 +--
.../packages/tgui/interfaces/PlayerTicketHistory.tsx | 3 +--
tgui/packages/tgui/interfaces/PortraitPicker.jsx | 3 +--
.../CharacterPreferences/MainPage.tsx | 1 -
.../CharacterPreferences/QuirksPage.tsx | 1 -
tgui/packages/tgui/interfaces/RequestManager.tsx | 1 -
tgui/packages/tgui/interfaces/SeedExtractor.tsx | 1 -
tgui/packages/tgui/interfaces/SelectEquipment.jsx | 1 -
.../packages/tgui/interfaces/SentienceFunBalloon.jsx | 3 +--
tgui/packages/tgui/interfaces/Spellbook.tsx | 1 -
tgui/packages/tgui/interfaces/StackCrafting.tsx | 1 +
tgui/packages/tgui/interfaces/Telecomms.jsx | 6 ++----
.../tgui/interfaces/Uplink/GenericUplink.tsx | 1 -
.../tgui/interfaces/common/AtmosHandbook.tsx | 3 +--
tgui/packages/tgui/interfaces/common/SearchBar.tsx | 5 ++++-
60 files changed, 71 insertions(+), 152 deletions(-)
diff --git a/tgui/packages/tgui-panel/chat/ChatPageSettings.tsx b/tgui/packages/tgui-panel/chat/ChatPageSettings.tsx
index 5725c10ad78..463ec0c2dd5 100644
--- a/tgui/packages/tgui-panel/chat/ChatPageSettings.tsx
+++ b/tgui/packages/tgui-panel/chat/ChatPageSettings.tsx
@@ -50,9 +50,8 @@ export function ChatPageSettings(props) {
+ onBlur={(value) =>
dispatch(
updateChatPage({
pageId: page.id,
diff --git a/tgui/packages/tgui-panel/settings/SettingsGeneral.tsx b/tgui/packages/tgui-panel/settings/SettingsGeneral.tsx
index 25bd8881806..4f09da97a06 100644
--- a/tgui/packages/tgui-panel/settings/SettingsGeneral.tsx
+++ b/tgui/packages/tgui-panel/settings/SettingsGeneral.tsx
@@ -114,8 +114,7 @@ export function SettingsGeneral(props) {
+ onBlur={(value) =>
dispatch(
updateSettings({
fontFamily: value,
diff --git a/tgui/packages/tgui-panel/settings/TextHighlight.tsx b/tgui/packages/tgui-panel/settings/TextHighlight.tsx
index ab146886523..29d28b3647b 100644
--- a/tgui/packages/tgui-panel/settings/TextHighlight.tsx
+++ b/tgui/packages/tgui-panel/settings/TextHighlight.tsx
@@ -153,12 +153,11 @@ function TextHighlightSetting(props) {
+ onBlur={(value) =>
dispatch(
updateHighlightSetting({
id: id,
@@ -170,12 +169,11 @@ function TextHighlightSetting(props) {
diff --git a/tgui/packages/tgui/interfaces/common/AtmosHandbook.tsx b/tgui/packages/tgui/interfaces/common/AtmosHandbook.tsx
index e299d5d097a..13fdd776416 100644
--- a/tgui/packages/tgui/interfaces/common/AtmosHandbook.tsx
+++ b/tgui/packages/tgui/interfaces/common/AtmosHandbook.tsx
@@ -59,8 +59,7 @@ const GasSearchBar = (props: {
{activeInput ? (
{
+ onBlur={(value) => {
setActiveInput(false);
onChange(value);
}}
diff --git a/tgui/packages/tgui/interfaces/common/SearchBar.tsx b/tgui/packages/tgui/interfaces/common/SearchBar.tsx
index 4d7ddd3a2ac..d12090b3f62 100644
--- a/tgui/packages/tgui/interfaces/common/SearchBar.tsx
+++ b/tgui/packages/tgui/interfaces/common/SearchBar.tsx
@@ -11,6 +11,8 @@ type RequiredProps = {
type OptionalProps = Partial<{
/** Whether the input should be focused on mount. */
autoFocus: boolean;
+ /** Whether to debounce the input. For huge lists. */
+ expensive: boolean;
/** Whether to show the search icon. */
noIcon: boolean;
/** The placeholder text. */
@@ -28,6 +30,7 @@ type Props = RequiredProps & OptionalProps;
export function SearchBar(props: Props) {
const {
autoFocus,
+ expensive,
noIcon = false,
onSearch,
placeholder = 'Search...',
@@ -43,7 +46,7 @@ export function SearchBar(props: Props) {