Linkta-org / sandbox

Sandbox sprint repo for core functionality prototype
MIT License
3 stars 1 forks source link

Feature/add dagre autolayout hook for demo #22

Closed ChTiSh closed 4 months ago

ChTiSh commented 4 months ago

Description

Add dagre auto layout hook for demo !!!This will not work with nodes with parentId!!

Fixes # (issue)

Type of change

How Has This Been Tested?

  1. import useAutoLayout hook to the Flow.tsx
  2. setup dummy data with positions all being {0, 0}
  3. call the hook with sample nodes, edges, width and height

Checklist:

Additional Information:

ChTiSh commented 4 months ago

PR closed due to recent discussion of layout algorithms.

relandboyle commented 4 months ago

@ChTiSh I'm just noticing this PR was closed. I would like to see it reopened, updated, and merged with the Dev branch.

This PR probably should have been resolved on Friday 05/10 when its contents were included in a demo for the team. Not merging, and ultimately closing, may lead to confusion and ambiguity about what work was completed and what product version was demonstrated.

ChTiSh commented 4 months ago

Hi @relandboyle I thought the discussion led to we should implement our algo for layout, thus this implement using dagre library is not valid anymore, so I closed it to avoid confusion. I can reopen it if it could be useful

relandboyle commented 4 months ago

@ChTiSh I think this discussion is important as it may apply to any number of future decisions.

It's fine if a decision was made to develop custom algorithms rather than using the Dagre library. I'm sure we can do that. But we have not done it yet. It may be weeks or months before we start that dev effort. Even if it's only a few days in the future, as long as it is in the future there is no reason to break the present solution.

Dagre was included in a demo on 05/10. Arguably, it should have been reviewed and merged before the demo. The demo audience should expect to find Dagre in the repo as of the time of the demo. Removing or omitting Dagre means that developers may run into an unexpected, less-functional version of the application. As of now, there have been six days when the Dev branch is effectively behind the latest known Sandbox version of the application, and as far as I know the custom algorithms have not been implemented. I feel that we should never allow this condition to occur.