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>
|
||||
{getCustomParameterTitle({
|
||||
title,
|
||||
nodeId: data.id,
|
||||
isFlexView,
|
||||
})}
|
||||
</span>
|
||||
|
|
@ -141,6 +142,7 @@ export default function NodeInputField({
|
|||
<span className="text-sm font-medium">
|
||||
{getCustomParameterTitle({
|
||||
title,
|
||||
nodeId: data.id,
|
||||
isFlexView,
|
||||
})}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
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 IOModal from "@/modals/IOModal/newModal";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
|
|
@ -180,17 +183,19 @@ export default function FlowToolbar(): JSX.Element {
|
|||
</div>
|
||||
</>
|
||||
)}
|
||||
<div className="flex items-center gap-2">
|
||||
<div
|
||||
className={`side-bar-button ${
|
||||
!hasApiKey || !validApiKey || !hasStore
|
||||
? "cursor-not-allowed"
|
||||
: "cursor-pointer"
|
||||
}`}
|
||||
>
|
||||
{ModalMemo}
|
||||
{ENABLE_LANGFLOW_STORE && (
|
||||
<div className="flex items-center gap-2">
|
||||
<div
|
||||
className={`side-bar-button ${
|
||||
!hasApiKey || !validApiKey || !hasStore
|
||||
? "cursor-not-allowed"
|
||||
: "cursor-pointer"
|
||||
}`}
|
||||
>
|
||||
{ModalMemo}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Panel>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import { cn } from "../../utils/utils";
|
|||
|
||||
const Popover = PopoverPrimitive.Root;
|
||||
|
||||
const PopoverAnchor = PopoverPrimitive.Anchor;
|
||||
|
||||
const PopoverTrigger = PopoverPrimitive.Trigger;
|
||||
|
||||
const PopoverContent = React.forwardRef<
|
||||
|
|
@ -44,4 +46,10 @@ const PopoverContentWithoutPortal = React.forwardRef<
|
|||
));
|
||||
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
|
||||
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
|
||||
"w-[--sidebar-width]",
|
||||
"max-sm:group-data-[state=collapsed]:w-[--sidebar-width-icon]",
|
||||
|
|
|
|||
|
|
@ -47,9 +47,11 @@ export function CustomParameterComponent({
|
|||
|
||||
export function getCustomParameterTitle({
|
||||
title,
|
||||
nodeId,
|
||||
isFlexView,
|
||||
}: {
|
||||
title: string;
|
||||
nodeId: string;
|
||||
isFlexView: boolean;
|
||||
}) {
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue