-
Notifications
You must be signed in to change notification settings - Fork 15
feat(TopicData): add tab for topic data #2145
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
6d17e25
refactor: new DebouncedInput component
Raubzeug 6c8e838
feat(Partitions): partition id is string now
Raubzeug 05a07c0
refactor: move convertToNumber into utils
Raubzeug fb81011
refactor: move renderPaginatedTableErrorMessage to utils
Raubzeug 3607096
feat(PaginatedTable): add note for column head
Raubzeug 6be9be4
feat(TopicData): add tab for topic data
Raubzeug d346090
chore: add tests for getData
Raubzeug 9bcc868
fix: Copilot review
Raubzeug d6391d1
fix: use use-query-params instead of redux-location-state
Raubzeug f5be6ad
fix: review
Raubzeug a75a21a
fix: Afina review
Raubzeug e328b64
fix: review
Raubzeug 84c27ac
fix: add tests
Raubzeug dffe52e
fix
Raubzeug f904c58
fix
Raubzeug d358294
fix: test
Raubzeug 2af2961
fix: should not cache data
Raubzeug f297f08
feat: should scroll to selected offset
Raubzeug d44ad54
fix: should not reset selected filters on scroll
Raubzeug 5c5b3bd
fix: support new params for topic_data handler
Raubzeug e3fbd51
fix: review
Raubzeug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type {TextInputProps} from '@gravity-ui/uikit'; | ||
import {TextInput} from '@gravity-ui/uikit'; | ||
|
||
import {useDebouncedValue} from '../../utils/hooks/useDebouncedValue'; | ||
|
||
interface DebouncedInputProps extends TextInputProps { | ||
debounce?: number; | ||
} | ||
|
||
export const DebouncedInput = ({ | ||
onUpdate, | ||
value = '', | ||
debounce = 200, | ||
...rest | ||
}: DebouncedInputProps) => { | ||
const [currentValue, handleUpdate] = useDebouncedValue<string>({value, onUpdate, debounce}); | ||
|
||
return <TextInput value={currentValue} onUpdate={handleUpdate} {...rest} />; | ||
}; |
This file contains hidden or 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 |
---|---|---|
|
@@ -28,6 +28,9 @@ | |
|
||
margin: 0 auto; | ||
} | ||
&_position_left { | ||
margin: unset; | ||
} | ||
} | ||
|
||
&__image { | ||
|
This file contains hidden or 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
3 changes: 3 additions & 0 deletions
3
src/components/MultilineTableHeader/MultilineTableHeader.scss
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.ydb-multiline-table-header { | ||
white-space: normal; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/components/MultilineTableHeader/MultilineTableHeader.tsx
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {cn} from '../../utils/cn'; | ||
|
||
import './MultilineTableHeader.scss'; | ||
|
||
const b = cn('ydb-multiline-table-header'); | ||
|
||
interface MultilineTableHeaderProps { | ||
title?: string; | ||
} | ||
|
||
export function MultilineTableHeader({title}: MultilineTableHeaderProps) { | ||
if (!title) { | ||
return null; | ||
} | ||
return <div className={b()}>{title}</div>; | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,5 +1,8 @@ | ||||||
import React from 'react'; | ||||||
|
||||||
import type {HelpMarkProps} from '@gravity-ui/uikit'; | ||||||
import {HelpMark} from '@gravity-ui/uikit'; | ||||||
|
||||||
import {ResizeHandler} from './ResizeHandler'; | ||||||
import { | ||||||
ASCENDING, | ||||||
|
@@ -9,7 +12,14 @@ import { | |||||
DESCENDING, | ||||||
} from './constants'; | ||||||
import {b} from './shared'; | ||||||
import type {Column, HandleTableColumnsResize, OnSort, SortOrderType, SortParams} from './types'; | ||||||
import type { | ||||||
AlignType, | ||||||
Column, | ||||||
HandleTableColumnsResize, | ||||||
OnSort, | ||||||
SortOrderType, | ||||||
SortParams, | ||||||
} from './types'; | ||||||
|
||||||
// Icon similar to original DataTable icons to keep the same tables across diferent pages and tabs | ||||||
const SortIcon = ({order}: {order?: SortOrderType}) => { | ||||||
|
@@ -43,6 +53,12 @@ const ColumnSortIcon = ({sortOrder, sortable, defaultSortOrder}: ColumnSortIconP | |||||
} | ||||||
}; | ||||||
|
||||||
const columnAlignToHelpMarkPlacement: Record<AlignType, Required<HelpMarkProps['placement']>> = { | ||||||
left: 'right', | ||||||
right: 'left', | ||||||
center: 'right', | ||||||
}; | ||||||
|
||||||
interface TableHeadCellProps<T> { | ||||||
column: Column<T>; | ||||||
resizeable?: boolean; | ||||||
|
@@ -115,7 +131,17 @@ export const TableHeadCell = <T,>({ | |||||
} | ||||||
}} | ||||||
> | ||||||
<div className={b('head-cell-content')}>{content}</div> | ||||||
<div className={b('head-cell-content-container')}> | ||||||
<div className={b('head-cell-content')}>{content}</div> | ||||||
{column.note && ( | ||||||
<HelpMark | ||||||
placement={columnAlignToHelpMarkPlacement[column.align]} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If column.align is undefined or not one of 'left', 'right', or 'center', this mapping will return undefined. Consider providing a default placement value to prevent potential runtime issues.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback
Raubzeug marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
className={b('head-cell-note')} | ||||||
> | ||||||
{column.note} | ||||||
</HelpMark> | ||||||
)} | ||||||
</div> | ||||||
<ColumnSortIcon | ||||||
sortOrder={sortOrder} | ||||||
sortable={column.sortable} | ||||||
|
This file contains hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.