Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
polamoros committed Jun 27, 2023
1 parent 3a01f85 commit c3d5d8a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions apps/wing-console/console/design-system/src/attribute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface AttributeProps {
type?: "url";
url?: string;
noLeftPadding?: boolean;
labelTop?: boolean;
centerLabel?: boolean;
}

export const Attribute = ({
Expand All @@ -20,7 +20,7 @@ export const Attribute = ({
url,
children,
noLeftPadding = false,
labelTop = false,
centerLabel = true,
}: PropsWithChildren<AttributeProps>) => {
const { theme } = useTheme();
const id = useId();
Expand All @@ -29,7 +29,7 @@ export const Attribute = ({
className={classNames(
"flex flex-row",
!noLeftPadding && "pl-4",
!labelTop && "items-center",
centerLabel && "items-center",
)}
>
<label htmlFor={id} className={classNames(theme.text2, "min-w-[100px]")}>
Expand Down
1 change: 0 additions & 1 deletion apps/wing-console/console/ui/src/features/map-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const MapView = ({
const { mapData } = useMap({ showTests: showTests ?? false });

const { theme } = useTheme();

return (
<ZoomPaneProvider>
<div className="h-full flex flex-col">
Expand Down
2 changes: 1 addition & 1 deletion apps/wing-console/console/ui/src/ui/edge-metadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const EdgeMetadata = ({
</Attribute>

<div className="border-t border-transparent">
<Attribute name="Inflights" labelTop>
<Attribute name="Inflights" centerLabel={false}>
<div className="w-full">
<Tree
entries={entries}
Expand Down
5 changes: 3 additions & 2 deletions apps/wing-console/console/ui/src/ui/elk-map.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import classNames from "classnames";
import ELK, { ElkNode, LayoutOptions } from "elkjs/lib/elk.bundled.js";
import { AnimatePresence, m, motion } from "framer-motion";
import { AnimatePresence, motion } from "framer-motion";
import { FC, Fragment, useCallback, useEffect, useRef, useState } from "react";

import { Edge } from "../shared/Edge.js";
Expand All @@ -9,6 +9,7 @@ import { Node } from "../shared/Node.js";
import { EdgeItem } from "./edge-item.js";
import { useNodeStaticData } from "./use-node-static-data.js";
import { ZoomPane, useZoomPaneContext } from "./zoom-pane.js";

const durationClass = "duration-500";

const layoutOptions: LayoutOptions = {
Expand Down Expand Up @@ -271,7 +272,7 @@ export const ElkMap = <T extends unknown = undefined>({
});
}, [graph, nodeRecord, offsets, edges, setNodeList]);

const { zoomToFit, transform } = useZoomPaneContext() ?? {};
const { zoomToFit } = useZoomPaneContext() ?? {};
const zoomToNode = useCallback(
(nodeId: string | undefined) => {
const node = nodeList.find((node) => node.id === nodeId ?? "root");
Expand Down

0 comments on commit c3d5d8a

Please sign in to comment.