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

Introduce metadataPanel prop in Kedro-Viz react component #1965

Closed
wants to merge 8 commits into from

Conversation

jitu5
Copy link
Contributor

@jitu5 jitu5 commented Jul 1, 2024

Resolves #1745

This PR addresses a requirement for cases where users of Kedro-Viz as a React component in embedded mode want to hide metadata panel.

<KedroViz display={{metadataPanel: false}} data={json} />

Below is the metadata panel which will be visible when user clicks on node.
Screenshot 2024-07-01 at 2 48 09 p m

Note: When user set metadataPanel to false, nothing will happen when user clicks on node.

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added new entries to the RELEASE.md file
  • Added tests to cover my changes

jitu5 added 2 commits July 1, 2024 14:33
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
@jitu5 jitu5 self-assigned this Jul 1, 2024
@jitu5 jitu5 added the Javascript Pull requests that update Javascript code label Jul 1, 2024
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
@jitu5 jitu5 marked this pull request as ready for review July 1, 2024 14:20
RELEASE.md Outdated Show resolved Hide resolved
Co-authored-by: rashidakanchwala <37628668+rashidakanchwala@users.noreply.github.com>
Signed-off-by: Jitendra Gundaniya <38945204+jitu5@users.noreply.github.com>
Copy link
Contributor

@rashidakanchwala rashidakanchwala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment on the behavior.

Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
Copy link
Contributor

@rashidakanchwala rashidakanchwala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks :)

@ravi-kumar-pilla
Copy link
Contributor

Hi @jitu5 ,

I am testing the PR and it hides the metadata panel based on the display flag. I found a minor issue which seems to be present in demo site as well. Wanted to confirm if it is an expected behavior. Steps taken -

  1. Click on a func node/dataset.
  2. The node gets highlighted in the flowchart and in the main menu
  3. Now if I click on a modular pipeline, the modular pipeline gets expanded
  4. But, the node highlighted is still the node clicked at step1.
  5. Should we remove the focus from the node clicked at step1 ? This seems like a bug (even without this PR)

bug_with_node_focus

Thank you

@ravi-kumar-pilla
Copy link
Contributor

Hi @jitu5 , I understand we are not showing the metadata panel based on the display flag but I think we should still honour the stateful URL. As of now, when I click on a node, the selected node id (sid) seems missing in the URL.

image

Thank you

Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
@jitu5
Copy link
Contributor Author

jitu5 commented Jul 8, 2024

Hi @jitu5 , I understand we are not showing the metadata panel based on the display flag but I think we should still honour the stateful URL. As of now, when I click on a node, the selected node id (sid) seems missing in the URL.

image Thank you

@ravi-kumar-pilla Now url is updating. thanks.

@jitu5
Copy link
Contributor Author

jitu5 commented Jul 8, 2024

Hi @jitu5 ,

I am testing the PR and it hides the metadata panel based on the display flag. I found a minor issue which seems to be present in demo site as well. Wanted to confirm if it is an expected behavior. Steps taken -

  1. Click on a func node/dataset.
  2. The node gets highlighted in the flowchart and in the main menu
  3. Now if I click on a modular pipeline, the modular pipeline gets expanded
  4. But, the node highlighted is still the node clicked at step1.
  5. Should we remove the focus from the node clicked at step1 ? This seems like a bug (even without this PR)

Thank you

@ravi-kumar-pilla I think it is right behaviour, here we wanted to select other node by expanding/clicking a modular pipeline and still keeping selected node active.

Signed-off-by: Jitendra Gundaniya <38945204+jitu5@users.noreply.github.com>
Copy link
Contributor

@Huongg Huongg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too, thank you @jitu5

Copy link
Contributor

@ravi-kumar-pilla ravi-kumar-pilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you @jitu5

@jitu5
Copy link
Contributor Author

jitu5 commented Jul 22, 2024

Closing this PR as it already merged with #1992 to main.

@jitu5 jitu5 closed this Jul 22, 2024
@SajidAlamQB SajidAlamQB mentioned this pull request Jul 25, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document Kedro-Viz React component usage
4 participants