Skip to content
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { Button } from "@appsmith/ads";
import { getEntityProperties } from "ee/pages/Editor/Explorer/Entity/getEntityProperties";
import store from "store";
import { ENTITY_TYPE } from "entities/DataTree/dataTreeFactory";
import { getIDEViewMode } from "selectors/ideSelectors";
import { EditorViewMode } from "ee/entities/IDE/constants";
import { DEFAULT_EXPLORER_PANE_WIDTH } from "constants/AppConstants";
import { BOTTOM_BAR_HEIGHT } from "components/BottomBar/constants";

Expand Down Expand Up @@ -44,6 +46,8 @@ export function EntityProperties() {
(state: AppState) => state.ui.widgetDragResize.lastSelectedWidget,
);

const ideViewMode = useSelector(getIDEViewMode);

useEffect(() => {
document.addEventListener("click", handleOutsideClick);

Expand Down Expand Up @@ -123,7 +127,10 @@ export function EntityProperties() {
ref.current.style.bottom = "unset";
}

ref.current.style.left = DEFAULT_EXPLORER_PANE_WIDTH + "px";
ref.current.style.left =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should manipulate the DOM directly in this scenario and normally I would request for a refactor of such. However, given that this is working fix from an external contributor and it would be too much to ask to fix our mess, I'll approve this PR and create a separate issue to refactor this component later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alex-golovanov okay, thankyou.

ideViewMode === EditorViewMode.SplitScreen
? "100%"
: DEFAULT_EXPLORER_PANE_WIDTH + "px";
}
}, [entityId]);

Expand Down