Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

fix(ui): give comboboxes generic search and empty-result text

Josh Corbett6890d275594f
diff --git a/invokeai/frontend/webv2/public/locales/en.json b/invokeai/frontend/webv2/public/locales/en.json
index daffcff1ea..1aed2eabd2 100644
--- a/invokeai/frontend/webv2/public/locales/en.json
+++ b/invokeai/frontend/webv2/public/locales/en.json
@@ -181,9 +181,9 @@
"clearSearch": "Clear search",
"dontShowMeThese": "Don't show me these",
"learnMore": "Learn more",
- "noSchedulersFound": "No schedulers found",
+ "noOptionsFound": "No matches",
"openSelector": "Open selector",
- "searchSchedulers": "Search schedulers…",
+ "searchOptions": "Search…",
"close": "Close",
"colorPicker": {
"format": "Color format",
diff --git a/invokeai/frontend/webv2/src/platform/ui/Combobox.browser.test.tsx b/invokeai/frontend/webv2/src/platform/ui/Combobox.browser.test.tsx
index 6392278b02..97a1693d10 100644
--- a/invokeai/frontend/webv2/src/platform/ui/Combobox.browser.test.tsx
+++ b/invokeai/frontend/webv2/src/platform/ui/Combobox.browser.test.tsx
@@ -24,9 +24,9 @@ void i18n.use(initReactI18next).init({
en: {
translation: {
common: {
- noSchedulersFound: 'No schedulers found',
+ noOptionsFound: 'No matches',
openSelector: 'Open selector',
- searchSchedulers: 'Search schedulers…',
+ searchOptions: 'Search…',
},
},
},
@@ -137,7 +137,7 @@ describe('Combobox', () => {
expect(document.querySelector('[role="option"]')?.textContent).toContain('DPM++ 2M');
await setInputValue(input, 'not-a-scheduler');
- expect(document.body.textContent).toContain('No schedulers found');
+ expect(document.body.textContent).toContain('No matches');
});
it('keeps an option that matches secondary server-search text', async () => {
diff --git a/invokeai/frontend/webv2/src/platform/ui/Combobox.tsx b/invokeai/frontend/webv2/src/platform/ui/Combobox.tsx
index af5d795a01..3c4f201232 100644
--- a/invokeai/frontend/webv2/src/platform/ui/Combobox.tsx
+++ b/invokeai/frontend/webv2/src/platform/ui/Combobox.tsx
@@ -185,7 +185,7 @@ export const Combobox = ({
<ChakraCombobox.Input
{...inputProps}
aria-label={inputProps?.['aria-label'] ?? ariaLabel}
- placeholder={searchPlaceholder ?? t('common.searchSchedulers')}
+ placeholder={searchPlaceholder ?? t('common.searchOptions')}
/>
<ChakraCombobox.IndicatorGroup>
<ChakraCombobox.Trigger aria-label={t('common.openSelector')}>
@@ -207,7 +207,7 @@ export const Combobox = ({
</ChakraCombobox.Item>
))}
<ChakraCombobox.Empty color="fg.muted" fontSize="md" px="3" py="2">
- {noResultsText ?? t('common.noSchedulersFound')}
+ {noResultsText ?? t('common.noOptionsFound')}
</ChakraCombobox.Empty>
</ChakraCombobox.List>
</Scrollable>