Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ dist
dump.rdb
env
venv*
.cursor/*
env_py3
envpy3
local_config.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,9 @@ export const VIZ_TYPE_CONTROL_TEST_ID = 'viz-type-control';
const VizPickerLayout = styled.div<{ isSelectedVizMetadata: boolean }>`
${({ isSelectedVizMetadata }) => `
display: grid;
grid-template-rows: ${
isSelectedVizMetadata
? `auto minmax(100px, 1fr) minmax(200px, 35%)`
: 'auto minmax(100px, 1fr)'
grid-template-rows: ${isSelectedVizMetadata
? `auto minmax(100px, 1fr) minmax(200px, 35%)`
: 'auto minmax(100px, 1fr)'
};
// em is used here because the sidebar should be sized to fit the longest standard tag
grid-template-columns: minmax(14em, auto) 5fr;
Expand Down Expand Up @@ -585,6 +584,13 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) {
searchInputRef.current!.blur();
}, []);

// Auto-focus the search input when the component mounts (modal opens)
useEffect(() => {
if (searchInputRef.current) {
searchInputRef.current.focus();
}
}, []);

const clickSelector = useCallback(
(selector: string, sectionId: string) => {
if (isSearchFocused) {
Expand Down Expand Up @@ -818,11 +824,11 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) {
{(selectedVizMetadata?.exampleGallery?.length
? selectedVizMetadata.exampleGallery
: [
{
url: selectedVizMetadata?.thumbnail,
caption: selectedVizMetadata?.name,
},
]
{
url: selectedVizMetadata?.thumbnail,
caption: selectedVizMetadata?.name,
},
]
).map(example => (
<img
key={example.url}
Expand Down