Websockets for plugin runtime communication (#156)

This commit is contained in:
Gregory Schier
2025-01-20 10:55:53 -08:00
committed by GitHub
parent 095aaa5e92
commit b698a56549
54 changed files with 841 additions and 1185 deletions

View File

@@ -23,7 +23,7 @@ export function UrlParametersEditor({ pairs, forceUpdateKey, onChange, stateKey
if (pairIndex >= 0) {
pairEditor.current?.focusValue(pairIndex);
} else {
console.log("Couldn't find pair to focus", { name, pairs });
console.log(`Couldn't find pair to focus`, { name, pairs });
}
},
[pairs],

View File

@@ -52,7 +52,6 @@ export function WindowControls({ className, onlyX }: Props) {
await w.maximize();
setMaximized(true);
}
console.log("TOGGLE", isMaximized);
}}
>
{maximized ? (

View File

@@ -122,8 +122,8 @@ export const Dropdown = forwardRef<DropdownRef, DropdownProps>(function Dropdown
// we have of detecting the dropdown closed, to do cleanup.
useEffect(() => {
if (!isOpen) {
buttonRef.current?.focus(); // Focus button
buttonRef.current!.style.backgroundColor = ''; // Clear persisted BG
// Clear persisted BG
buttonRef.current!.style.backgroundColor = '';
// Set to different value when opened and closed to force it to update. This is to force
// <Menu/> to reset its selected-index state, which it does when this prop changes
setDefaultSelectedIndex(null);

View File

@@ -57,7 +57,7 @@ export function Toast({ children, open, onClose, timeout, action, icon, color }:
<div
className={classNames(
`x-theme-toast x-theme-toast--${color}`,
'pointer-events-auto overflow-hidden',
'pointer-events-auto overflow-hidden break-all',
'relative pointer-events-auto bg-surface text-text rounded-lg',
'border border-border shadow-lg w-[25rem]',
'grid grid-cols-[1fr_auto]',