Approximate Functional Dependencies frontend#111
Approximate Functional Dependencies frontend#111LiaSolo wants to merge 3 commits intoweb-app-devfrom
Conversation
| title={ | ||
| 'No clusters have been discovered (functional dependency holds)' | ||
| } | ||
| description={'Try restarting the task with different parameters'} | ||
| icon={<Arrow />} | ||
| /> | ||
| )} | ||
| {!clustersTotalCount && !data.result && ( | ||
| <ReportFiller | ||
| title={ | ||
| 'No clusters have been discovered (functional dependency may not hold)' | ||
| } | ||
| description={'Try restarting the task with different parameters'} | ||
| icon={<ArrowCrossed />} | ||
| /> |
web-app/client/src/components/ScrollableNodeTable/implementations/AFD/AFDTable.tsx
Outdated
Show resolved
Hide resolved
| .greenHighlighted { | ||
| background: $success-25 !important; // stylelint-disable-line declaration-no-important | ||
| } | ||
|
|
||
| .greenEven { | ||
| background: $success-05 !important; // stylelint-disable-line declaration-no-important | ||
| } | ||
|
|
||
| .greenOdd { | ||
| background: $success-10 !important; // stylelint-disable-line declaration-no-important | ||
| } | ||
|
|
||
| .redHighlighted { | ||
| background: $error-25 !important; // stylelint-disable-line declaration-no-important | ||
| } | ||
|
|
||
| .redEven { | ||
| background: $error-05 !important; // stylelint-disable-line declaration-no-important | ||
| } | ||
|
|
||
| .redOdd { | ||
| background: $error-10 !important; // stylelint-disable-line declaration-no-important | ||
| } |
There was a problem hiding this comment.
Зачем important ?
There was a problem hiding this comment.
и вроде бы highlighted не используется
There was a problem hiding this comment.
Надо понять, почему так происходит (скорее всего из-за этой строчки).
Может быть можно добавить возможность контролировать альтернацию цветов через пропы ScrollableTable
Почитай ещё про specificity, если ещё не знаешь что это
| .checkmark { | ||
| path { | ||
| fill: $success-100; | ||
| stroke: none; | ||
| } | ||
| } | ||
|
|
||
| .cross { | ||
| path { | ||
| fill: $error-100; | ||
| stroke: none; | ||
| } | ||
| } |
There was a problem hiding this comment.
Это лучше сделать через currentColor
There was a problem hiding this comment.
то есть? не понимаю
There was a problem hiding this comment.
То есть импортировать иконки с _TEMPLATE_COLOR_-ом, и менять у них цвет через свойство color
There was a problem hiding this comment.
А зачем ты добавила страницу onScroll ?)
Каждый файл, находящиеся в папочке pages --- это отдельная страница
There was a problem hiding this comment.
Плюс этот хук надо ещё использовать в MFD
|
|
||
| useEffect(() => { | ||
| shouldIgnoreScrollEvent.current = false; | ||
| }, [shouldIgnoreScrollEvent]); |
There was a problem hiding this comment.
Не уверен, что по логике тут должна быть эта зависимость. Вообще при изменении рефов компонент не обновляется, поэтому в общем случае писать рефы в зависимостях не стоит. Скорее тут limit
There was a problem hiding this comment.
UPD: В оригинале логика такая, что эвент должен игнорироваться пока не подтянутся новые данные. Надо предусмотреть это в API хука
| const defaultLimit = 150; | ||
| const defaultOffsetDifference = 50; | ||
|
|
||
| export const Scrolling = () => { |
There was a problem hiding this comment.
по логике это кастомный хук. А у хуков есть конвеншен по наименованию
There was a problem hiding this comment.
И вообще название не очень) Лучше сделать что-то типа useInfiniteScroll, а initialLimit и offsetDistance принимать как параметры
| shouldIgnoreScrollEvent.current = false; | ||
| }, [shouldIgnoreScrollEvent]); | ||
|
|
||
| return useCallback( |
There was a problem hiding this comment.
из кастомных хуков обычно возвращают объект. То есть лучше сделать так:
const onScroll = useCallback(...);
return { onScroll };
web-app/client/src/components/ScrollableNodeTable/implementations/AFD/AFDTable.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Плюс этот хук надо ещё использовать в MFD
|
|
||
| useEffect(() => { | ||
| shouldIgnoreScrollEvent.current = false; | ||
| }, [shouldIgnoreScrollEvent]); |
There was a problem hiding this comment.
UPD: В оригинале логика такая, что эвент должен игнорироваться пока не подтянутся новые данные. Надо предусмотреть это в API хука
b778af9 to
5ab1d2f
Compare

No description provided.