Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Dev -> Main - fixing Publishing behaviour #717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
FalkWolsky merged 11 commits into main from dev
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit Hold shift + click to select a range
d666fc6
Added Docu about privacy for local marketplace
Feb 25, 2024
c6a207a
Changes to support persistence of Layers Mode per App
Feb 25, 2024
643e46f
handle disableCollision flag in app dsl
raheeliftikhar5 Feb 26, 2024
317455a
small fix
raheeliftikhar5 Feb 26, 2024
efd6dbe
Revert the validation that stops unpiblished apps to be viewed
aq-ikhwa-tech Feb 26, 2024
cffdba8
Rename marketplace env var
aq-ikhwa-tech Feb 26, 2024
9c97268
Merge pull request #713 from lowcoder-org/revert-app-view-validation
FalkWolsky Feb 26, 2024
e24c16e
Merge pull request #714 from raheeliftikhar5/layers-collision
FalkWolsky Feb 26, 2024
966fa27
Drawer Close Button Left or Right
sudoischenny Feb 26, 2024
c6629a1
Merge pull request #716 from sudoischenny/main
FalkWolsky Feb 26, 2024
f65f85b
Adding LOWCODER_CREATE_WORKSPACE_ON_SIGNUP to Readme
Feb 26, 2024
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
Prev Previous commit
Next Next commit
Drawer Close Button Left or Right
Adds the ability to select the left or right position for the close button in the drawer component.
  • Loading branch information
sudoischenny committed Feb 26, 2024
commit 966fa27fbb6da4e837fe28fb8a201e483efbafb3
75 changes: 44 additions & 31 deletions client/packages/lowcoder/src/comps/hooks/drawerComp.tsx
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { CloseOutlined } from "@ant-design/icons";
import { CloseOutlined, PropertySafetyFilled } from "@ant-design/icons";
import { default as Button } from "antd/es/button";
import { ContainerCompBuilder } from "comps/comps/containerBase/containerCompBuilder";
import { gridItemCompToGridItems, InnerGrid } from "comps/comps/containerComp/containerView";
import { AutoHeightControl } from "comps/controls/autoHeightControl";
import { BoolControl } from "comps/controls/boolControl";
import { StringControl } from "comps/controls/codeControl";
import { booleanExposingStateControl } from "comps/controls/codeStateControl";
import { PositionControl } from "comps/controls/dropdownControl";
import { PositionControl, LeftRightControl } from "comps/controls/dropdownControl";
import { closeEvent, eventHandlerControl } from "comps/controls/eventHandlerControl";
import { styleControl } from "comps/controls/styleControl";
import { DrawerStyle } from "comps/controls/styleControlConstants";
Expand Down Expand Up @@ -35,40 +35,22 @@ const DrawerWrapper = styled.div`
pointer-events: auto;
`;

const ButtonStyle = styled(Button)`
position: absolute;
left: 0;
top: 0;
z-index: 10;
font-weight: 700;
box-shadow: none;
color: rgba(0, 0, 0, 0.45);
height: 54px;
width: 54px;

svg {
width: 16px;
height: 16px;
}

&,
:hover,
:focus {
background-color: transparent;
border: none;
}

:hover,
:focus {
color: rgba(0, 0, 0, 0.75);
}
`;

// If it is a number, use the px unit by default
function transToPxSize(size: string | number) {
return isNumeric(size) ? size + "px" : (size as string);
}

const ClosePlacementOptions = [
{
label: trans("drawer.left"),
value: "left",
},
{
label: trans("drawer.right"),
value: "right",
},
] as const;

const PlacementOptions = [
{
label: trans("drawer.top"),
Expand All @@ -88,6 +70,7 @@ const PlacementOptions = [
},
] as const;


let TmpDrawerComp = (function () {
return new ContainerCompBuilder(
{
Expand All @@ -98,6 +81,7 @@ let TmpDrawerComp = (function () {
autoHeight: AutoHeightControl,
style: styleControl(DrawerStyle),
placement: PositionControl,
closePosition: withDefault(LeftRightControl, "left"),
maskClosable: withDefault(BoolControl, true),
showMask: withDefault(BoolControl, true),
},
Expand All @@ -119,6 +103,34 @@ let TmpDrawerComp = (function () {
},
[dispatch, isTopBom]
);
const ButtonStyle = styled(Button)`
position: absolute;
${props.closePosition === "right" ? "right: 0;" : "left: 0;"}
top: 0;
z-index: 10;
font-weight: 700;
box-shadow: none;
color: rgba(0, 0, 0, 0.45);
height: 54px;
width: 54px;

svg {
width: 16px;
height: 16px;
}

&,
:hover,
:focus {
background-color: transparent;
border: none;
}

:hover,
:focus {
color: rgba(0, 0, 0, 0.75);
}
`;
return (
<BackgroundColorContext.Provider value={props.style.background}>
<DrawerWrapper>
Expand Down Expand Up @@ -181,6 +193,7 @@ let TmpDrawerComp = (function () {
.setPropertyViewFn((children) => (
<>
<Section name={sectionNames.basic}>
{children.closePosition.propertyView({ label: trans("drawer.closePosition"), radioButton: true })}
{children.placement.propertyView({ label: trans("drawer.placement"), radioButton: true })}
{["top", "bottom"].includes(children.placement.getView())
? children.autoHeight.getPropertyView()
Expand Down
1 change: 1 addition & 0 deletions client/packages/lowcoder/src/i18n/locales/de.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,7 @@ export const de = {
"title": "Angezeigter Container-Titel"
},
"drawer": {
"closePosition": "Platzierung der Verschlusses",
"placement": "Platzierung der Schubladen",
"size": "Größe",
"top": "Top",
Expand Down
1 change: 1 addition & 0 deletions client/packages/lowcoder/src/i18n/locales/en.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,7 @@ export const en = {
"title": "Displayed Container Title"
},
"drawer": {
"closePosition": "Close Button Placement",
"placement": "Drawer Placement",
"size": "Size",
"top": "Top",
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1335,6 +1335,7 @@
"title": "Angezeigter Container-Titel"
},
"drawer": {
"closePosition": "Platzierung der Verschlusses",
"placement": "Platzierung der Schubladen",
"size": "Größe",
"top": "Top",
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,7 @@
"title": "Displayed Container Title"
},
"drawer": {
"closePosition": "Close Button Placement",
"placement": "Drawer Placement",
"size": "Size",
"top": "Top",
Expand Down
View file Open in desktop

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client/packages/lowcoder/src/i18n/locales/zh.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,7 @@ container: {
title: "容器标题",
},
drawer: {
closePosition: "关闭位置",
placement: "抽屉位置",
size: "大小",
top: "顶部",
Expand Down

AltStyle によって変換されたページ (->オリジナル) /