Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
aca0d5e
Add radio group component
gjmooney Nov 27, 2025
c14766f
Add Command and Dialog
gjmooney Nov 27, 2025
23b7019
playing
gjmooney Nov 26, 2025
4c520cd
css
gjmooney Nov 28, 2025
2ef82b1
Move to hook
gjmooney Nov 28, 2025
fd76bc6
Compose hooks
gjmooney Dec 1, 2025
7830417
Better names
gjmooney Dec 1, 2025
4add0c6
Build filter object
gjmooney Dec 1, 2025
8bd81b4
Context refactor
gjmooney Dec 1, 2025
cc63cc2
Added limit; pagination wip
gjmooney Dec 1, 2025
99c1ac5
Move where links are saved
gjmooney Dec 2, 2025
646d1c1
Remove placeholder section
gjmooney Dec 2, 2025
f7c0325
Links in context
gjmooney Dec 2, 2025
19cd1b1
Might regret
gjmooney Dec 2, 2025
3328aef
pre moving context update to hook
gjmooney Dec 2, 2025
c0f728e
Remove redundant state
gjmooney Dec 4, 2025
a2f5c98
woooooooooo
gjmooney Dec 4, 2025
8b3975d
Remove debug logs
gjmooney Dec 4, 2025
06b2b0d
Restore add to map
gjmooney Dec 4, 2025
cb36a02
working mostly
gjmooney Dec 5, 2025
fa68f73
Move common stuff to generic hook
gjmooney Dec 5, 2025
30c9210
Big ole refactor
gjmooney Dec 5, 2025
2269589
Rename function
gjmooney Dec 8, 2025
fd15d9d
Use ref to build query
gjmooney Dec 8, 2025
624ad2e
Handle prev and use currentpage in UI
gjmooney Dec 8, 2025
6106816
CSS fix
gjmooney Dec 8, 2025
4217bf3
Thank god
gjmooney Dec 8, 2025
eefca66
Get total pages again
gjmooney Dec 8, 2025
b19941b
comments
gjmooney Dec 9, 2025
d73e43f
disable page numebr links
gjmooney Dec 9, 2025
e0d91d9
pagination works??
gjmooney Dec 9, 2025
70ce296
Accept prev and previous
gjmooney Dec 9, 2025
4dccfb4
Move addToMap to context
gjmooney Dec 9, 2025
826585b
handler comment for later
gjmooney Dec 9, 2025
36ab411
refactor execute query
gjmooney Dec 9, 2025
2cf4df1
paginatio update
gjmooney Dec 9, 2025
f4f6a4c
Remove redundant fetch finally
gjmooney Dec 9, 2025
df62591
Lint
gjmooney Dec 10, 2025
6c86560
Pagination stuff
gjmooney Dec 10, 2025
73cd7dd
Clean up
gjmooney Dec 10, 2025
11697ce
Some css
gjmooney Dec 10, 2025
642c8fb
Saving filter state but restore this
gjmooney Dec 10, 2025
a2c864d
Move inline styles to css
gjmooney Dec 11, 2025
8c15b33
Use border color for borders
gjmooney Dec 11, 2025
defd8d9
Still good
gjmooney Dec 11, 2025
c1a337f
Renaming is fun
gjmooney Dec 11, 2025
9378666
Clean round 1 fin
gjmooney Dec 11, 2025
c9a96d9
Better naming
gjmooney Dec 11, 2025
120ae6a
Use @ imports and remove unused things
gjmooney Dec 12, 2025
2b06061
Better typing for queries
gjmooney Dec 12, 2025
2eba2c5
Derive all state from hook
gjmooney Dec 12, 2025
4904303
I hate time
gjmooney Dec 12, 2025
0c90233
Ill never stop renaming
gjmooney Dec 12, 2025
7ee5db2
Move types where they go
gjmooney Dec 12, 2025
48925f0
Format datetime for display
gjmooney Dec 12, 2025
ea917b4
Dont set collection if there is one
gjmooney Dec 15, 2025
a3275d8
Hide panel until provider selected
gjmooney Dec 15, 2025
b9341e1
Move spatial/temporal extent to useStacSearch
gjmooney Dec 15, 2025
a341645
Query on filter change
gjmooney Dec 15, 2025
f85bf10
Better types
gjmooney Dec 15, 2025
e3b663c
Move inline styles to css classes
gjmooney Dec 15, 2025
8b1d36d
oh boy
gjmooney Dec 16, 2025
b5a8ebc
Much css tweaking
gjmooney Dec 16, 2025
844b3eb
Combobox select thing
gjmooney Dec 16, 2025
847530e
Well yea it all just looks like shadcn now woops
gjmooney Dec 16, 2025
1be85ea
Grid queryable rows
gjmooney Dec 17, 2025
d82c53d
CSS 4eva
gjmooney Dec 17, 2025
7f73ed0
Move components around
gjmooney Dec 17, 2025
525cabc
Lint
gjmooney Dec 17, 2025
a51f033
Pagination fix
gjmooney Dec 17, 2025
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
7 changes: 5 additions & 2 deletions packages/base/src/panelview/leftpanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
TabsList,
TabsTrigger,
} from '../shared/components/Tabs';
import StacPanel from '../stacBrowser/components/StacPanel';
import FilterComponent from './components/filter-panel/Filter';
import StacPanel from '../stacBrowser/components/StacPanel';

export interface ILeftPanelClickHandlerParams {
type: SelectionType;
Expand Down Expand Up @@ -210,7 +210,10 @@ export const LeftPanel: React.FC<ILeftPanelProps> = (
)}

{!settings.stacBrowserDisabled && (
<TabsContent value="stac" className="jgis-panel-tab-content">
<TabsContent
value="stac"
className="jgis-panel-tab-content jgis-panel-tab-content-stac-panel"
>
<StacPanel model={props.model} />
</TabsContent>
)}
Expand Down
70 changes: 70 additions & 0 deletions packages/base/src/shared/components/Combobox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import { ChevronsUpDownIcon } from 'lucide-react';
import React, { ReactNode, useState } from 'react';

import { Button } from '@/src/shared/components/Button';
import {
Command,
CommandEmpty,
CommandGroup,
CommandInput,
CommandList,
} from '@/src/shared/components/Command';
import {
Popover,
PopoverContent,
PopoverTrigger,
} from '@/src/shared/components/Popover';
import { cn } from './utils';

interface IComboboxProps {
children: ReactNode;
buttonText: string;
searchPlaceholder?: string;
emptyText?: string;
className?: string;
buttonClassName?: string;
open?: boolean;
onOpenChange?: (open: boolean) => void;
showSearch?: boolean;
}

export function Combobox({
children,
buttonText,
searchPlaceholder = 'Search...',
emptyText = 'No option found.',
className,
buttonClassName,
open: controlledOpen,
onOpenChange: controlledOnOpenChange,
showSearch = true,
}: IComboboxProps) {
const [internalOpen, setInternalOpen] = useState(false);
const open = controlledOpen !== undefined ? controlledOpen : internalOpen;
const setOpen = controlledOnOpenChange || setInternalOpen;

return (
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<Button
variant="outline"
role="combobox"
aria-expanded={open}
className={cn('jgis-combobox-button', buttonClassName)}
>
<span className="jgis-combobox-button-text">{buttonText}</span>
<ChevronsUpDownIcon className="jgis-combobox-icon" />
</Button>
</PopoverTrigger>
<PopoverContent className={cn('jgis-combobox-popover', className)}>
<Command>
{showSearch && <CommandInput placeholder={searchPlaceholder} />}
<CommandList>
<CommandEmpty>{emptyText}</CommandEmpty>
<CommandGroup>{children}</CommandGroup>
</CommandList>
</Command>
</PopoverContent>
</Popover>
);
}
40 changes: 10 additions & 30 deletions packages/base/src/shared/components/Command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ function Command({
return (
<CommandPrimitive
data-slot="command"
className={cn(
'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',
className,
)}
className={cn('jgis-command', className)}
{...props}
/>
);
Expand All @@ -47,12 +44,10 @@ function CommandDialog({
<DialogDescription>{description}</DialogDescription>
</DialogHeader>
<DialogContent
className={cn('overflow-hidden p-0', className)}
className={cn(className)}
showCloseButton={showCloseButton}
>
<Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
{children}
</Command>
<Command>{children}</Command>
</DialogContent>
</Dialog>
);
Expand All @@ -65,15 +60,12 @@ function CommandInput({
return (
<div
data-slot="command-input-wrapper"
className="flex h-9 items-center gap-2 border-b px-3"
className="jgis-command-input-wrapper"
>
<SearchIcon className="size-4 shrink-0 opacity-50" />
<SearchIcon className="size-4" />
<CommandPrimitive.Input
data-slot="command-input"
className={cn(
'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',
className,
)}
className={cn('jgis-command-input', className)}
{...props}
/>
</div>
Expand All @@ -87,10 +79,7 @@ function CommandList({
return (
<CommandPrimitive.List
data-slot="command-list"
className={cn(
'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto',
className,
)}
className={cn('jgis-command-list', className)}
{...props}
/>
);
Expand All @@ -115,10 +104,7 @@ function CommandGroup({
return (
<CommandPrimitive.Group
data-slot="command-group"
className={cn(
'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',
className,
)}
className={cn('jgis-command-group', className)}
{...props}
/>
);
Expand All @@ -144,10 +130,7 @@ function CommandItem({
return (
<CommandPrimitive.Item
data-slot="command-item"
className={cn(
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
className,
)}
className={cn('jgis-command-item', className)}
{...props}
/>
);
Expand All @@ -160,10 +143,7 @@ function CommandShortcut({
return (
<span
data-slot="command-shortcut"
className={cn(
'text-muted-foreground ml-auto text-xs tracking-widest',
className,
)}
className={cn('jgis-command-shortcut', className)}
{...props}
/>
);
Expand Down
11 changes: 11 additions & 0 deletions packages/base/src/shared/components/Input.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { cn } from './utils';

function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
return (
<input type={type} data-slot="input" className={cn(className)} {...props} />
);
}

export { Input };
5 changes: 3 additions & 2 deletions packages/base/src/shared/components/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';
import * as React from 'react';

import { Button, ButtonProps } from './Button';
import { cn } from './utils';

const Pagination: React.FC<React.ComponentProps<'nav'>> = ({ ...props }) => (
<nav
Expand All @@ -16,8 +17,8 @@ Pagination.displayName = 'Pagination';
const PaginationContent = React.forwardRef<
HTMLUListElement,
React.ComponentProps<'ul'>
>(({ ...props }, ref) => (
<ul ref={ref} className={'jgis-pagination-content'} {...props} />
>(({ className, ...props }, ref) => (
<ul ref={ref} className={cn('jgis-pagination-content', className)} {...props} />
));
PaginationContent.displayName = 'PaginationContent';

Expand Down
50 changes: 50 additions & 0 deletions packages/base/src/shared/components/SingleDatePicker.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { format } from 'date-fns';
import { CalendarIcon } from 'lucide-react';
import React from 'react';

import { Button } from '@/src/shared/components/Button';
import { Calendar } from '@/src/shared/components/Calendar';
import {
Popover,
PopoverContent,
PopoverTrigger,
} from '@/src/shared/components/Popover';

interface ISingleDatePickerProps {
date: Date | undefined;
onDateChange: (date: Date | undefined) => void;
placeholder?: string;
className?: string;
dateFormat?: string;
showIcon?: boolean;
}

function SingleDatePicker({
date,
onDateChange,
placeholder = 'Select date',
className,
dateFormat = 'PPP',
showIcon = true,
}: ISingleDatePickerProps) {
return (
<Popover>
<PopoverTrigger asChild>
<Button className={className} variant="outline">
{showIcon && <CalendarIcon className="jgis-stac-datepicker-icon" />}
{date ? format(date, dateFormat) : <span>{placeholder}</span>}
</Button>
</PopoverTrigger>
<PopoverContent>
<Calendar
mode="single"
selected={date}
onSelect={onDateChange}
autoFocus
/>
</PopoverContent>
</Popover>
);
}

export default SingleDatePicker;
Loading
Loading