Generalized frontend model store (#193)

This commit is contained in:
Gregory Schier
2025-03-31 11:56:17 -07:00
committed by GitHub
parent ce885c3551
commit f1757ae427
201 changed files with 2185 additions and 2865 deletions

View File

@@ -21,7 +21,7 @@ import { Editor } from './core/Editor/Editor';
import { FormattedError } from './core/FormattedError';
import { InlineCode } from './core/InlineCode';
import { VStack } from './core/Stacks';
import { GrpcProtoSelection } from './GrpcProtoSelection';
import { GrpcProtoSelectionDialog } from './GrpcProtoSelectionDialog';
type Props = Pick<EditorProps, 'heightMode' | 'onChange' | 'className' | 'forceUpdateKey'> & {
services: ReflectResponseService[] | null;
@@ -143,13 +143,7 @@ export function GrpcEditor({
title: 'Configure Schema',
size: 'md',
id: 'reflection-failed',
render: ({ hide }) => {
return (
<VStack space={6} className="pb-5">
<GrpcProtoSelection onDone={hide} requestId={request.id} />
</VStack>
);
},
render: ({ hide }) => <GrpcProtoSelectionDialog onDone={hide} />,
});
}}
>
@@ -167,14 +161,7 @@ export function GrpcEditor({
</Button>
</div>,
],
[
protoFiles.length,
reflectionError,
reflectionLoading,
reflectionUnavailable,
request.id,
services,
],
[protoFiles.length, reflectionError, reflectionLoading, reflectionUnavailable, services],
);
return (