Skip to content

Dev -> Main - Bugfixes #598

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 58 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
70a2284
Link accounts based on common authid(email)
aq-ikhwa-tech Dec 5, 2023
e2bc358
Merge branch 'dev' into fix-oauth-issues
aq-ikhwa-tech Dec 5, 2023
afa3104
Finalize fixes
aq-ikhwa-tech Dec 6, 2023
5cc8acd
Merge branch 'dev' into fix-oauth-issues
aq-ikhwa-tech Dec 6, 2023
0bc105c
fixing plugin creator
Dec 6, 2023
5772a7a
fixing plugin creator 2
Dec 6, 2023
6d02703
fix plugin creator
Dec 6, 2023
2d345e8
fix plugin creator 3
Dec 6, 2023
f615728
fix documentation for plugin creator
Dec 6, 2023
cf6b9fe
plugin creator fix dependencies
Dec 6, 2023
7440e1a
plugin creator fix dependencies
Dec 6, 2023
756b294
Merge pull request #567 from lowcoder-org/fix-plugin-creator
FalkWolsky Dec 6, 2023
669b379
plugin creator fix dependencies
Dec 6, 2023
885d0dc
Bump Vite to 4.5.1
Dec 6, 2023
efa905a
Updated Component Plugin Demo
Dec 6, 2023
02327cf
Updated Component Plugin Demo
Dec 6, 2023
53afb73
Merge pull request #566 from lowcoder-org/fix-oauth-issues
FalkWolsky Dec 7, 2023
2f4504f
fix: fix build issues
raheeliftikhar5 Dec 7, 2023
1873519
small fix
raheeliftikhar5 Dec 7, 2023
d516538
lock file
raheeliftikhar5 Dec 7, 2023
9979f42
Merge pull request #568 from raheeliftikhar5/build-fix
FalkWolsky Dec 7, 2023
98ab214
Fixes in workspaces anc comp includes
Dec 7, 2023
9595937
Fixes in workspaces anc comp includes
Dec 7, 2023
71148c1
fix: avoid editor popup close on selecting suggeston using mouse
raheeliftikhar5 Dec 7, 2023
f606a4c
fix: enable scroll in table columns configs popup
raheeliftikhar5 Dec 7, 2023
b1e50c4
fix: avoid editor popup close when open from config popup
raheeliftikhar5 Dec 8, 2023
89d21d0
fix: date input validation fix
raheeliftikhar5 Dec 8, 2023
a41adbe
fix: table status column's text color fix
raheeliftikhar5 Dec 8, 2023
fab5301
Reverted changes for Workspaces.
Dec 8, 2023
8d7b3d1
Merge pull request #569 from raheeliftikhar5/editor-fixes
FalkWolsky Dec 8, 2023
c0896af
Merge pull request #570 from raheeliftikhar5/issue-369/date-input-val…
FalkWolsky Dec 8, 2023
cb5bff0
Merge pull request #571 from raheeliftikhar5/table-status-column-style
FalkWolsky Dec 8, 2023
2b20d3f
Reverted changes for Workspaces.
Dec 8, 2023
6845453
Add functionality to allow users to link to auth providers while bein…
aq-ikhwa-tech Dec 9, 2023
95aae3c
Add handling for LOWCODER_CREATE_SIGNUP_WORKSPACE
aq-ikhwa-tech Dec 9, 2023
0a96750
Merge branch 'dev' into link-oauth-providers-for-existing-users
FalkWolsky Dec 9, 2023
b7c4928
new: simplify api service build
ludomikula Dec 6, 2023
b0d08a8
new: allow serving static files from mounted volume
ludomikula Dec 10, 2023
b106575
Merge pull request #572 from lowcoder-org/link-oauth-providers-for-ex…
FalkWolsky Dec 10, 2023
6292b35
Merge branch 'dev' into docker_build_update
FalkWolsky Dec 10, 2023
4304708
Merge pull request #574 from lowcoder-org/docker_build_update
FalkWolsky Dec 11, 2023
757d772
removed lowcoder-dev-utils
raheeliftikhar5 Dec 13, 2023
8130928
fix build issues
raheeliftikhar5 Dec 13, 2023
e9a75c0
Merge pull request #578 from raheeliftikhar5/remove-dev-utils
FalkWolsky Dec 13, 2023
3a74b79
remove create-lowcoder-plugin + version upgrade for publish
raheeliftikhar5 Dec 13, 2023
6170b11
Merge pull request #579 from raheeliftikhar5/publish-modules
FalkWolsky Dec 13, 2023
990ff84
Custom plugin publishing issues (#583)
raheeliftikhar5 Dec 14, 2023
ed99678
added hover and active color options in link styles (#585)
raheeliftikhar5 Dec 15, 2023
704e079
Merge branch 'main' into dev
ludomikula Dec 18, 2023
9b319cd
Try to rework oauth refresh token handling in reactive manner
aq-ikhwa-tech Dec 18, 2023
c95d040
Merge branch 'dev' into update-refresh-token-handling
aq-ikhwa-tech Dec 18, 2023
ff17063
upgrade antd version
raheeliftikhar5 Dec 19, 2023
afccd2b
Merge pull request #592 from raheeliftikhar5/upgade-antd-5.1.12
FalkWolsky Dec 19, 2023
d9983aa
Add api to fetch api usage data
aq-ikhwa-tech Dec 20, 2023
722af3c
Merge pull request #594 from lowcoder-org/add-api-usage-stats-api-call
FalkWolsky Dec 20, 2023
2b8addc
Merge branch 'dev' into update-refresh-token-handling
FalkWolsky Dec 20, 2023
dff2119
Merge pull request #589 from lowcoder-org/update-refresh-token-handling
FalkWolsky Dec 20, 2023
cb48221
Update for Chinese Language
Dec 20, 2023
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
added hover and active color options in link styles (#585)
  • Loading branch information
raheeliftikhar5 authored Dec 15, 2023
commit ed9967821fcc75e95cf835abdfeb7fe71ab8c234
13 changes: 12 additions & 1 deletion client/packages/lowcoder/src/comps/comps/buttonComp/linkComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@ import { EditorContext } from "comps/editorState";
import React, { useContext } from "react";

const Link = styled(Button)<{ $style: LinkStyleType }>`
${(props) => `color: ${props.$style.text}; margin: ${props.$style.margin}; padding: ${props.$style.padding}; font-size: ${props.$style.textSize};`}
${(props) => `
color: ${props.$style.text};
margin: ${props.$style.margin};
padding: ${props.$style.padding};
font-size: ${props.$style.textSize};
&:hover {
color: ${props.$style.hoverText} !important;
}
&:active {
color: ${props.$style.activeText} !important;
}
`}
&.ant-btn {
display: inline-flex;
align-items: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export class ColumnTypeCompBuilder<
private propertyViewFn?: PropertyViewFnTypeForComp<
RecordConstructorToComp<NewChildrenCtorMap<ChildrenCtorMap, T>>
>;
private stylePropertyViewFn?: PropertyViewFnTypeForComp<
RecordConstructorToComp<NewChildrenCtorMap<ChildrenCtorMap, T>>
>;
private editViewFn?: EditViewFn<T>;

constructor(
Expand Down Expand Up @@ -77,6 +80,15 @@ export class ColumnTypeCompBuilder<
return this;
}

setStylePropertyViewFn(
stylePropertyViewFn: PropertyViewFnTypeForComp<
RecordConstructorToComp<NewChildrenCtorMap<ChildrenCtorMap, T>>
>
) {
this.stylePropertyViewFn = stylePropertyViewFn;
return this;
}

build() {
if (!this.propertyViewFn) {
throw new Error("need property view fn");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ import { BoolCodeControl, StringControl } from "comps/controls/codeControl";
import { trans } from "i18n";
import { disabledPropertyView } from "comps/utils/propertyUtils";
import styled, { css } from "styled-components";
import { styleControl } from "comps/controls/styleControl";
import { TableColumnLinkStyle } from "comps/controls/styleControlConstants";

export const ColumnValueTooltip = trans("table.columnValueTooltip");

const childrenMap = {
text: StringControl,
onClick: ActionSelectorControlInContext,
disabled: BoolCodeControl,
style: styleControl(TableColumnLinkStyle),
};

const disableCss = css`
Expand Down Expand Up @@ -78,5 +81,10 @@ export const LinkComp = (function () {
})}
</>
))
.setStylePropertyViewFn((children) => (
<>
{children.style.getPropertyView()}
</>
))
.build();
})();
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import { ColorControl } from "comps/controls/colorControl";
import { JSONValue } from "util/jsonTypes";
import styled from "styled-components";
import { TextOverflowControl } from "comps/controls/textOverflowControl";
import { TableColumnLinkStyle, styleControl } from "@lowcoder-ee/index.sdk";
import { Divider } from "antd";

export type Render = ReturnType<ConstructorToComp<typeof RenderComp>["getOriginalComp"]>;
export const RenderComp = withSelectedMultiContext(ColumnTypeComp);
Expand Down Expand Up @@ -106,6 +108,9 @@ export const columnChildrenMap = {
textSize: withDefault(RadiusControl, ""),
cellColor: CellColorComp,
textOverflow: withDefault(TextOverflowControl, "ellipsis"),
linkColor: withDefault(ColorControl, "#3377ff"),
linkHoverColor: withDefault(ColorControl, ""),
linkActiveColor: withDefault(ColorControl, ""),
};

const StyledIcon = styled.span`
Expand Down Expand Up @@ -201,15 +206,36 @@ export class ColumnComp extends ColumnInitComp {
})}
{this.children.autoWidth.getView() === "fixed" &&
this.children.width.propertyView({ label: trans("prop.width") })}

{(columnType === 'link' || columnType === 'links') && (
<>
<Divider style={{margin: '12px 0'}} />
{controlItem({}, (
<div>
<b>{"Link Style"}</b>
</div>
))}
{this.children.linkColor.propertyView({
label: trans('text') // trans('style.background'),
})}
{this.children.linkHoverColor.propertyView({
label: "Hover text", // trans('style.background'),
})}
{this.children.linkActiveColor.propertyView({
label: "Active text", // trans('style.background'),
})}
</>
)}
<Divider style={{margin: '12px 0'}} />
{controlItem({}, (
<div style={{marginTop: '8px'}}>
<b>{"Style"}</b>
<div>
<b>{"Column Style"}</b>
</div>
))}
{this.children.background.propertyView({
label: trans('style.background'),
})}
{this.children.text.propertyView({
{columnType !== 'link' && this.children.text.propertyView({
label: trans('text'),
})}
{this.children.border.propertyView({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
defaultTheme,
handleToHoverRow,
handleToSelectedRow,
TableColumnLinkStyleType,
TableColumnStyleType,
TableRowStyleType,
TableStyleType,
Expand Down Expand Up @@ -285,6 +286,7 @@ const TableTh = styled.th<{ width?: number }>`
const TableTd = styled.td<{
background: string;
$style: TableColumnStyleType & {rowHeight?: string};
$linkStyle?: TableColumnLinkStyleType;
$isEditing: boolean;
$tableSize?: string;
$autoHeight?: boolean;
Expand Down Expand Up @@ -345,11 +347,15 @@ const TableTd = styled.td<{

// dark link|links color
> a,
> div > a {
color: ${(props) => isDarkColor(props.background) && "#A6FFFF"};
> div a {
color: ${(props) => props.$linkStyle?.text};

&:hover {
color: ${(props) => isDarkColor(props.background) && "#2EE6E6"};
color: ${(props) => props.$linkStyle?.hoverText};
}

&:active {
color: ${(props) => props.$linkStyle?.activeText}};
}
}
}
Expand Down Expand Up @@ -431,6 +437,7 @@ function TableCellView(props: {
children: any;
columnsStyle: TableColumnStyleType;
columnStyle: TableColumnStyleType;
linkStyle: TableColumnLinkStyleType;
tableSize?: string;
autoHeight?: boolean;
}) {
Expand All @@ -444,6 +451,7 @@ function TableCellView(props: {
children,
columnsStyle,
columnStyle,
linkStyle,
tableSize,
autoHeight,
...restProps
Expand Down Expand Up @@ -492,6 +500,7 @@ function TableCellView(props: {
{...restProps}
background={background}
$style={style}
$linkStyle={linkStyle}
$isEditing={editing}
$tableSize={tableSize}
$autoHeight={autoHeight}
Expand Down Expand Up @@ -535,7 +544,7 @@ function ResizeableTable<RecordType extends object>(props: CustomTableProps<Reco
});
let allColumnFixed = true;
const columns = props.columns.map((col, index) => {
const { width, style, cellColorFn, ...restCol } = col;
const { width, style, linkStyle, cellColorFn, ...restCol } = col;
const resizeWidth = (resizeData.index === index ? resizeData.width : col.width) ?? 0;
let colWidth: number | string = "auto";
let minWidth: number | string = COL_MIN_WIDTH;
Expand Down Expand Up @@ -567,6 +576,7 @@ function ResizeableTable<RecordType extends object>(props: CustomTableProps<Reco
rowIndex: rowIndex,
columnsStyle: props.columnsStyle,
columnStyle: style,
linkStyle,
tableSize: props.size,
autoHeight: props.rowAutoHeight,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { tryToNumber } from "util/convertUtils";
import { JSONObject, JSONValue } from "util/jsonTypes";
import { StatusType } from "./column/columnTypeComps/columnStatusComp";
import { ColumnListComp, tableDataRowExample } from "./column/tableColumnListComp";
import { TableColumnStyleType } from "comps/controls/styleControlConstants";
import { TableColumnLinkStyleType, TableColumnStyleType } from "comps/controls/styleControlConstants";

export const COLUMN_CHILDREN_KEY = "children";
export const OB_ROW_ORI_INDEX = "__ob_origin_index";
Expand Down Expand Up @@ -254,6 +254,7 @@ export type CustomColumnType<RecordType> = ColumnType<RecordType> & {
onWidthResize?: (width: number) => void;
titleText: string;
style: TableColumnStyleType;
linkStyle: TableColumnLinkStyleType;
cellColorFn: CellColorViewType;
};

Expand Down Expand Up @@ -324,6 +325,11 @@ export function columnsToAntdFormat(
textSize: column.textSize,
borderWidth: column.borderWidth,
},
linkStyle: {
text: column.linkColor,
hoverText: column.linkHoverColor,
activeText: column.linkActiveColor,
},
cellColorFn: column.cellColor,
onWidthResize: column.onWidthResize,
render: (value: any, record: RecordType, index: number) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,28 @@ export const SegmentStyle = [
PADDING,
] as const;

const LinkTextStyle = [
{
name: "text",
label: trans("text"),
depTheme: "primary",
depType: DEP_TYPE.SELF,
transformer: toSelf,
},
{
name: "hoverText",
label: "Hover text", // trans("style.hoverRowBackground"),
depName: "text",
transformer: handleToHoverLink,
},
{
name: "activeText",
label: "Active text", // trans("style.hoverRowBackground"),
depName: "text",
transformer: handleToHoverLink,
},
] as const;

export const TableStyle = [
...BG_STATIC_BORDER_RADIUS,
{
Expand Down Expand Up @@ -724,6 +746,10 @@ export const TableColumnStyle = [
TEXT_SIZE,
] as const;

export const TableColumnLinkStyle = [
...LinkTextStyle,
] as const;

export const FileStyle = [...getStaticBgBorderRadiusByBg(SURFACE_COLOR), TEXT, ACCENT, MARGIN, PADDING] as const;

export const FileViewerStyle = [
Expand All @@ -746,14 +772,16 @@ export const DateTimeStyle = [
...ACCENT_VALIDATE,
] as const;

function handleToHoverLink(color: string) {
if (isDarkColor(color)) {
return "#FFFFFF23";
} else {
return "#00000007";
}
}

export const LinkStyle = [
{
name: "text",
label: trans("text"),
depTheme: "primary",
depType: DEP_TYPE.SELF,
transformer: toSelf,
},
...LinkTextStyle,
MARGIN,
PADDING,
TEXT_SIZE
Expand Down Expand Up @@ -1047,6 +1075,7 @@ export type SegmentStyleType = StyleConfigType<typeof SegmentStyle>;
export type TableStyleType = StyleConfigType<typeof TableStyle>;
export type TableRowStyleType = StyleConfigType<typeof TableRowStyle>;
export type TableColumnStyleType = StyleConfigType<typeof TableColumnStyle>;
export type TableColumnLinkStyleType = StyleConfigType<typeof TableColumnLinkStyle>;
export type FileStyleType = StyleConfigType<typeof FileStyle>;
export type FileViewerStyleType = StyleConfigType<typeof FileViewerStyle>;
export type IframeStyleType = StyleConfigType<typeof IframeStyle>;
Expand Down