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

Vikas/f dag app #280

Draft
wants to merge 66 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
dfdbcc3
f-dag added for research
Jan 11, 2024
f60c288
f-dag custom template and flow elements added
Jan 12, 2024
61592ee
f-dag node isze updated
Jan 15, 2024
6db95f2
f-dag rebased
vikas-cldcvr May 23, 2024
7c3359b
f-dag-cluster cluster node rnd
vikas-cldcvr May 24, 2024
fe73e91
f-dag-cluster link positioning updated
vikas-cldcvr May 27, 2024
f8062f7
f-dag-app create connection and move node
vikas-cldcvr May 28, 2024
e77311c
f-dag-app more nodes added
vikas-cldcvr May 28, 2024
390061b
f-dag-app group and group clinks functionality
vikas-cldcvr May 29, 2024
338eade
f-dag-app droping node inside group and moving
vikas-cldcvr May 29, 2024
e82863f
f-dag-app node drag and link conneciton bug solved
vikas-cldcvr May 30, 2024
0d51fbf
f-dag-app save and view dag graph from schema
vikas-cldcvr May 30, 2024
95f0c35
f-dag-app all line elements converted to path
vikas-cldcvr May 31, 2024
8610b41
f-dag-app arrows added
vikas-cldcvr May 31, 2024
1ec0c5d
f-dag-app multipoint node connections
vikas-cldcvr Jun 3, 2024
a883d10
f-dag-app curvy links and linkDirection property added
vikas-cldcvr Jun 3, 2024
4db6736
f-dag-app steplines added
vikas-cldcvr Jun 3, 2024
22db9c5
f-dag-app dag config updated
vikas-cldcvr Jun 3, 2024
81861fc
f-dag-app link plotting logic updated
vikas-cldcvr Jun 4, 2024
ee9c3f6
f-dag-app link curve plotting logic updated
vikas-cldcvr Jun 4, 2024
479d547
f-dag-app code segregation
vikas-cldcvr Jun 5, 2024
8c56408
f-dag-app auto node and group positioning
vikas-cldcvr Jun 5, 2024
a6eda6d
f-dag-app auto node and group positioning
vikas-cldcvr Jun 5, 2024
8fb988f
f-dag-app placement algorithm updated
vikas-cldcvr Jun 6, 2024
45e92ef
f-dag-app links added
vikas-cldcvr Jun 6, 2024
e90d23e
f-dag-app vertical layout options
vikas-cldcvr Jun 6, 2024
7feeafd
f-dag-app created clean digram
vikas-cldcvr Jun 6, 2024
304a3aa
f-dag-app zoom in /zoom out and drag features
vikas-cldcvr Jun 7, 2024
7737e84
f-dag-app translate offset addded while plotting line
vikas-cldcvr Jun 7, 2024
30fa8f5
f-dag-app height and width made optional
vikas-cldcvr Jun 10, 2024
e0a1adc
f-dag-app lock file updated
vikas-cldcvr Jun 11, 2024
558705c
f-dag-app element placement in section
vikas-cldcvr Jun 11, 2024
275936f
f-dag-app custom placement by node
vikas-cldcvr Jun 11, 2024
827b7db
f-dag-app group should take pririty w.r.t custom placement
vikas-cldcvr Jun 12, 2024
fe35af5
f-dag-app layoutDirection in group added
vikas-cldcvr Jun 12, 2024
967323d
f-dag-app code separation
vikas-cldcvr Jun 12, 2024
744f572
f-dag-app plotting link in scaled version
vikas-cldcvr Jun 13, 2024
85a308c
f-dag-app cleanup
vikas-cldcvr Jun 13, 2024
9e0a507
Merge branch 'main' into vikas/f-dag-app
vikas-cldcvr Jun 14, 2024
a1cecd4
f-dag-app group collapsible feature
vikas-cldcvr Jun 17, 2024
0e5da31
f-dag-app collpase group height updated
vikas-cldcvr Jun 18, 2024
36a175b
f-dag-app open and collapse hroup after re-positioning
vikas-cldcvr Jun 18, 2024
0cac387
f-dag-app link direction saved in object
vikas-cldcvr Jun 19, 2024
855347c
f-dag-app random connection logic updated
vikas-cldcvr Jun 19, 2024
bd27bcb
f-dag-app node template feature
vikas-cldcvr Jun 21, 2024
725b6a5
f-dag-app select group and delete menu added for node and group
vikas-cldcvr Jun 24, 2024
5fb28f5
f-dag-app select and add to group
vikas-cldcvr Jun 26, 2024
7a62260
f-dag-app add selected elements to new group
vikas-cldcvr Jun 26, 2024
aa96d8b
f-dag-app code segregation
vikas-cldcvr Jun 26, 2024
b77ebe3
f-dag-app delete node feature
vikas-cldcvr Jun 27, 2024
35dff03
f-dag-app ungroup group feature
vikas-cldcvr Jun 27, 2024
573d600
f-dag-app node actions added on context click
vikas-cldcvr Jun 27, 2024
ae68978
f-dag-app node dropping in group feedback added
vikas-cldcvr Jul 1, 2024
350dc13
f-dag-app add new group in same group if all elements are from same g…
vikas-cldcvr Jul 1, 2024
0834cad
f-dag-app link to feature added
vikas-cldcvr Jul 1, 2024
c5dc6d8
f-dag-app popover updated
vikas-cldcvr Jul 1, 2024
3e28033
f-dag-app add group cleanup
vikas-cldcvr Jul 2, 2024
0a8a5f5
f-dag-app foreach replaced by for
vikas-cldcvr Jul 2, 2024
4fdac48
f-dag-app more nodes added
vikas-cldcvr Jul 2, 2024
5d98d2a
f-dag-app bulk link to feature
vikas-cldcvr Jul 2, 2024
7f5eb3b
f-dag-app hide link to button after bulk linking
vikas-cldcvr Jul 2, 2024
b3bd65f
f-dag-app Unlink feature
vikas-cldcvr Jul 2, 2024
6e61fe8
f-dag-app node click animate paths
vikas-cldcvr Jul 4, 2024
c17eb90
f-dag-app expand group feature
vikas-cldcvr Jul 4, 2024
7663095
f-dag-app label bydefault at bottom of node
vikas-cldcvr Jul 5, 2024
6a57bc3
Merge branch 'main' into vikas/f-dag-app
vikas-cldcvr Jul 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"@ollion/flow-lineage": "workspace:*",
"@ollion/flow-log": "workspace:*",
"@ollion/flow-md-editor": "workspace:*",
"@ollion/flow-product-icon": "1.14.0",
"@ollion/flow-product-icon": "1.16.0",
"@ollion/flow-system-icon": "latest",
"@ollion/flow-table": "workspace:*",
"d3": "^7.6.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ export class FTimeseriesChart extends FRoot {
height="hug-content"
max-width="320px"
class="f-chart-tooltip hide"
data-theme="f-dark"
${ref(this.chartTooltip)}
></f-div>
</f-div>
Expand Down
5 changes: 3 additions & 2 deletions packages/flow-lineage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
"dependencies": {
"@ollion/flow-core": "workspace:*",
"@ollion/flow-core-config": "workspace:*",
"d3": "^7.6.1",
"d3": "^7.8.4",
"d3-dag": "^1.1.0",
"lit": "^3.1.0"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.5.7",
"@open-wc/testing": "^3.1.5",
"@types/d3": "^7.4.0",
"@types/d3": "^7.4.3",
"@types/jest": "29.5.5",
"@web/dev-server-esbuild": "^0.3.0",
"@web/test-runner": "^0.13.30",
Expand Down
115 changes: 115 additions & 0 deletions packages/flow-lineage/src/components/f-dag/add-group.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import { html } from "lit";
import type { FDag } from "./f-dag";
import type { FInput, FSelect, FTabNode } from "@ollion/flow-core";

export function addGroupPopover(this: FDag) {
const closeAddPopover = () => {
this.addGroupPopoverRef.open = false;
};

const addSelectionToGroup = (groupid: string) => {
this.selectedNodes.forEach(sn => {
sn.group = groupid;
});

this.addGroupPopoverRef.open = false;

this.resetPlacements();
this.selectedNodes = [];
this.addGroupButton.style.display = "none";
this.requestUpdate();
};

const addToNewGroup = () => {
const groupIdInput = this.querySelector<FInput>("#new-group-id")!;
const groupLabelInput = this.querySelector<FInput>("#new-group-label")!;
const parentGroupIfAny = this.selectedNodes[0].group;

const isAllFromSameGroup = this.selectedNodes.every(sn => sn.group === parentGroupIfAny);
this.config.groups.push({
id: groupIdInput.value as string,
label: groupLabelInput.value as string,
icon: "i-org",
group: isAllFromSameGroup && parentGroupIfAny ? parentGroupIfAny : undefined
});

addSelectionToGroup(groupIdInput.value as string);
};

const addToGroup = () => {
const groupDropdown = this.querySelector<FSelect>(`#f-group-dropdown`)!;
const groupid = groupDropdown.value as string;

addSelectionToGroup(groupid);
};

const switchTab = (event: PointerEvent) => {
const tabNodeElement = event.currentTarget as FTabNode;

this.querySelectorAll<FTabNode>(`.gr-selection-tabs`).forEach(tab => {
tab.active = false;
});
tabNodeElement.active = true;
};
return html` <f-popover size="small" id="add-group-popover" .overlay=${false} target="#add-group">
<f-div @wheel=${(e: Event) => e.stopPropagation()}>
<f-tab>
<f-tab-node
@click=${switchTab}
class="gr-selection-tabs"
active
content-id=${`existing-group-selection`}
>
<f-div width="100%" height="100%" align="middle-center" direction="column">
Exisiting
</f-div>
</f-tab-node>
<f-tab-node @click=${switchTab} class="gr-selection-tabs" content-id=${`new-group`}>
<f-div width="100%" height="100%" align="middle-center" direction="column">
Create New
</f-div>
</f-tab-node>
</f-tab>
<f-tab-content id="existing-group-selection">
<f-div padding="medium" gap="medium">
<f-select
id="f-group-dropdown"
placeholder="Select Group"
@input=${addToGroup}
.options=${this.config.groups.map(g => g.id)}
></f-select>
</f-div>
<f-button
label="cancel"
@click=${closeAddPopover}
variant="block"
state="neutral"
></f-button>
</f-tab-content>
<f-tab-content id="new-group">
<f-div direction="column">
<f-div padding="medium" gap="medium">
<f-input id="new-group-id" placeholder="New Group Id"></f-input>
<f-input id="new-group-label" placeholder="New Group Label"></f-input>
</f-div>

<f-div>
<f-div>
<f-button
label="cancel"
@click=${closeAddPopover}
variant="block"
state="neutral"
></f-button>
</f-div>
<f-div><f-button variant="block" label="Add" @click=${addToNewGroup}></f-button></f-div>
</f-div>
</f-div>
</f-tab-content>
</f-div>
</f-popover>`;
}

export function handleAddGroup(this: FDag) {
this.addGroupPopoverRef.open = true;
}
22 changes: 22 additions & 0 deletions packages/flow-lineage/src/components/f-dag/background-svg.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { html } from "lit";

export default function backgroundSVG() {
return html` <svg
class="background-svg"
style="position: absolute;width: 100%;height: 100%;top: 0px;left: 0px;"
>
<pattern
class="background-pattern"
id="pattern-1undefined"
x="0"
y="0"
width="24"
height="24"
patternUnits="userSpaceOnUse"
patternTransform="translate(-0.5,-0.5)"
>
<circle cx="0.5" cy="0.5" r="1" fill="var(--color-border-subtle)"></circle>
</pattern>
<rect x="0" y="0" width="100%" height="100%" fill="url(#pattern-1undefined)"></rect>
</svg>`;
}
Loading
Loading