refactor: Small improvements to sidebar, customParams, and flowToolbar for easier DSLF merges (#4487)
* DSLF refactor * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
5a6c556e36
commit
f66f31d4ce
5 changed files with 30 additions and 13 deletions
|
|
@ -129,6 +129,7 @@ export default function NodeInputField({
|
||||||
<span>
|
<span>
|
||||||
{getCustomParameterTitle({
|
{getCustomParameterTitle({
|
||||||
title,
|
title,
|
||||||
|
nodeId: data.id,
|
||||||
isFlexView,
|
isFlexView,
|
||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -141,6 +142,7 @@ export default function NodeInputField({
|
||||||
<span className="text-sm font-medium">
|
<span className="text-sm font-medium">
|
||||||
{getCustomParameterTitle({
|
{getCustomParameterTitle({
|
||||||
title,
|
title,
|
||||||
|
nodeId: data.id,
|
||||||
isFlexView,
|
isFlexView,
|
||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
import ShadTooltip from "@/components/shadTooltipComponent";
|
import ShadTooltip from "@/components/shadTooltipComponent";
|
||||||
import { ENABLE_API } from "@/customization/feature-flags";
|
import {
|
||||||
|
ENABLE_API,
|
||||||
|
ENABLE_LANGFLOW_STORE,
|
||||||
|
} from "@/customization/feature-flags";
|
||||||
import { track } from "@/customization/utils/analytics";
|
import { track } from "@/customization/utils/analytics";
|
||||||
import IOModal from "@/modals/IOModal/newModal";
|
import IOModal from "@/modals/IOModal/newModal";
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
|
|
@ -180,6 +183,7 @@ export default function FlowToolbar(): JSX.Element {
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
{ENABLE_LANGFLOW_STORE && (
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<div
|
<div
|
||||||
className={`side-bar-button ${
|
className={`side-bar-button ${
|
||||||
|
|
@ -191,6 +195,7 @@ export default function FlowToolbar(): JSX.Element {
|
||||||
{ModalMemo}
|
{ModalMemo}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Panel>
|
</Panel>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ import { cn } from "../../utils/utils";
|
||||||
|
|
||||||
const Popover = PopoverPrimitive.Root;
|
const Popover = PopoverPrimitive.Root;
|
||||||
|
|
||||||
|
const PopoverAnchor = PopoverPrimitive.Anchor;
|
||||||
|
|
||||||
const PopoverTrigger = PopoverPrimitive.Trigger;
|
const PopoverTrigger = PopoverPrimitive.Trigger;
|
||||||
|
|
||||||
const PopoverContent = React.forwardRef<
|
const PopoverContent = React.forwardRef<
|
||||||
|
|
@ -44,4 +46,10 @@ const PopoverContentWithoutPortal = React.forwardRef<
|
||||||
));
|
));
|
||||||
PopoverContentWithoutPortal.displayName = PopoverPrimitive.Content.displayName;
|
PopoverContentWithoutPortal.displayName = PopoverPrimitive.Content.displayName;
|
||||||
|
|
||||||
export { Popover, PopoverContent, PopoverContentWithoutPortal, PopoverTrigger };
|
export {
|
||||||
|
Popover,
|
||||||
|
PopoverAnchor,
|
||||||
|
PopoverContent,
|
||||||
|
PopoverContentWithoutPortal,
|
||||||
|
PopoverTrigger,
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ const Sidebar = React.forwardRef<
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"absolute inset-y-0 z-50 flex h-full transition-[left,right,width] duration-200 ease-linear",
|
"z-45 absolute inset-y-0 flex h-full transition-[left,right,width] duration-200 ease-linear",
|
||||||
// Adjust width based on state and device
|
// Adjust width based on state and device
|
||||||
"w-[--sidebar-width]",
|
"w-[--sidebar-width]",
|
||||||
"max-sm:group-data-[state=collapsed]:w-[--sidebar-width-icon]",
|
"max-sm:group-data-[state=collapsed]:w-[--sidebar-width-icon]",
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,11 @@ export function CustomParameterComponent({
|
||||||
|
|
||||||
export function getCustomParameterTitle({
|
export function getCustomParameterTitle({
|
||||||
title,
|
title,
|
||||||
|
nodeId,
|
||||||
isFlexView,
|
isFlexView,
|
||||||
}: {
|
}: {
|
||||||
title: string;
|
title: string;
|
||||||
|
nodeId: string;
|
||||||
isFlexView: boolean;
|
isFlexView: boolean;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue