Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
986570b
Add s3 support for generate CRUD
Jul 29, 2021
258bfd8
Refactor the prop name
Jul 30, 2021
71ed2d1
Dropdown enchancement & Fix small issues
Jul 30, 2021
b287d2b
Add fetch all sheets query
Aug 2, 2021
cfda491
Merge branch 'feature/add-s3-crud-support' into feature/add-gsheets-g…
Aug 3, 2021
4b2300f
Merge branch 'release' into feature/add-gsheets-gen-crud-page
Aug 4, 2021
2543b25
Fix issues related to dropdown
Aug 4, 2021
12344a6
Add hooks to fetch sheets and spreadsheets
Aug 4, 2021
2a85b26
Resolve warnings
Aug 5, 2021
78b1ddd
complete gheets basic support
Aug 5, 2021
b8ae239
Merge branch 'release' into feature/add-gsheets-gen-crud-page
Aug 6, 2021
6ae0aee
Add UI changes for Gsheet column names
Aug 9, 2021
b1cc845
Add debounce to avoid to many API calls
Aug 9, 2021
9ba66ab
Add request object formation via plugin config
Aug 10, 2021
29734eb
Resolve comments & remove executingDatasourceQuery
Aug 11, 2021
6a32338
Merge branch 'release' into feature/add-gsheets-gen-crud-page
Aug 11, 2021
c50f4f3
Send sheetName in the tableName key.
Aug 11, 2021
c4e9b68
Add loader and Column name UI Fix
Aug 12, 2021
4867e63
Add Column Headers Label
Aug 12, 2021
4872390
Merge branch 'release' into feature/add-gsheets-gen-crud-page
Aug 12, 2021
0202d71
Fix logic to show comma separator btn column names
Aug 14, 2021
f537441
Add tooltip info for searchable column
Aug 17, 2021
f591951
Add value prop to TextInput
Aug 17, 2021
40f3ddd
Hotfix validator logic
Aug 17, 2021
48b30db
Merge branch 'release' into feature/add-gsheets-gen-crud-page
Aug 20, 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
3 changes: 0 additions & 3 deletions app/client/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,6 @@ Cypress.Commands.add("CreationOfUniqueAPIcheck", (apiname) => {
.type(apiname, { force: true, delay: 500 })
.should("have.value", apiname);
cy.get(".error-message").should(($x) => {
console.log($x);
expect($x).contain(apiname.concat(" is already being used."));
});
cy.get(apiwidget.apiTxt).blur();
Expand Down Expand Up @@ -1022,14 +1021,12 @@ Cypress.Commands.add("CreateApiAndValidateUniqueEntityName", (apiname) => {
.type(apiname, { force: true })
.should("have.value", apiname);
cy.get(".t--nameOfApi .error-message").should(($x) => {
console.log($x);
expect($x).contain(apiname.concat(" is already being used."));
});
});

Cypress.Commands.add("validateMessage", (value) => {
cy.get(".bp3-popover-content").should(($x) => {
console.log($x);
expect($x).contain(value.concat(" is already being used."));
});
});
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/actions/datasourceActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export type executeDatasourceQuerySuccessPayload<T> = {
isExecutionSuccess: boolean;
};
};
type errorPayload = unknown;
type errorPayload = string;

export type executeDatasourceQueryReduxAction<T> = ReduxActionWithCallbacks<
executeDatasourceQueryRequest,
Expand Down
2 changes: 2 additions & 0 deletions app/client/src/actions/pageActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ export const generateTemplateToUpdatePage = ({
datasourceId,
mode,
pageId,
pluginSpecificParams,
searchColumn,
tableName,
}: GenerateTemplatePageRequest): ReduxActionWithExtraParams<GenerateTemplatePageRequest> => {
Expand All @@ -365,6 +366,7 @@ export const generateTemplateToUpdatePage = ({
applicationId,
columns,
searchColumn,
pluginSpecificParams,
},
extraParams: {
mode,
Expand Down
1 change: 1 addition & 0 deletions app/client/src/api/PageApi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export interface GenerateTemplatePageRequest {
columns?: string[];
searchColumn?: string;
mode?: string;
pluginSpecificParams?: Record<any, any>;
}

export type GenerateTemplatePageRequestResponse = ApiResponse & {
Expand Down
31 changes: 20 additions & 11 deletions app/client/src/components/ads/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ export interface RenderDropdownOptionType {
optionClickHandler?: (dropdownOption: DropdownOption) => void;
}

export const DropdownContainer = styled.div<{ width: string; height: string }>`
export const DropdownContainer = styled.div<{ width: string }>`
width: ${(props) => props.width};
height: ${(props) => props.height};
position: relative;
`;

Expand Down Expand Up @@ -113,6 +112,7 @@ const Selected = styled.div<{
height: string;
bgColor?: string;
hasError?: boolean;
isLoading?: boolean;
}>`
padding: ${(props) => props.theme.spaces[2]}px
${(props) => props.theme.spaces[3]}px;
Expand All @@ -132,7 +132,8 @@ const Selected = styled.div<{
justify-content: space-between;
width: 100%;
height: ${(props) => props.height};
cursor: pointer;
cursor: ${(props) =>
props.disabled || props.isLoading ? "not-allowed" : "pointer"};
${(props) =>
props.isOpen
? `border: 1px solid ${
Expand Down Expand Up @@ -310,7 +311,7 @@ const SelectedIcon = styled(Icon)`
const ErrorMsg = styled.span`
${(props) => getTypographyByKey(props, "p3")};
color: ${Colors.POMEGRANATE2};
margin-top: 8px;
margin-top: ${(props) => props.theme.spaces[3]}px;
`;

const ErrorLabel = styled.span`
Expand All @@ -321,7 +322,7 @@ const ErrorLabel = styled.span`
const HelperText = styled.span`
${(props) => getTypographyByKey(props, "p3")};
color: ${Colors.GRAY};
margin-top: 8px;
margin-top: ${(props) => props.theme.spaces[3]}px;
`;

function DefaultDropDownValueNode({
Expand Down Expand Up @@ -491,12 +492,20 @@ export default function Dropdown(props: DropdownProps) {
const disabled = props.disabled || isLoading || !!errorMsg;
const downIconColor = errorMsg ? Colors.POMEGRANATE2 : Colors.DARK_GRAY;

const dropdownHeight = props.height ? props.height : "38px";

const onClickHandler = () => {
if (!props.disabled) {
setIsOpen(!isOpen);
}
};

const dropdownTrigger = props.dropdownTriggerIcon ? (
<DropdownTriggerWrapper
disabled={props.disabled}
height={props.height || "38px"}
height={dropdownHeight}
isOpen={isOpen}
onClick={() => setIsOpen(!isOpen)}
onClick={onClickHandler}
>
{props.dropdownTriggerIcon}
</DropdownTriggerWrapper>
Expand All @@ -507,9 +516,10 @@ export default function Dropdown(props: DropdownProps) {
className={props.className}
disabled={props.disabled}
hasError={!!errorMsg}
height={props.height || "38px"}
height={dropdownHeight}
isLoading={isLoading}
isOpen={isOpen}
onClick={() => setIsOpen(!isOpen)}
onClick={onClickHandler}
>
<SelectedValueNode
errorMsg={errorMsg}
Expand Down Expand Up @@ -540,15 +550,14 @@ export default function Dropdown(props: DropdownProps) {
<DropdownContainer
className={props.containerClassName}
data-cy={props.cypressSelector}
height={props.height || "38px"}
tabIndex={0}
width={props.width || "260px"}
>
<Popover
boundary="scrollParent"
isOpen={isOpen && !disabled}
minimal
onInteraction={(state) => setIsOpen(state)}
onInteraction={(state) => !disabled && setIsOpen(state)}
popoverClassName={props.className}
position={Position.BOTTOM_LEFT}
>
Expand Down
1 change: 1 addition & 0 deletions app/client/src/components/ads/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export type TextInputProps = CommonComponentProps & {
placeholder?: string;
fill?: boolean;
defaultValue?: string;
value?: string;
validator?: (value: string) => { isValid: boolean; message: string };
onChange?: (value: string) => void;
readOnly?: boolean;
Expand Down
Loading