cryostatio / cryostatio/cryostat-web
[Task] Refactor drag and drop code so that DashboardCard order does not depend on DOM element order
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 21
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 42
Description
> Also, i noticed that `iframe`are being reinitialized when reordering. Came across this one
It is indeed slightly annoying, but only because the re-ordering functionality is tied in with the order that the card elements are being attached to the DOM. It doesn't have to actually be this way since Patternfly grid uses the grid-order for its ordering which is just a css attribute, however I implemented the drag drop keeping the JS list order in mind which it is just a bit more intuitive. There will just need to a bit of refactoring with how the drag and drop works, but its probably not horrible. If you guys think this is important, I will look into a patch.
_Originally posted by @maxcao13 in https://github.com/cryostatio/cryostat-web/issues/856#issuecomment-1425113484_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the drag-and-drop code for DashboardCard and the PatternFly grid ordering behavior. Check how DOM attachment order currently affects the JavaScript list and why iframe elements are reinitialized during reordering. Done means card order no longer depends on DOM element order and reordering does not reinitialize iframes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100