Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract graph and filter code to src/common/ #424

Open
keyserj opened this issue May 15, 2024 · 1 comment
Open

Extract graph and filter code to src/common/ #424

keyserj opened this issue May 15, 2024 · 1 comment
Labels
dx improves the developer experience, makes working with the code nicer refactor reduces tech debt or improves code quality

Comments

@keyserj
Copy link
Collaborator

keyserj commented May 15, 2024

Describe your issue

A lot of graph logic currently lives in src/web/ and is specific to the front-end. Some of this would be nice to share with the back-end (e.g. creating basic quick views when a topic is created).

Solution you'd like

No response

Alternatives you've considered

No response

Additional context

No response

Technical ideas and questions

  • a lot of graph methods rely on the web/ Node rather than a common/ Node. should the front-end mostly use common/ Node and just us web/ Node (flow data node?) when laying out?
@keyserj keyserj added refactor reduces tech debt or improves code quality dx improves the developer experience, makes working with the code nicer labels May 15, 2024
@keyserj
Copy link
Collaborator Author

keyserj commented May 15, 2024

some notes:

  • web node needs all the same stuff but react flow puts most of it behind data
    • also needs to be able to add front-end-specific stuff, like newlyAdded
  • graph methods shouldn't need web-specific stuff, can they use the api node type?
    • but Diagram component uses web-specific version
      • if we convert web-specific version to match common version, with newlyAdded
        • then we should be able to extract easy
        • hmm PositionedNode is extracted already, which layout uses
          • but layout should use non-web graph methods...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx improves the developer experience, makes working with the code nicer refactor reduces tech debt or improves code quality
Projects
Status: No status
Development

No branches or pull requests

1 participant