-
Notifications
You must be signed in to change notification settings - Fork 17
feat(Preview): add preview for topics #2292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
8b36d23
7f897d2
66c82df
a61f8d9
d68d4c9
2dd278e
6d6f786
908a351
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,15 +12,17 @@ import type {PreviewContainerProps} from './types'; | |
| import './Preview.scss'; | ||
|
|
||
| export function PreviewContainer(props: PreviewContainerProps) { | ||
| const {type} = props; | ||
| const {type, subType} = props; | ||
| const isTable = isTableType(type); | ||
| const isTopic = type === EPathType.EPathTypePersQueueGroup; | ||
| const isTopicPreviewAvailable = useTopicDataAvailable(); | ||
|
|
||
| if (isTable) { | ||
| return <TablePreview {...props} />; | ||
| } | ||
| if (isTopic && isTopicPreviewAvailable) { | ||
|
|
||
| // preview is not available for topics inside CDC (has subtype) | ||
| if (isTopic && !subType && isTopicPreviewAvailable) { | ||
|
||
| return <TopicPreview {...props} />; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| import type {EPathType} from '../../../../types/api/schema'; | ||
| import type {EPathSubType, EPathType} from '../../../../types/api/schema'; | ||
|
|
||
| export interface PreviewContainerProps { | ||
| database: string; | ||
| path: string; | ||
| type?: EPathType; | ||
| subType?: EPathSubType; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, rebase you PR and check whether it works for topics inside CDC. If it doesn't work, create an issue and disable preview for them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean
EPathSubType.EPathSubTypeStreamImpl, I restored them here: #2281