-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update frontend dependencies (#2195)
This pull request includes several updates to the `frontend/webapp` project, focusing on dependency updates, type improvements, and refactoring of reusable components. The most important changes include updating dependencies in `package.json`, improving type definitions for React components, and refactoring the monitoring checkboxes component. ### Dependency Updates: * [`frontend/webapp/package.json`](diffhunk://#diff-ccf6337b0064354343f900ffd8b4ee91aa8cd014f3292548a800ad3dac39c1f4L14-R37): Updated multiple dependencies, including `@apollo/client`, `graphql`, `next`, `react`, and `typescript` to their latest versions. ### Type Improvements: * [`frontend/webapp/hooks/common/useOnClickOutside.ts`](diffhunk://#diff-10b0c59a5713cf46c8babbd395cf003553a8f54b757b1593968ebb32e0774c73L3-R3): Updated the `ref` parameter type in the `useOnClickOutside` hook to `React.RefObject<HTMLElement | null>`. * [`frontend/webapp/reuseable-components/badge/index.tsx`](diffhunk://#diff-5b2e817e2d630b757f44f84f327c95dc303dbbb5924fccb29c0055da353bd126R1-R5): Changed the `label` prop type from `JSX.Element` to `React.ReactNode`. * [`frontend/webapp/reuseable-components/data-tab/index.tsx`](diffhunk://#diff-afbf1606ee29d25bd9273d63b66a4746dbdd1cd8406ad651cfd123ac28f72006L19-R20): Updated the `renderExtended` and `renderActions` prop types from `JSX.Element` to `React.ReactNode`. * [`frontend/webapp/reuseable-components/fade-loader/index.tsx`](diffhunk://#diff-9c241dfa787c4d925e8e5ad0f74db81dd5dd4c0fb628f68ba66da4daf7cca634L40-R35): Updated the return type of the `FadeLoader` function from `JSX.Element | null` to `React.ReactNode | null`. ### Refactoring: * [`frontend/webapp/reuseable-components/monitoring-checkboxes/index.tsx`](diffhunk://#diff-b548a18fe8dc75a96aa84df48e9f1360b626d6d5640abdc1e925b5839630bde5L4-R4): Refactored the monitoring checkboxes component to use `MONITORS_OPTIONS` and updated the logic to handle the new structure of monitoring options. [[1]](diffhunk://#diff-b548a18fe8dc75a96aa84df48e9f1360b626d6d5640abdc1e925b5839630bde5L4-R4) [[2]](diffhunk://#diff-b548a18fe8dc75a96aa84df48e9f1360b626d6d5640abdc1e925b5839630bde5L29-R29) [[3]](diffhunk://#diff-b548a18fe8dc75a96aa84df48e9f1360b626d6d5640abdc1e925b5839630bde5L47-R49) [[4]](diffhunk://#diff-b548a18fe8dc75a96aa84df48e9f1360b626d6d5640abdc1e925b5839630bde5L82-R87) * [`frontend/webapp/utils/constants/monitors.tsx`](diffhunk://#diff-2d10cf3afe0daae8da71ac62534459526be574fcf9d6e0aea186730f33df3877L2-R22): Refactored the monitoring options constants to simplify the structure and remove unused properties.
- Loading branch information
1 parent
2ac3bc1
commit 24e94ba
Showing
10 changed files
with
1,013 additions
and
3,082 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,24 @@ | ||
import { SETUP } from '@/utils/constants'; | ||
import { LogsFocusIcon, LogsIcon, MetricsFocusIcon, MetricsIcon, TraceFocusIcon, TraceIcon } from '@keyval-dev/design-system'; | ||
|
||
export type SignalUppercase = 'TRACES' | 'METRICS' | 'LOGS'; | ||
export type SignalLowercase = 'traces' | 'metrics' | 'logs'; | ||
|
||
export type MonitoringOption = { | ||
id: number; | ||
type: SignalLowercase; | ||
title: string; | ||
tapped: boolean; | ||
icons: { | ||
notFocus: () => JSX.Element; | ||
focus: () => JSX.Element; | ||
}; | ||
id: SignalLowercase; | ||
value: string; | ||
}; | ||
|
||
export const MONITORING_OPTIONS: MonitoringOption[] = [ | ||
{ | ||
id: 1, | ||
icons: { | ||
notFocus: () => <LogsIcon />, | ||
focus: () => <LogsFocusIcon />, | ||
}, | ||
title: SETUP.MONITORS.LOGS, | ||
type: 'logs', | ||
tapped: true, | ||
}, | ||
{ | ||
id: 2, | ||
icons: { | ||
notFocus: () => <MetricsIcon />, | ||
focus: () => <MetricsFocusIcon />, | ||
}, | ||
title: SETUP.MONITORS.METRICS, | ||
type: 'metrics', | ||
tapped: true, | ||
}, | ||
{ | ||
id: 3, | ||
icons: { | ||
notFocus: () => <TraceIcon />, | ||
focus: () => <TraceFocusIcon />, | ||
}, | ||
title: SETUP.MONITORS.TRACES, | ||
type: 'traces', | ||
tapped: true, | ||
}, | ||
]; | ||
|
||
export const MONITORS_OPTIONS = [ | ||
export const MONITORS_OPTIONS: MonitoringOption[] = [ | ||
{ | ||
id: 'logs', | ||
value: 'Logs', | ||
value: SETUP.MONITORS.LOGS, | ||
}, | ||
{ | ||
id: 'metrics', | ||
value: 'Metrics', | ||
value: SETUP.MONITORS.METRICS, | ||
}, | ||
{ | ||
id: 'traces', | ||
value: 'Traces', | ||
value: SETUP.MONITORS.TRACES, | ||
}, | ||
]; |
Oops, something went wrong.