diff --git a/client/src/components/production-board-kanban/trello-board/components/ItemWrapper.jsx b/client/src/components/production-board-kanban/trello-board/components/ItemWrapper.jsx
index 462a38a4c..81ccb4ba1 100644
--- a/client/src/components/production-board-kanban/trello-board/components/ItemWrapper.jsx
+++ b/client/src/components/production-board-kanban/trello-board/components/ItemWrapper.jsx
@@ -1,11 +1,9 @@
-import { memo } from "react";
-
-const ItemWrapper = memo(({ children, ...props }) => (
-
- {children}
-
-));
-
-ItemWrapper.displayName = "ItemWrapper";
+function ItemWrapper({ children, ...props }) {
+ return (
+
+ {children}
+
+ );
+}
export default ItemWrapper;
diff --git a/client/src/components/production-board-kanban/trello-board/controllers/Board.jsx b/client/src/components/production-board-kanban/trello-board/controllers/Board.jsx
index 8d5fd3ad7..653fe1228 100644
--- a/client/src/components/production-board-kanban/trello-board/controllers/Board.jsx
+++ b/client/src/components/production-board-kanban/trello-board/controllers/Board.jsx
@@ -1,38 +1,34 @@
import { BoardContainer } from "../index";
-import { useMemo } from "react";
import { StyleHorizontal, StyleVertical } from "../styles/Base.js";
import { cardSizesVertical } from "../styles/Globals.js";
const Board = ({ orientation, cardSettings, ...additionalProps }) => {
- const OrientationStyle = useMemo(
- () => (orientation === "horizontal" ? StyleHorizontal : StyleVertical),
- [orientation]
- );
+ const OrientationStyle = orientation === "horizontal" ? StyleHorizontal : StyleVertical;
- const gridItemWidth = useMemo(() => {
- switch (cardSettings?.cardSize) {
- case "small":
- return cardSizesVertical.small;
- case "large":
- return cardSizesVertical.large;
- case "medium":
- return cardSizesVertical.medium;
- default:
- return cardSizesVertical.small;
- }
- }, [cardSettings?.cardSize]);
+ let gridItemWidth;
+ switch (cardSettings?.cardSize) {
+ case "small":
+ gridItemWidth = cardSizesVertical.small;
+ break;
+ case "large":
+ gridItemWidth = cardSizesVertical.large;
+ break;
+ case "medium":
+ gridItemWidth = cardSizesVertical.medium;
+ break;
+ default:
+ gridItemWidth = cardSizesVertical.small;
+ }
return (
- <>
-
-
-
- >
+
+
+
);
};
diff --git a/client/src/components/production-board-kanban/trello-board/controllers/BoardContainer.jsx b/client/src/components/production-board-kanban/trello-board/controllers/BoardContainer.jsx
index c7344a35a..5a2430702 100644
--- a/client/src/components/production-board-kanban/trello-board/controllers/BoardContainer.jsx
+++ b/client/src/components/production-board-kanban/trello-board/controllers/BoardContainer.jsx
@@ -1,8 +1,7 @@
-import { useCallback, useEffect, useRef, useState } from "react";
+import { useEffect, useRef, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { DragDropContext } from "../dnd/lib";
import PropTypes from "prop-types";
-import isEqual from "lodash/isEqual";
import Lane from "./Lane";
import { PopoverWrapper } from "react-popopo";
import * as actions from "../../../../redux/trello/trello.actions.js";
@@ -37,7 +36,6 @@ const BoardContainer = ({
orientation = "horizontal",
cardSettings = {},
eventBusHandle,
- reducerData,
queryData
}) => {
const [isDragging, setIsDragging] = useState(false);
@@ -50,24 +48,10 @@ const BoardContainer = ({
const currentReducerData = useSelector((state) => (state.trello.lanes ? state.trello : {}));
const { setDragTime, getLastDragTime } = useDragMap();
- const wireEventBus = useCallback(() => {
+ const wireEventBus = () => {
const eventBus = {
publish: (event) => {
switch (event.type) {
- // case "ADD_CARD":
- // return dispatch(actions.addCard({ laneId: event.laneId, card: event.card }));
- // case "REMOVE_CARD":
- // return dispatch(actions.removeCard({ laneId: event.laneId, cardId: event.cardId }));
- // case "REFRESH_BOARD":
- // return dispatch(actions.loadBoard(event.data));
- // case "UPDATE_CARDS":
- // return dispatch(actions.updateCards({ laneId: event.laneId, cards: event.cards }));
- // case "UPDATE_CARD":
- // return dispatch(actions.updateCard({ laneId: event.laneId, updatedCard: event.card }));
- // case "UPDATE_LANES":
- // return dispatch(actions.updateLanes(event.lanes));
- // case "UPDATE_LANE":
- // return dispatch(actions.updateLane(event.lane));
case "MOVE_CARD":
return dispatch(
actions.moveCardAcrossLanes({
@@ -84,66 +68,30 @@ const BoardContainer = ({
}
};
eventBusHandle(eventBus);
- }, [dispatch, eventBusHandle]);
+ };
useEffect(() => {
dispatch(actions.loadBoard(data));
if (eventBusHandle) {
wireEventBus();
}
- }, [data, eventBusHandle, dispatch, wireEventBus]);
+ }, [data, eventBusHandle, dispatch]);
useEffect(() => {
- if (!isEqual(currentReducerData, reducerData)) {
- onDataChange(currentReducerData);
- }
- }, [currentReducerData, reducerData, onDataChange]);
+ onDataChange(currentReducerData);
+ }, [currentReducerData, onDataChange]);
- const onDragStart = useCallback(() => {
+ const onDragStart = () => {
setIsDragging(true);
- }, []);
+ };
- const onLaneDrag = useCallback(
- async ({ draggableId, type, source, reason, mode, destination, combine }) => {
- setIsDragging(false);
+ const onLaneDrag = async ({ draggableId, type, source, reason, mode, destination, combine }) => {
+ setIsDragging(false);
- // Validate drag type and source
- if (type !== "lane" || !source) {
- // Invalid drag type or missing source, attempt to revert if possible
- if (source) {
- dispatch(
- actions.moveCardAcrossLanes({
- fromLaneId: source.droppableId,
- toLaneId: source.droppableId,
- cardId: draggableId,
- index: source.index
- })
- );
- }
- setIsProcessing(false);
- try {
- await onDragEnd({ draggableId, type, source, reason, mode, destination, combine });
- } catch (err) {
- console.error("Error in onLaneDrag for invalid drag type or source", err);
- }
- return;
- }
-
- setDragTime(source.droppableId);
- setIsProcessing(true);
-
- // Handle valid drop to a different lane or position
- if (destination && !isEqual(source, destination)) {
- dispatch(
- actions.moveCardAcrossLanes({
- fromLaneId: source.droppableId,
- toLaneId: destination.droppableId,
- cardId: draggableId,
- index: destination.index
- })
- );
- } else {
- // Same-lane drop or no destination, revert to original position
+ // Validate drag type and source
+ if (type !== "lane" || !source) {
+ // Invalid drag type or missing source, attempt to revert if possible
+ if (source) {
dispatch(
actions.moveCardAcrossLanes({
fromLaneId: source.droppableId,
@@ -153,26 +101,57 @@ const BoardContainer = ({
})
);
}
-
+ setIsProcessing(false);
try {
await onDragEnd({ draggableId, type, source, reason, mode, destination, combine });
} catch (err) {
- console.error("Error in onLaneDrag", err);
- // Ensure revert on error
- dispatch(
- actions.moveCardAcrossLanes({
- fromLaneId: source.droppableId,
- toLaneId: source.droppableId,
- cardId: draggableId,
- index: source.index
- })
- );
- } finally {
- setIsProcessing(false);
+ console.error("Error in onLaneDrag for invalid drag type or source", err);
}
- },
- [dispatch, onDragEnd, setDragTime]
- );
+ return;
+ }
+
+ setDragTime(source.droppableId);
+ setIsProcessing(true);
+
+ // Handle valid drop to a different lane or position
+ if (destination && (source.droppableId !== destination.droppableId || source.index !== destination.index)) {
+ dispatch(
+ actions.moveCardAcrossLanes({
+ fromLaneId: source.droppableId,
+ toLaneId: destination.droppableId,
+ cardId: draggableId,
+ index: destination.index
+ })
+ );
+ } else {
+ // Same-lane drop or no destination, revert to original position
+ dispatch(
+ actions.moveCardAcrossLanes({
+ fromLaneId: source.droppableId,
+ toLaneId: source.droppableId,
+ cardId: draggableId,
+ index: source.index
+ })
+ );
+ }
+
+ try {
+ await onDragEnd({ draggableId, type, source, reason, mode, destination, combine });
+ } catch (err) {
+ console.error("Error in onLaneDrag", err);
+ // Ensure revert on error
+ dispatch(
+ actions.moveCardAcrossLanes({
+ fromLaneId: source.droppableId,
+ toLaneId: source.droppableId,
+ cardId: draggableId,
+ index: source.index
+ })
+ );
+ } finally {
+ setIsProcessing(false);
+ }
+ };
return (
diff --git a/client/src/components/production-board-kanban/trello-board/controllers/Lane.jsx b/client/src/components/production-board-kanban/trello-board/controllers/Lane.jsx
index fdfdbf1b1..f3875411b 100644
--- a/client/src/components/production-board-kanban/trello-board/controllers/Lane.jsx
+++ b/client/src/components/production-board-kanban/trello-board/controllers/Lane.jsx
@@ -1,4 +1,4 @@
-import { useCallback, useMemo, useRef, useState } from "react";
+import { useRef, useState } from "react";
import PropTypes from "prop-types";
import { bindActionCreators } from "redux";
import { connect } from "react-redux";
@@ -64,185 +64,162 @@ const Lane = ({
const [collapsed, setCollapsed] = useState(false);
const laneRef = useRef(null);
- const sortedCards = useMemo(() => {
- if (!cards) return [];
- if (!laneSortFunction) return cards;
- return [...cards].sort(laneSortFunction);
- }, [cards, laneSortFunction]);
+ let sortedCards = cards || [];
+ if (laneSortFunction && cards) {
+ sortedCards = [...cards].sort(laneSortFunction);
+ }
- const toggleLaneCollapsed = useCallback(() => {
+ const toggleLaneCollapsed = () => {
setCollapsed((prevCollapsed) => !prevCollapsed);
- }, []);
+ };
- const renderDraggable = useCallback(
- (index, card) => {
- if (!card) {
- console.log("null card");
- return null;
- }
- return (
-
- {(provided, snapshot) => (
-
- )}
-
- );
- },
- [isProcessing, technician, bodyshop, cardSettings, maxCardHeight, setMaxCardHeight, maxCardWidth, setMaxCardWidth]
- );
-
- const renderDroppable = useCallback(
- (provided, renderedCards) => {
- const Component = orientation === "vertical" ? VirtuosoGrid : Virtuoso;
- const FinalComponent = collapsed ? "div" : Component;
- const commonProps = {
- data: renderedCards,
- customScrollParent: laneRef.current
- };
-
- const verticalProps = {
- ...commonProps,
- listClassName: "grid-container",
- itemClassName: "grid-item",
- components: {
- List: ListComponent,
- Item: ItemComponent
- },
- itemContent: (index, item) =>
{renderDraggable(index, item)},
- overscan: { main: 10, reverse: 10 },
- // Ensure a minimum height for empty lanes to allow dropping
- style: renderedCards.length === 0 ? { minHeight: "5px" } : {}
- };
-
- const horizontalProps = {
- ...commonProps,
- components: { Item: HeightPreservingItem },
- overscan: { main: 3, reverse: 3 },
- itemContent: (index, item) => renderDraggable(index, item),
- style: {
- minWidth: maxCardWidth,
- minHeight: maxLaneHeight
- }
- };
-
- const componentProps = orientation === "vertical" ? verticalProps : horizontalProps;
-
- const finalComponentProps = collapsed
- ? orientation === "horizontal"
- ? {
- style: {
- height: maxLaneHeight
- }
- }
- : {}
- : componentProps;
-
- // Always render placeholder for empty lanes in vertical mode to ensure droppable area
- const shouldRenderPlaceholder = orientation === "vertical" ? collapsed || renderedCards.length === 0 : collapsed;
-
- return (
-
+ const renderDraggable = (index, card) => {
+ if (!card) {
+ console.log("null card");
+ return null;
+ }
+ return (
+
+ {(provided, snapshot) => (
-
-
- {shouldRenderPlaceholder && provided.placeholder}
-
-
-
- );
- },
- [orientation, collapsed, renderDraggable, maxLaneHeight, setMaxLaneHeight, maxCardWidth, id, cardSettings]
- );
-
- const renderDragContainer = useCallback(
- () => (
-
{
- const card = sortedCards[rubric.source.index];
- return (
-
- );
- }}
+
+
+ )}
+
+ );
+ };
+
+ const renderDroppable = (provided, renderedCards) => {
+ const Component = orientation === "vertical" ? VirtuosoGrid : Virtuoso;
+ const FinalComponent = collapsed ? "div" : Component;
+ const commonProps = {
+ data: renderedCards,
+ customScrollParent: laneRef.current
+ };
+
+ const verticalProps = {
+ ...commonProps,
+ listClassName: "grid-container",
+ itemClassName: "grid-item",
+ components: {
+ List: ListComponent,
+ Item: ItemComponent
+ },
+ itemContent: (index, item) =>
{renderDraggable(index, item)},
+ overscan: { main: 10, reverse: 10 },
+ style: renderedCards.length === 0 ? { minHeight: "5px" } : {}
+ };
+
+ const horizontalProps = {
+ ...commonProps,
+ components: { Item: HeightPreservingItem },
+ overscan: { main: 3, reverse: 3 },
+ itemContent: (index, item) => renderDraggable(index, item),
+ style: {
+ minWidth: maxCardWidth,
+ minHeight: maxLaneHeight
+ }
+ };
+
+ const componentProps = orientation === "vertical" ? verticalProps : horizontalProps;
+
+ const finalComponentProps = collapsed
+ ? orientation === "horizontal"
+ ? {
+ style: {
+ height: maxLaneHeight
+ }
+ }
+ : {}
+ : componentProps;
+
+ const shouldRenderPlaceholder = orientation === "vertical" ? collapsed || renderedCards.length === 0 : collapsed;
+
+ return (
+
- {(provided) => renderDroppable(provided, sortedCards)}
-
- ),
- [
- id,
- index,
- orientation,
- renderDroppable,
- sortedCards,
- technician,
- bodyshop,
- cardSettings,
- maxCardHeight,
- maxCardWidth
- ]
+
+
+
+ {shouldRenderPlaceholder && provided.placeholder}
+
+
+
+ );
+ };
+
+ const renderDragContainer = () => (
+
{
+ const card = sortedCards[rubric.source.index];
+ return (
+
+ );
+ }}
+ >
+ {(provided) => renderDroppable(provided, sortedCards)}
+
);
return (
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/state/registry/use-registry.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/state/registry/use-registry.js
index f138f33d7..759847923 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/state/registry/use-registry.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/state/registry/use-registry.js
@@ -1,5 +1,4 @@
-import { useEffect } from "react";
-import { useMemo } from "use-memo-one";
+import { useEffect, useMemo } from "react";
import createRegistry from "./create-registry";
export default function useRegistry() {
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/drag-drop-context/app.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/drag-drop-context/app.js
index a70cf7d52..7cae5b596 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/drag-drop-context/app.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/drag-drop-context/app.js
@@ -1,7 +1,6 @@
-import React, { useEffect, useRef } from "react";
+import React, { useCallback, useEffect, useMemo, useRef } from "react";
import { bindActionCreators } from "redux";
import { Provider } from "react-redux";
-import { useCallback, useMemo } from "use-memo-one";
import { invariant } from "../../invariant";
import createStore from "../../state/create-store";
import createDimensionMarshal from "../../state/dimension-marshal/dimension-marshal";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/drag-drop-context/use-unique-context-id.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/drag-drop-context/use-unique-context-id.js
index 4e1dd7208..bf89d572a 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/drag-drop-context/use-unique-context-id.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/drag-drop-context/use-unique-context-id.js
@@ -1,4 +1,4 @@
-import { useMemo } from "use-memo-one";
+import { useMemo } from "react";
let count = 0;
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/draggable/draggable.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/draggable/draggable.js
index 41a82d8bb..ccbc2578d 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/draggable/draggable.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/draggable/draggable.js
@@ -1,5 +1,4 @@
-import { useRef } from "react";
-import { useCallback, useMemo } from "use-memo-one";
+import { useCallback, useRef, useMemo } from "react";
import getStyle from "./get-style";
import useDraggablePublisher from "../use-draggable-publisher/use-draggable-publisher";
import AppContext from "../context/app-context";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/droppable/droppable.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/droppable/droppable.js
index 07e5b4b0d..2da46550b 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/droppable/droppable.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/droppable/droppable.js
@@ -1,6 +1,5 @@
import ReactDOM from "react-dom";
-import { useCallback, useMemo } from "use-memo-one";
-import React, { useContext, useRef } from "react";
+import React, { useCallback, useContext, useMemo, useRef } from "react";
import { invariant } from "../../invariant";
import useDroppablePublisher from "../use-droppable-publisher";
import Placeholder from "../placeholder";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/placeholder/placeholder.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/placeholder/placeholder.js
index 6148229c5..51314e66b 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/placeholder/placeholder.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/placeholder/placeholder.js
@@ -1,5 +1,4 @@
-import React, { useEffect, useRef, useState } from "react";
-import { useCallback } from "use-memo-one";
+import React, { useCallback, useEffect, useRef, useState } from "react";
import { transitions } from "../../animation";
import { noSpacing } from "../../state/spacing";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-announcer/use-announcer.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-announcer/use-announcer.js
index ee0c7720e..f28de5e07 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-announcer/use-announcer.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-announcer/use-announcer.js
@@ -1,5 +1,4 @@
-import { useEffect, useRef } from "react";
-import { useCallback, useMemo } from "use-memo-one";
+import { useCallback, useEffect, useMemo, useRef } from "react";
import { warning } from "../../dev-warning";
import getBodyElement from "../get-body-element";
import visuallyHidden from "../visually-hidden-style";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-draggable-publisher/use-draggable-publisher.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-draggable-publisher/use-draggable-publisher.js
index d5b3bd305..75e63b358 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-draggable-publisher/use-draggable-publisher.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-draggable-publisher/use-draggable-publisher.js
@@ -1,5 +1,4 @@
-import { useCallback, useMemo } from "use-memo-one";
-import { useRef } from "react";
+import { useCallback, useMemo, useRef } from "react";
import { invariant } from "../../invariant";
import makeDimension from "./get-dimension";
import useLayoutEffect from "../use-isomorphic-layout-effect";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-droppable-publisher/use-droppable-publisher.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-droppable-publisher/use-droppable-publisher.js
index 28e6ec193..31feea97b 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-droppable-publisher/use-droppable-publisher.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-droppable-publisher/use-droppable-publisher.js
@@ -1,6 +1,5 @@
-import { useRef } from "react";
+import { useCallback, useMemo, useRef } from "react";
import rafSchedule from "raf-schd";
-import { useCallback, useMemo } from "use-memo-one";
import memoizeOne from "memoize-one";
import { invariant } from "../../invariant";
import checkForNestedScrollContainers from "./check-for-nested-scroll-container";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-focus-marshal/use-focus-marshal.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-focus-marshal/use-focus-marshal.js
index 1e4350c5b..87c6530b2 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-focus-marshal/use-focus-marshal.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-focus-marshal/use-focus-marshal.js
@@ -1,5 +1,4 @@
-import { useRef } from "react";
-import { useCallback, useMemo } from "use-memo-one";
+import { useCallback, useMemo, useRef } from "react";
import { dragHandle as dragHandleAttr } from "../data-attributes";
import useLayoutEffect from "../use-isomorphic-layout-effect";
import findDragHandle from "../get-elements/find-drag-handle";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-hidden-text-element/use-hidden-text-element.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-hidden-text-element/use-hidden-text-element.js
index 55472f51d..77784f178 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-hidden-text-element/use-hidden-text-element.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-hidden-text-element/use-hidden-text-element.js
@@ -1,5 +1,4 @@
-import { useEffect } from "react";
-import { useMemo } from "use-memo-one";
+import { useEffect, useMemo } from "react";
import getBodyElement from "../get-body-element";
import useUniqueId from "../use-unique-id";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/sensors/use-keyboard-sensor.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/sensors/use-keyboard-sensor.js
index e451f737a..a4e390133 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/sensors/use-keyboard-sensor.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/sensors/use-keyboard-sensor.js
@@ -1,5 +1,4 @@
-import { useRef } from "react";
-import { useCallback, useMemo } from "use-memo-one";
+import { useCallback, useMemo, useRef } from "react";
import { invariant } from "../../../invariant";
import * as keyCodes from "../../key-codes";
import bindEvents from "../../event-bindings/bind-events";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/sensors/use-mouse-sensor.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/sensors/use-mouse-sensor.js
index ca242de41..5fa686c0b 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/sensors/use-mouse-sensor.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/sensors/use-mouse-sensor.js
@@ -1,5 +1,4 @@
-import { useRef } from "react";
-import { useCallback, useMemo } from "use-memo-one";
+import { useCallback, useMemo, useRef } from "react";
import { invariant } from "../../../invariant";
import bindEvents from "../../event-bindings/bind-events";
import * as keyCodes from "../../key-codes";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/sensors/use-touch-sensor.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/sensors/use-touch-sensor.js
index 49b3ae491..cc77b3249 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/sensors/use-touch-sensor.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/sensors/use-touch-sensor.js
@@ -1,5 +1,4 @@
-import { useRef } from "react";
-import { useCallback, useMemo } from "use-memo-one";
+import { useCallback, useMemo, useRef } from "react";
import { invariant } from "../../../invariant";
import bindEvents from "../../event-bindings/bind-events";
import * as keyCodes from "../../key-codes";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/use-sensor-marshal.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/use-sensor-marshal.js
index c559a56ab..9e62ecf10 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/use-sensor-marshal.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-sensor-marshal/use-sensor-marshal.js
@@ -1,6 +1,5 @@
import rafSchd from "raf-schd";
-import { useState } from "react";
-import { useCallback, useMemo } from "use-memo-one";
+import { useCallback, useMemo, useState } from "react";
import { invariant } from "../../invariant";
import create from "./lock";
import canStartDrag from "../../state/can-start-drag";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-style-marshal/use-style-marshal.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-style-marshal/use-style-marshal.js
index b27b4d534..a0d14ca11 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-style-marshal/use-style-marshal.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-style-marshal/use-style-marshal.js
@@ -1,6 +1,5 @@
-import { useRef } from "react";
+import { useCallback, useMemo, useRef } from "react";
import memoizeOne from "memoize-one";
-import { useCallback, useMemo } from "use-memo-one";
import { invariant } from "../../invariant";
import getStyles from "./get-styles";
import { prefix } from "../data-attributes";
diff --git a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-unique-id.js b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-unique-id.js
index 0abf93e86..32e9046cc 100644
--- a/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-unique-id.js
+++ b/client/src/components/production-board-kanban/trello-board/dnd/lib/view/use-unique-id.js
@@ -1,4 +1,4 @@
-import { useMemo } from "use-memo-one";
+import { useMemo } from "react";
let count = 0;
const defaults = {
diff --git a/client/vite.config.js b/client/vite.config.js
index 1d9eb75ad..261873cbd 100644
--- a/client/vite.config.js
+++ b/client/vite.config.js
@@ -51,7 +51,9 @@ export default defineConfig(({ command, mode }) => {
const enableReactCompiler =
process.env.VITE_ENABLE_COMPILER_IN_DEV || (isBuild && (mode === "production" || isTestBuild));
- console.log(enableReactCompiler ? "React Compiler enabled" : "React Compiler disabled");
+ logger.info(
+ enableReactCompiler ? chalk.green.bold("React Compiler enabled") : chalk.yellow.bold("React Compiler disabled")
+ );
return {
base: "/",
@@ -121,17 +123,7 @@ export default defineConfig(({ command, mode }) => {
enableReactCompiler
? {
babel: {
- plugins: [
- [
- "babel-plugin-react-compiler",
- {
- // Exclude third-party drag-and-drop library from compilation
- sources: (filename) => {
- return !filename.includes("trello-board/dnd");
- }
- }
- ]
- ]
+ plugins: [["babel-plugin-react-compiler"]]
}
}
: undefined
@@ -221,7 +213,6 @@ export default defineConfig(({ command, mode }) => {
build: {
sourcemap: true,
-
rollupOptions: {
output: {
manualChunks: {