Skip to content

Commit

Permalink
Merge pull request #716 from oasisprotocol/ml/graph-feedback
Browse files Browse the repository at this point in the history
Graph feedback
  • Loading branch information
lubej authored Jul 12, 2023
2 parents 86167a5 + 70ec902 commit c3d9cf2
Show file tree
Hide file tree
Showing 10 changed files with 572 additions and 421 deletions.
1 change: 1 addition & 0 deletions .changelog/716.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Graph feedback
9 changes: 3 additions & 6 deletions src/app/components/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
MouseEvent,
KeyboardEvent,
FocusEvent,
ReactNode,
} from 'react'
import Typography from '@mui/material/Typography'
import Button from '@mui/material/Button'
Expand Down Expand Up @@ -144,7 +145,7 @@ const SelectOption = <T extends SelectOptionBase>({ value, label }: T): ReactEle
)

interface SelectCmpProps<T extends SelectOptionBase> {
label?: string
label?: ReactNode
options: T[]
defaultValue?: T['value']
handleChange?: (selectedOption: T['value'] | null) => void
Expand Down Expand Up @@ -179,11 +180,7 @@ const SelectCmp = <T extends SelectOptionBase>({

return (
<Box className={className}>
{label && (
<label htmlFor={selectId}>
<Typography variant="body2">{label}</Typography>
</label>
)}
{label && <label htmlFor={selectId}>{label}</label>}
<CustomSelect<T['value']>
id={selectId}
defaultValue={defaultValue}
Expand Down
14 changes: 7 additions & 7 deletions src/app/pages/HomePage/Graph/Graph/graph-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ export abstract class GraphUtils {
switch (layer) {
case Layer.emerald:
return {
scale: 2.5,
x: 0.6 * width,
scale: 2.4,
x: 0.68 * width,
y: 0.1 * height,
}
case Layer.cipher:
return {
scale: 2.5,
x: 1.075 * width,
y: 0.65 * height,
scale: 2.4,
x: 1.2 * width,
y: 0.7 * height,
}
case Layer.sapphire:
return {
scale: 2.5,
x: 0.3 * width,
scale: 2.4,
x: 0.31 * width,
y: 1.1 * height,
}
case Layer.consensus:
Expand Down
Loading

0 comments on commit c3d9cf2

Please sign in to comment.