-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: console reported issues (#3660)
* Added key to sidebar buttons * Added key directrly to sidebar category * Removed key definition on sidebar category * Fix error of nested buttons on secretKeyModal * Fix nested buttons on output modal * Fix clip-path warning on components * Fix components cannot be given refs on nodeOutputField * Removed unused console.log * Added key on profile pictures map * Fixed hideOverlay being called when the table is destroyed * Fixed valueFormatter error on Apply To Fields field on GlobalVariables page * Updated headers on config page to ensure consistent design
- Loading branch information
1 parent
70af48c
commit f2abb94
Showing
14 changed files
with
97 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 44 additions & 50 deletions
94
...nd/src/pages/FlowPage/components/extraSidebarComponent/SidebarCategoryComponent/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,62 @@ | ||
import ShadTooltip from "@/components/shadTooltipComponent"; | ||
import { nodeColors, nodeIconsLucide, nodeNames } from "@/utils/styleUtils"; | ||
import { removeCountFromString } from "@/utils/utils"; | ||
import { Fragment } from "react/jsx-runtime"; | ||
import DisclosureComponent from "../../DisclosureComponent"; | ||
import SidebarDraggableComponent from "../sideBarDraggableComponent"; | ||
import sensitiveSort from "../utils/sensitive-sort"; | ||
|
||
export function SidebarCategoryComponent({ | ||
index, | ||
search, | ||
getFilterEdge, | ||
category, | ||
name, | ||
onDragStart, | ||
}) { | ||
return ( | ||
<Fragment | ||
key={`DisclosureComponent${index + search + JSON.stringify(getFilterEdge)}`} | ||
<DisclosureComponent | ||
isChild={false} | ||
defaultOpen={ | ||
getFilterEdge.length !== 0 || search.length !== 0 ? true : false | ||
} | ||
button={{ | ||
title: nodeNames[name] ?? nodeNames.unknown, | ||
Icon: nodeIconsLucide[name] ?? nodeIconsLucide.unknown, | ||
}} | ||
> | ||
<DisclosureComponent | ||
isChild={false} | ||
defaultOpen={ | ||
getFilterEdge.length !== 0 || search.length !== 0 ? true : false | ||
} | ||
button={{ | ||
title: nodeNames[name] ?? nodeNames.unknown, | ||
Icon: nodeIconsLucide[name] ?? nodeIconsLucide.unknown, | ||
}} | ||
> | ||
<div className="side-bar-components-gap"> | ||
{Object.keys(category) | ||
.sort((a, b) => | ||
sensitiveSort(category[a].display_name, category[b].display_name), | ||
) | ||
.map((SBItemName: string, index) => ( | ||
<ShadTooltip | ||
content={category[SBItemName].display_name} | ||
side="right" | ||
key={index} | ||
> | ||
<SidebarDraggableComponent | ||
sectionName={name as string} | ||
apiClass={category[SBItemName]} | ||
key={index} | ||
onDragStart={(event) => | ||
onDragStart(event, { | ||
//split type to remove type in nodes saved with same name removing it's | ||
type: removeCountFromString(SBItemName), | ||
node: category[SBItemName], | ||
}) | ||
} | ||
color={nodeColors[name]} | ||
itemName={SBItemName} | ||
//convert error to boolean | ||
error={!!category[SBItemName].error} | ||
display_name={category[SBItemName].display_name} | ||
official={ | ||
category[SBItemName].official === false ? false : true | ||
} | ||
/> | ||
</ShadTooltip> | ||
))} | ||
</div> | ||
</DisclosureComponent> | ||
</Fragment> | ||
<div className="side-bar-components-gap"> | ||
{Object.keys(category) | ||
.sort((a, b) => | ||
sensitiveSort(category[a].display_name, category[b].display_name), | ||
) | ||
.map((SBItemName: string, idx) => ( | ||
<ShadTooltip | ||
content={category[SBItemName].display_name} | ||
side="right" | ||
key={idx} | ||
> | ||
<SidebarDraggableComponent | ||
sectionName={name as string} | ||
apiClass={category[SBItemName]} | ||
key={idx} | ||
onDragStart={(event) => | ||
onDragStart(event, { | ||
//split type to remove type in nodes saved with same name removing it's | ||
type: removeCountFromString(SBItemName), | ||
node: category[SBItemName], | ||
}) | ||
} | ||
color={nodeColors[name]} | ||
itemName={SBItemName} | ||
//convert error to boolean | ||
error={!!category[SBItemName].error} | ||
display_name={category[SBItemName].display_name} | ||
official={ | ||
category[SBItemName].official === false ? false : true | ||
} | ||
/> | ||
</ShadTooltip> | ||
))} | ||
</div> | ||
</DisclosureComponent> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters