generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace all useModules and useStream callers in ModulesPage wit…
…h useStreamModules (#3057) This leaves the legacy stuff alone and just refactors the newer pieces, with a long list of minor bug fixes built in. https://github.com/user-attachments/assets/07280879-ed11-40ec-ab0d-89a3edd7471b --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
008ee44
commit 54bb6e2
Showing
25 changed files
with
314 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 7 additions & 4 deletions
11
frontend/console/src/features/modules/decls/ConfigPanel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
import type { Data } from '../../../protos/xyz/block/ftl/v1/schema/schema_pb' | ||
import { DataSnippet } from './DataSnippet' | ||
import { Schema } from '../schema/Schema' | ||
import { PanelHeader } from './PanelHeader' | ||
|
||
export const DataPanel = ({ value, moduleName, declName }: { value: Data; moduleName: string; declName: string }) => { | ||
export const DataPanel = ({ value, schema, moduleName, declName }: { value: Data; schema: string; moduleName: string; declName: string }) => { | ||
if (!value || !schema) { | ||
return | ||
} | ||
const maybeTypeParams = value.typeParameters.length === 0 ? '' : `<${value.typeParameters.map((p) => p.name).join(', ')}>` | ||
return ( | ||
<div className='py-2 px-4'> | ||
<PanelHeader exported={value.export} comments={value.comments}> | ||
data: {moduleName}.{declName} | ||
{maybeTypeParams} | ||
</PanelHeader> | ||
<DataSnippet value={value} /> | ||
<div className='-mx-3.5'> | ||
<Schema schema={schema} /> | ||
</div> | ||
</div> | ||
) | ||
} |
22 changes: 0 additions & 22 deletions
22
frontend/console/src/features/modules/decls/DataSnippet.tsx
This file was deleted.
Oops, something went wrong.
7 changes: 5 additions & 2 deletions
7
frontend/console/src/features/modules/decls/DatabasePanel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
import type { Database } from '../../../protos/xyz/block/ftl/v1/schema/schema_pb' | ||
import { Schema } from '../schema/Schema' | ||
import { PanelHeader } from './PanelHeader' | ||
|
||
export const DatabasePanel = ({ value, moduleName, declName }: { value: Database; moduleName: string; declName: string }) => { | ||
export const DatabasePanel = ({ value, schema, moduleName, declName }: { value: Database; schema: string; moduleName: string; declName: string }) => { | ||
return ( | ||
<div className='py-2 px-4'> | ||
<PanelHeader exported={false} comments={value.comments}> | ||
Database: {moduleName}.{declName} | ||
</PanelHeader> | ||
<div className='text-sm my-4'>Type: {value.type}</div> | ||
<div className='-mx-3.5'> | ||
<Schema schema={schema} /> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.