Skip to content

Commit d41554a

Browse files
committed
remove console.log statements
1 parent 0acbbc4 commit d41554a

File tree

7 files changed

+49
-52
lines changed

7 files changed

+49
-52
lines changed

vuu-ui/packages/grid-layout/src/GridLayoutProvider.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ export const GridLayoutProvider = (
103103
*/
104104
const onChangeChildElements = useCallback<GridChildElementsChangeHandler>(
105105
(layoutId, childElements) => {
106-
console.log(`[GridLayoutProvider] #${layoutId} onChangeChildElements`, {
107-
childElements,
108-
});
106+
// console.log(`[GridLayoutProvider] #${layoutId} onChangeChildElements`, {
107+
// childElements,
108+
// });
109109
const serializedComponentMap =
110110
childElements.reduce<SerializedComponentMap>((map, component) => {
111111
const { id: gridLayoutItemId } = component.props;

vuu-ui/packages/grid-layout/src/GridModel.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,16 +1190,16 @@ export class GridModel extends EventEmitter<GridModelEvents> {
11901190

11911191
addChildItem(childItem: GridModelChildItem) {
11921192
// TODO assert that item is within current columns, rows or extend these
1193-
console.log(
1194-
`[GridModel#${this.id}] addChildItem ${childItem.id} (parent: ${childItem.stackId})
1195-
is visible ? ${childItem.contentVisible}
1196-
resizeable ? ${childItem.resizeable}
1197-
gridArea ${JSON.stringify(childItem.layoutStyle)}
1198-
`,
1199-
{
1200-
childItem,
1201-
},
1202-
);
1193+
// console.log(
1194+
// `[GridModel#${this.id}] addChildItem ${childItem.id} (parent: ${childItem.stackId})
1195+
// is visible ? ${childItem.contentVisible}
1196+
// resizeable ? ${childItem.resizeable}
1197+
// gridArea ${JSON.stringify(childItem.layoutStyle)}
1198+
// `,
1199+
// {
1200+
// childItem,
1201+
// },
1202+
// );
12031203
this.#childItems.push(childItem);
12041204
this.#index.set(childItem.id, childItem);
12051205
}

vuu-ui/packages/grid-layout/src/drag-drop-next/SpaceMan.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ export class SpaceMan {
270270

271271
drop(x: number, y: number): Promise<void> {
272272
// TODO dragItem should be passed in
273-
console.log(`[SpaceMan#${this.id}] drop, returns a promise`, {
274-
dragItem: this.#dragItem,
275-
});
273+
// console.log(`[SpaceMan#${this.id}] drop, returns a promise`, {
274+
// dragItem: this.#dragItem,
275+
// });
276276
return new Promise((resolve) => {
277277
if (this.#dragItem) {
278278
const dragItem = this.#dragItem;

vuu-ui/packages/grid-layout/src/drag-drop-next/drag-drop-listeners.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ export function initializeDragContainer(
191191
}
192192
};
193193
const onDragEnd = () => {
194-
console.log(`[drag-drop-listeners#${dragId}] onDragEnd`, {
195-
dragSource: dragContext.dragSource,
196-
});
194+
// console.log(`[drag-drop-listeners#${dragId}] onDragEnd`, {
195+
// dragSource: dragContext.dragSource,
196+
// });
197197
if (
198198
sourceIsTabbedComponent(dragContext.dragSource) &&
199199
dragContext.dragSource.tabsId === dragId

vuu-ui/packages/grid-layout/src/useAsDropTarget.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ export const useAsDropTarget = () => {
157157

158158
if (dropTarget !== currentDropTarget) {
159159
if (dropTarget) {
160-
console.log(
161-
`%c[useAsDropTarget] onDragEnter set current dropTarget = ${dropTarget.gridLayoutItemId}`,
162-
"color:green;font-weight:bold;",
163-
);
160+
// console.log(
161+
// `%c[useAsDropTarget] onDragEnter set current dropTarget = ${dropTarget.gridLayoutItemId}`,
162+
// "color:green;font-weight:bold;",
163+
// );
164164

165165
dropTargetStateRef.current.dropTarget = dropTarget;
166166
const { rect } = dropTargetStateRef.current;
@@ -172,10 +172,10 @@ export const useAsDropTarget = () => {
172172
rect.top = top;
173173
} else if (currentDropTarget) {
174174
dropTargetStateRef.current.dropTarget = undefined;
175-
console.log(
176-
`%c[useAsDropTarget] clear droptarget ${currentDropTarget?.gridLayoutItemId}`,
177-
"color:brown;font-weight: bold;",
178-
);
175+
// console.log(
176+
// `%c[useAsDropTarget] clear droptarget ${currentDropTarget?.gridLayoutItemId}`,
177+
// "color:brown;font-weight: bold;",
178+
// );
179179
removeDropTargetPositionClassName(currentDropTarget?.target);
180180
}
181181
}
@@ -259,7 +259,7 @@ export const useAsDropTarget = () => {
259259
const { dropTarget: currentDropTarget } = dropTargetStateRef.current;
260260
const { dragSource } = dragContext;
261261
if (dragSource && currentDropTarget) {
262-
console.log(`[useAsDropTarget#${layoutId}] onDrop`, { dragSource });
262+
// console.log(`[useAsDropTarget#${layoutId}] onDrop`, { dragSource });
263263

264264
const dropTarget = getDropTarget(evt.target, currentDropTarget);
265265
if (dropTarget && dropTargetStateRef.current.position) {
@@ -281,7 +281,7 @@ export const useAsDropTarget = () => {
281281
dropTargetStateRef.current.dropTarget = undefined;
282282
dropTargetStateRef.current.position = undefined;
283283
},
284-
[dragContext, drop, layoutId],
284+
[dragContext, drop],
285285
);
286286

287287
return {

vuu-ui/packages/grid-layout/src/useGridLayout.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ export const useGridLayout = ({
218218
const [gridModel, gridLayoutModel, containerCallback] = useMemo(
219219
// TODO handling runtime change of cols, rows etc currently not supported
220220
() => {
221-
console.log(
222-
`%c[useGridLayout#${id}] useMemo create the GridModel`,
223-
"color: green",
224-
);
221+
// console.log(
222+
// `%c[useGridLayout#${id}] useMemo create the GridModel`,
223+
// "color: green",
224+
// );
225225
const gridModel = new GridModel(id, layout);
226226
const gridLayoutModel = new GridLayoutModel(gridModel);
227227
const callbackRef: RefCallback<HTMLDivElement> = (el) => {
@@ -362,11 +362,11 @@ export const useGridLayout = ({
362362
*/
363363
const handleDrop = useCallback<GridLayoutDropHandler>(
364364
(targetItemId, dragSource, position) => {
365-
console.log(`[useGridLayout#${id}] handleDrop`, {
366-
targetItemId,
367-
dragSource,
368-
position,
369-
});
365+
// console.log(`[useGridLayout#${id}] handleDrop`, {
366+
// targetItemId,
367+
// dragSource,
368+
// position,
369+
// });
370370

371371
const targetGridItem = gridModel.getChildItem(targetItemId, true);
372372

@@ -564,12 +564,12 @@ export const useGridLayout = ({
564564
}
565565
} else if (targetStackItemId && dropPosition) {
566566
if (sourceIsComponent(dragSource)) {
567-
console.log(
568-
`[useGridLayout] dropping a standalone component #${dragSource.id} into a stack ${targetStackItemId}`,
569-
{
570-
dragSource,
571-
},
572-
);
567+
// console.log(
568+
// `[useGridLayout] dropping a standalone component #${dragSource.id} into a stack ${targetStackItemId}`,
569+
// {
570+
// dragSource,
571+
// },
572+
// );
573573
const tabState = gridModel.getTabState(targetStackItemId);
574574
tabState.addTab(
575575
{ id: dragSource.id, label: dragSource.label },

vuu-ui/showcase/src/examples/html/GridLayout.examples.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,14 +1424,11 @@ export const ShowCaseLayoutNestedGrid = () => {
14241424
[],
14251425
);
14261426

1427-
const handleGridLayoutChanged = useCallback<GridLayoutChangeHandler>(
1428-
(id, gridLayout) => {
1429-
console.log(`layout changed for grid ${id}`, {
1430-
gridLayout,
1431-
});
1432-
},
1433-
[],
1434-
);
1427+
const handleGridLayoutChanged = useCallback<GridLayoutChangeHandler>(() => {
1428+
// console.log(`layout changed for grid ${id}`, {
1429+
// gridLayout,
1430+
// });
1431+
}, []);
14351432

14361433
return (
14371434
<>

0 commit comments

Comments
 (0)