Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
d28a788
dip
marks0351 Jun 30, 2021
0498057
dip
marks0351 Jul 1, 2021
84308ce
scroll
marks0351 Jul 1, 2021
e27cf78
fixes
marks0351 Jul 2, 2021
2a1d396
dip
marks0351 Jul 2, 2021
134dd37
dip
marks0351 Jul 5, 2021
4c9d870
dip
marks0351 Jul 5, 2021
504fb1e
dip
marks0351 Jul 7, 2021
63a28d9
dip
marks0351 Jul 7, 2021
09819ea
dip
marks0351 Jul 7, 2021
0dbba5c
dip
marks0351 Jul 7, 2021
60bb9ed
dip
marks0351 Jul 7, 2021
675317b
dip
marks0351 Jul 7, 2021
8dc45ad
dip
marks0351 Jul 7, 2021
e818347
dip
marks0351 Jul 7, 2021
db72a81
dip
marks0351 Jul 8, 2021
591c0c0
dip
marks0351 Jul 8, 2021
9f74062
dip
marks0351 Jul 8, 2021
7e47395
dip
marks0351 Jul 8, 2021
ca223ac
dip
marks0351 Jul 9, 2021
5c2554a
dip
marks0351 Jul 13, 2021
9a48348
dip
marks0351 Jul 13, 2021
a8201e4
solve for canvas glitches
marks0351 Jul 13, 2021
9959371
dip
marks0351 Jul 15, 2021
91bc015
dip
marks0351 Jul 15, 2021
4f016a3
dip
marks0351 Jul 15, 2021
2458ace
adjust scroll speed
marks0351 Jul 15, 2021
6cf5990
dip
marks0351 Jul 15, 2021
859fff4
dip(code clean up)
marks0351 Jul 15, 2021
48767ef
dip
marks0351 Jul 16, 2021
4edc163
dip
marks0351 Jul 16, 2021
641f47e
---dip
marks0351 Jul 16, 2021
d06b745
dip
marks0351 Jul 17, 2021
35e2913
dip
marks0351 Jul 19, 2021
2f9a130
dip
marks0351 Jul 19, 2021
e72cb89
middle ware for dropping multiple widgets.
marks0351 Jul 19, 2021
c5e9d1b
adding scroll to drag for canvas selection.
marks0351 Jul 19, 2021
8e32f28
fixing drag disabled and modal widget(detach from layout) drops
marks0351 Jul 19, 2021
64a30ba
firefox and safari fixes
marks0351 Jul 20, 2021
a3a67c7
rebase conflicts.
marks0351 Jul 20, 2021
2270418
fixing broken specs.
marks0351 Jul 21, 2021
631acf3
fixing specs and adding jest tests.
marks0351 Jul 22, 2021
c7a4863
show border and disable resize when multiple widgets are selected.
marks0351 Jul 23, 2021
4ec2d48
selection box grab cursor
marks0351 Jul 23, 2021
af7cd3a
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Jul 23, 2021
89cd819
merge conflicts.
marks0351 Jul 23, 2021
58afaea
code clean up
marks0351 Jul 23, 2021
a058dab
fixing specs.
marks0351 Jul 23, 2021
bbf0d83
fixed a bug and failed specs.
marks0351 Jul 23, 2021
6d97fc1
fixing rerenders.
marks0351 Jul 26, 2021
1399c2f
code clean up
marks0351 Jul 26, 2021
55a5a43
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Jul 26, 2021
78d594f
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Jul 26, 2021
6da59b0
code review comments
marks0351 Jul 28, 2021
ef276ce
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Jul 28, 2021
d9b3486
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Jul 29, 2021
3b0717a
always have the drag point inside the widget.
marks0351 Jul 29, 2021
2912269
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Jul 29, 2021
b353406
fetching snap spaces instead of calculating.
marks0351 Jul 30, 2021
2a4009e
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Jul 30, 2021
5bfe794
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 2, 2021
06ad4a1
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 3, 2021
916f583
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 3, 2021
64b1c81
remove widget_move action
marks0351 Aug 3, 2021
32e722d
fixing bugs with add widget parent height updation.
marks0351 Aug 3, 2021
0ab5656
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 3, 2021
206e211
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 4, 2021
9b14246
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 4, 2021
78d36db
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 4, 2021
464d5e3
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 6, 2021
88bbe5e
fixing specs.
marks0351 Aug 6, 2021
10df239
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 6, 2021
c024e7d
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 9, 2021
7309f25
List widget conflict fixes.
marks0351 Aug 9, 2021
d05cadd
fixing canvas drop persistence.
marks0351 Aug 9, 2021
28f289c
Adding click to drag for modals and fixing few issues.
marks0351 Aug 10, 2021
6bd45b9
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 10, 2021
9dbec07
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 11, 2021
67e3de3
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 13, 2021
1785fe6
cmd + a and draw from outside
marks0351 Aug 13, 2021
1ef0719
dip
marks0351 Aug 13, 2021
5bbd4cf
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 17, 2021
e88f850
select from editor
marks0351 Aug 17, 2021
2760528
fixing a few bugs
marks0351 Aug 17, 2021
49182a2
Revert "dip"
marks0351 Aug 17, 2021
634e38b
fixing bugs
marks0351 Aug 17, 2021
f70b922
fixing specs
marks0351 Aug 17, 2021
c28bc51
Adding new specs.
marks0351 Aug 18, 2021
3ceddd4
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 18, 2021
75a63b3
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 23, 2021
509c122
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
marks0351 Aug 24, 2021
8d1255a
addressing code review comments.
marks0351 Aug 24, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions app/client/src/actions/canvasSelectionActions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
import { ReduxAction, ReduxActionTypes } from "constants/ReduxActionConstants";
import { SelectedArenaDimensions } from "pages/common/CanvasSelectionArena";
import { XYCord } from "utils/hooks/useCanvasDragging";

export const setCanvasSelectionFromEditor = (
start: boolean,
startPoints?: XYCord,
) => {
return {
type: start
? ReduxActionTypes.START_CANVAS_SELECTION_FROM_EDITOR
: ReduxActionTypes.STOP_CANVAS_SELECTION_FROM_EDITOR,
payload: {
...(start && startPoints ? { startPoints } : {}),
},
};
};

export const setCanvasSelectionStateAction = (
start: boolean,
Expand Down
8 changes: 1 addition & 7 deletions app/client/src/actions/widgetSelectionActions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ReduxActionTypes, ReduxAction } from "constants/ReduxActionConstants";
import { MAIN_CONTAINER_WIDGET_ID } from "constants/WidgetConstants";

export const selectWidgetAction = (
widgetId?: string,
Expand Down Expand Up @@ -50,14 +49,9 @@ export const deselectMultipleWidgetsAction = (
};
};

export const selectAllWidgetsInCanvasInitAction = (
canvasId = MAIN_CONTAINER_WIDGET_ID,
): ReduxAction<{ canvasId: string }> => {
export const selectAllWidgetsInCanvasInitAction = () => {
return {
type: ReduxActionTypes.SELECT_ALL_WIDGETS_IN_CANVAS_INIT,
payload: {
canvasId,
},
};
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext, useRef, memo, useMemo } from "react";
import { XYCoord } from "react-dnd";
import { XYCord } from "utils/hooks/useCanvasDragging";

import {
WidgetOperations,
Expand Down Expand Up @@ -132,7 +132,7 @@ export const ResizableComponent = memo(function ResizableComponent(
// Checks if the current resize position has any collisions
// If yes, set isColliding flag to true.
// If no, set isColliding flag to false.
const isColliding = (newDimensions: UIElementSize, position: XYCoord) => {
const isColliding = (newDimensions: UIElementSize, position: XYCord) => {
// Moving the bounding element calculations inside
// to make this expensive operation only whne
const boundingElementClientRect = boundingElement
Expand Down Expand Up @@ -231,7 +231,7 @@ export const ResizableComponent = memo(function ResizableComponent(
// 1) There is no collision
// 2) There is a change in widget size
// Update widget, if both of the above are true.
const updateSize = (newDimensions: UIElementSize, position: XYCoord) => {
const updateSize = (newDimensions: UIElementSize, position: XYCord) => {
// Get the difference in size of the widget, before and after resizing.
const delta: UIElementSize = {
height: newDimensions.height - dimensions.height,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { XYCoord } from "react-dnd";
import { XYCord } from "utils/hooks/useCanvasDragging";
import { WidgetProps, WidgetRowCols } from "widgets/BaseWidget";
import { GridDefaults } from "constants/WidgetConstants";

Expand All @@ -8,7 +8,7 @@ export const RESIZABLE_CONTAINER_BORDER_THEME_INDEX = 1;

export const computeRowCols = (
delta: UIElementSize,
position: XYCoord,
position: XYCord,
props: WidgetProps,
) => {
return {
Expand Down Expand Up @@ -51,7 +51,7 @@ export const hasRowColsChanged = (

export const computeFinalRowCols = (
delta: UIElementSize,
position: XYCoord,
position: XYCord,
props: WidgetProps,
): WidgetRowCols | false => {
const newRowCols = computeBoundedRowCols(
Expand Down
3 changes: 3 additions & 0 deletions app/client/src/constants/ReduxActionConstants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ export const ReduxActionTypes = {
LOAD_WIDGET_PANE: "LOAD_WIDGET_PANE",
ZOOM_IN_CANVAS: "ZOOM_IN_CANVAS",
ZOOM_OUT_CANVAS: "ZOOM_OUT_CANVAS",
START_CANVAS_SELECTION_FROM_EDITOR: "START_CANVAS_SELECTION_FROM_EDITOR",
STOP_CANVAS_SELECTION_FROM_EDITOR: "STOP_CANVAS_SELECTION_FROM_EDITOR",
START_CANVAS_SELECTION: "START_CANVAS_SELECTION",
STOP_CANVAS_SELECTION: "STOP_CANVAS_SELECTION",
UNDO_CANVAS_ACTION: "UNDO_CANVAS_ACTION",
Expand Down Expand Up @@ -539,6 +541,7 @@ export const ReduxActionErrorTypes = {
SAVE_PAGE_ERROR: "SAVE_PAGE_ERROR",
FETCH_WIDGET_CARDS_ERROR: "FETCH_WIDGET_CARDS_ERROR",
WIDGET_OPERATION_ERROR: "WIDGET_OPERATION_ERROR",
WIDGET_SELECTION_ERROR: "WIDGET_SELECTION_ERROR",
FETCH_PROPERTY_PANE_CONFIGS_ERROR: "FETCH_PROPERTY_PANE_CONFIGS_ERROR",
FETCH_CONFIGS_ERROR: "FETCH_CONFIGS_ERROR",
PROPERTY_PANE_ERROR: "PROPERTY_PANE_ERROR",
Expand Down
1 change: 1 addition & 0 deletions app/client/src/constants/WidgetConstants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export const DroppableWidgets: WidgetType[] = [
WidgetTypes.FORM_WIDGET,
WidgetTypes.LIST_WIDGET,
WidgetTypes.TABS_WIDGET,
WidgetTypes.MODAL_WIDGET,
];

// Note: Widget Padding + Container Padding === DEFAULT_GRID_ROW_HEIGHT to gracefully lose one row when a container is used,
Expand Down
Loading