Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Git 150 initial draft Tex render #175

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

Conversation

habiblawal1
Copy link

No description provided.

@habiblawal1 habiblawal1 marked this pull request as ready for review May 18, 2023 14:45
@habiblawal1 habiblawal1 requested a review from sarbull as a code owner May 18, 2023 14:45
Copy link
Member

@sarbull sarbull left a comment

Choose a reason for hiding this comment

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

this should not be merged as it is now :) because it will break the current functionality and only work for tex

<h1>TEx</h1>
</div>

<Modal
Copy link
Member

Choose a reason for hiding this comment

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

extract tex functionality in separate demo component so that we can differentiate and encapsulate the functionality

ideally the modal should be implemented in the egeria-ui-components where there will be a new happi-graph instance

Copy link
Author

Choose a reason for hiding this comment

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

I've changed the frontend to have a dropdown menu to choose the graph type, the only issue I'm struggling with a bit is to have the Happi Graph update with the new Graph Type state after you change it with the dropdown. If you run the code it should make sense. For example, whatever graph type you start with is ok, but then if you change the graph via the down from Inheritance to Lineage, the graph does not refresh to show the Lineage graph.

@@ -0,0 +1,565 @@
import * as d3 from 'd3';
Copy link
Member

Choose a reason for hiding this comment

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

duplicating the entire code is not ok :)

Copy link
Author

Choose a reason for hiding this comment

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

Yes you're right, I've updated this in my recent commit

@@ -0,0 +1,565 @@
import * as d3 from 'd3';
Copy link
Member

Choose a reason for hiding this comment

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

duplicating the entire code is not ok, please remove if not applicable

const mappedNodes = mapNodes(props.rawData.nodes, props.selectedNodeId);
const mappedLinks = mapLinks(props.rawData.edges, mappedNodes);

let selectedGraphType;
Copy link
Member

Choose a reason for hiding this comment

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

extract this to separate function, make it more readable

src/components/HappiGraph/happi-graph.component.tsx Outdated Show resolved Hide resolved
src/components/HappiGraph/happi-graph.component.tsx Outdated Show resolved Hide resolved
.call(zoom)
.on('dblclick.zoom', null);

addNodes(nodes, nodesGroup, graphDirection, onNodeClick);
addLinks(links, linksGroup, graphDirection, nodes);
this.state.addNodes(nodes, nodesGroup, graphDirection, onNodeClick);
Copy link
Member

Choose a reason for hiding this comment

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

remove this.state

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

Successfully merging this pull request may close these issues.

3 participants