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

Add filtering of pipelines on Kedro-Viz flowchart in VSCode #167

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

SajidAlamQB
Copy link
Contributor

@SajidAlamQB SajidAlamQB commented Jan 31, 2025

Description

Related to: #157

For the large Kedro projects, the absence of a filtering mechanism in the Kedro-Viz flowchart panel makes the Kedro-Viz integration nearly unusable. Implementing a filtering feature would allow users to focus on specific pipelines or subsets of nodes, thereby enhancing usability and productivity.

Development notes

New Feature: Filter Pipelines

  • package.json: Added a new command kedro.filterPipelines to the list of commands.
  • src/common/commands.ts: Implemented the filterPipelines function to filter pipelines based on user selection and update the project data.

Command Registration

Webview Integration

  • src/webview/vizWebView.ts: Added a sendMessage method to KedroVizPanel to send messages to the webview, and updated the message handler to include the showPipelineFilter command. [1] [2]
  • webview/src/App.jsx: Updated the App component to handle the new showPipelineFilter command and added a button to trigger the pipeline filter functionality. [1] [2] [3]

GIF

vsc-filter-2
vsc-filter-1

QA notes

  • To test, we need to pass the selected_pipeline key with a valid pipeline name. Any subsequent changes should update the flowchart with the passed pipeline name.
  • From VSCode in KedroViz component pass display.filterBtn as true

Signed-off-by: Sajid Alam <[email protected]>
@SajidAlamQB SajidAlamQB self-assigned this Jan 31, 2025
SajidAlamQB and others added 6 commits February 3, 2025 09:47
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
@noklam
Copy link
Contributor

noklam commented Feb 20, 2025

I see a different UI:
image

I wonder what's the behavior should be when someone run :Filter Pipeline before Run Kedro Viz. 2 options in mind:

  1. Trigger Run Viz automatically + the filtering option
  2. Do not show the Filter pipeline if viz panel does not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants