feat: migrating widgets to patternfly/widgetized-dashboard#273
Conversation
8c1f994 to
5c58939
Compare
|
@Jakub007d Looks like you have a local npm link: |
karelhala
left a comment
There was a problem hiding this comment.
Looking good, can we also add some unit tests?
There was a problem hiding this comment.
Can we also remove GridTile.scss?
| import { useEffect, useMemo, useRef, useState } from 'react'; | ||
| import { isWidgetType } from '../Widgets/widgetTypes'; | ||
| import { useAtom, useAtomValue, useSetAtom } from 'jotai'; | ||
| import { currentDropInItemAtom } from '../../state/currentDropInItemAtom'; |
There was a problem hiding this comment.
We should also remove this atom currentDropInItemAtom
There was a problem hiding this comment.
Atom is needed as i later noticed when removing it the drop on functionality broke
|
Just FYI, a new pre-release was added that upgrades RGL to v2. WE may want to include that in this work. To check for potential API changes, we may have to bridge/migrate |
|
Thanks for feedback i have just noticed it I will try to fix everything |
karelhala
left a comment
There was a problem hiding this comment.
Looking good! Both code and visual, just two small things. But once these are addressed we can merge it!
| }, | ||
| renderWidget: (_widgetId: string) => ( | ||
| <ScalprumComponent | ||
| fallback={<Skeleton style={{ borderRadius: 0 }} shape="square" width="100%" height="100%" />} |
There was a problem hiding this comment.
Do we need the style over here? If so, can we move it to scss file?
There was a problem hiding this comment.
Yes it is needed because the basic patternfly Skeleton has rounded edges. I put the style into the scss file
| onlyResolvesLast: true, | ||
| }); | ||
|
|
||
| const getResizeHandle = (resizeHandleAxis: string, ref: React.Ref<HTMLElement>) => ( |
There was a problem hiding this comment.
Can we change this ref as HTMLDivElement so we don't have to cast it on line 64?
7019f43 to
ca66bb0
Compare
ca66bb0 to
fec5c24
Compare
Description
feat: adding customization parameter patternfly/widgetized-dashboard#16
RHCLOUD-45227
Screenshots
Before:
After:
Checklist ☑️