Skip to content

Numerous fixes and introduction of Layout mode. #538

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
merged 7 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Introducing Layout / Logic Mode step 4 - Tabs
  • Loading branch information
FalkWolsky committed Nov 28, 2023
commit 8d7d71f679c9eedf9bd9932f2131a892297b7be3
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,26 @@ export const TabbedContainerBaseComp = (function () {
newOptionLabel: "Tab",
})}
{children.selectedTabKey.propertyView({ label: trans("prop.defaultValue") })}
{children.autoHeight.getPropertyView()}
</Section>
<Section name={sectionNames.interaction}>
{children.onEvent.getPropertyView()}
{disabledPropertyView(children)}
</Section>
<Section name={sectionNames.layout}>{hiddenPropertyView(children)}</Section>
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>

{["logic", "both"].includes(useContext(EditorContext).editorModeStatus) && (
<Section name={sectionNames.interaction}>
{children.onEvent.getPropertyView()}
{disabledPropertyView(children)}
{hiddenPropertyView(children)}
</Section>
)}

{["layout", "both"].includes(useContext(EditorContext).editorModeStatus) && (
<>
<Section name={sectionNames.layout}>
{children.autoHeight.getPropertyView()}
</Section>
<Section name={sectionNames.style}>
{children.style.getPropertyView()}
</Section>
</>
)}
</>
);
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ import { Timeline } from "antd";

import { ANTDICON } from "./antIcon"; // todo: select icons to not import all icons

import { useContext } from "react";
import { EditorContext } from "comps/editorState";

const EventOptions = [
clickEvent,
] as const;
Expand Down Expand Up @@ -167,24 +170,34 @@ let TimeLineBasicComp = (function () {
tooltip: TimelineDataTooltip,
placeholder: "[]",
})}
{children.mode.propertyView({
label: trans("timeLine.mode"),
tooltip: trans("timeLine.modeTooltip"),
})}
{children.reverse.propertyView({
label: trans("timeLine.reverse"),
})}
{children.pending.propertyView({
label: trans("timeLine.pending"),
})}
</Section>
<Section name={sectionNames.layout}>
{children.onEvent.getPropertyView()}
{hiddenPropertyView(children)}
</Section>
<Section name={sectionNames.style}>
{children.style.getPropertyView()}
</Section>

{["logic", "both"].includes(useContext(EditorContext).editorModeStatus) && (
<Section name={sectionNames.interaction}>
{children.onEvent.getPropertyView()}
{hiddenPropertyView(children)}
</Section>
)}

{["layout", "both"].includes(useContext(EditorContext).editorModeStatus) && (
<><Section name={sectionNames.layout}>
{children.mode.propertyView({
label: trans("timeLine.mode"),
tooltip: trans("timeLine.modeTooltip"),
})}
{children.pending.propertyView({
label: trans("timeLine.pending"),
tooltip: trans("timeLine.pendingDescription"),
})}
{children.reverse.propertyView({
label: trans("timeLine.reverse"),
})}
</Section>
<Section name={sectionNames.style}>
{children.style.getPropertyView()}
</Section>
</>
)}
</>
))
.build();
Expand Down
23 changes: 12 additions & 11 deletions client/packages/lowcoder/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2639,20 +2639,21 @@ export const en = {
},
/////////////////////
timeLine: {
titleColor: "title Color",
subTitleColor: "subTitle Color",
lableColor: "lable Color",
value: "value",
mode: "mode",
left: "Left",
right: "Right",
alternate: "alternate",
titleColor: "Title color",
subTitleColor: "Subtitle color",
lableColor: "Label color",
value: "Timeline data",
mode: "Display order",
left: "Content right",
right: "Content left",
alternate: "Alternate content order",
modeTooltip:
"Set the content to appear left/right or alternately on both sides of the timeline",
reverse: "reverse",
pending: "pending",
reverse: "Newest events first",
pending: "Pending node text",
pendingDescription: "When set, then an last node with the text and a waiting indicator will be displayed.",
defaultPending: "continuous improvement",
clickTitleEvent: "clickTitleEvent",
clickTitleEvent: "Click Title Event",
clickTitleEventDesc: "click Title Event",
Introduction: "Introduction keys",
helpTitle: "title of timeline(Required)",
Expand Down