feat(agentflow): update canvas add node drag and drop behaviour#5774
feat(agentflow): update canvas add node drag and drop behaviour#5774jocelynlin-wd wants to merge 3 commits intomainfrom
Conversation
- fix style issues and refactor components using design token with dark mode theme support - add and update tests with additional jest config to mock canvas and libs
Summary of ChangesHello @jocelynlin-wd, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Agentflow canvas by refining the node drag and drop experience and introducing a robust design token system with full dark mode compatibility. The styling refactor ensures a consistent and adaptable UI, while the expanded test suite provides greater confidence in the stability and correctness of the core components and their interactions. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant and well-executed refactoring to implement a design token system with support for dark mode. The changes include creating a centralized token system, a theme provider that injects CSS variables, and updating numerous components and styles to use these new tokens. The drag-and-drop behavior for adding nodes has also been improved for better positioning. Additionally, the PR adds a comprehensive suite of tests for the new theme system and the main Agentflow component, along with the necessary Jest configuration and mocks.
My review focuses on ensuring consistency with the new design token system. I've pointed out a couple of instances where magic numbers are used instead of tokens, which could be improved for better maintainability. Overall, this is an excellent update that greatly improves the styling architecture and test coverage of the agentflow package.
Screen.Recording.2026-02-17.at.5.49.06.PM.mov
Screen.Recording.2026-02-17.at.5.48.35.PM.mov