Skip to content

Commit

Permalink
Release Platform v17 (v2.39.0) (#9502)
Browse files Browse the repository at this point in the history
* bump version

* Sample data source (#9501)

* Added sample data populating script

* added expand-collapse  in add data soure menu

* Sample database

* Design changes

* Added CTA to buttons and added design changes

* Added code sanity fix for some services

* changed configration for create sampke db and code sanity fix

* Removed logs

* Added xlsx in dependency

* added migration for sample db

* Added loggin for testing

* Added await in migration

* Replace excel sheet with JSON files

* reverted package-lock file

* Fixed issues

* dependecy deletion

* Added schedular

* Added changes for bug fixes and typeorm query for creating sample db

* Removed color.scss file import

* Add logo in sample application

* add documentation link for sample db

* fixed migration issue for data queries creation

* removed sample db intergration

* bump version

* Remove .env file and code sanity

* deleted migration file

---------

Co-authored-by: Kritagya <[email protected]>
Co-authored-by: Kritagya Kumar <[email protected]>
Co-authored-by: kriks7raptor <[email protected]>
Co-authored-by: gsmithun4 <[email protected]>

* Add data-cy for drag drop empty canvas card (#9513)

* Add sample db condition on all components (#9516)

* Add sample db condition on all components

* Changed empty state for container

* Condiiton on sample data source

---------

Co-authored-by: kriks7raptor <[email protected]>

* Release fix: subpath (#9535)

* Add sample db condition on all components

* Changed empty state for container

* Condiiton on sample data source

* fixed subpath issue for workspace setting and folders

* Folder change handler in subpath

---------

Co-authored-by: kriks7raptor <[email protected]>

* fixed version

* fixed version

* fixed version

* update server version

* Bump version to v2.39.0

---------

Co-authored-by: kriks7iitk <[email protected]>
Co-authored-by: Kritagya <[email protected]>
Co-authored-by: Kritagya Kumar <[email protected]>
Co-authored-by: kriks7raptor <[email protected]>
Co-authored-by: Ajith KV <[email protected]>
Co-authored-by: kriks7iitk <[email protected]>
Co-authored-by: Adish M <[email protected]>
Co-authored-by: Muhsin Shah <[email protected]>
  • Loading branch information
9 people committed Apr 30, 2024
1 parent 4fd5666 commit eef2a49
Show file tree
Hide file tree
Showing 61 changed files with 2,670 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.38.0
2.39.0
2 changes: 1 addition & 1 deletion frontend/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.38.0
2.39.0
Binary file added frontend/assets/images/Sample data source.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"paths": {
"@/*": [
"./*"
]
]
}
}
}
98 changes: 83 additions & 15 deletions frontend/src/Editor/Container.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ItemTypes } from './ItemTypes';
import { DraggableBox } from './DraggableBox';
import update from 'immutability-helper';
import { componentTypes } from './WidgetManager/components';
import { resolveReferences } from '@/_helpers/utils';
import { resolveReferences, getWorkspaceId } from '@/_helpers/utils';
import Comments from './Comments';
import { commentsService } from '@/_services';
import config from 'config';
Expand All @@ -19,11 +19,18 @@ import { useAppVersionStore } from '@/_stores/appVersionStore';
import { useEditorStore } from '@/_stores/editorStore';
import { useAppInfo } from '@/_stores/appDataStore';
import { shallow } from 'zustand/shallow';
import { useDataQueriesActions } from '@/_stores/dataQueriesStore';
import { useQueryPanelActions } from '@/_stores/queryPanelStore';
import { useSampleDataSource } from '@/_stores/dataSourcesStore';
import _ from 'lodash';
// eslint-disable-next-line import/no-unresolved
import { diff } from 'deep-object-diff';
import './editor.theme.scss';
import SolidIcon from '@/_ui/Icon/SolidIcons';
import BulkIcon from '@/_ui/Icon/BulkIcons';
import { isPDFSupported } from '@/_stores/utils';
import toast from 'react-hot-toast';
import { getSubpath } from '@/_helpers/routes';

const NO_OF_GRIDS = 43;

Expand Down Expand Up @@ -51,6 +58,9 @@ export const Container = ({
}) => {
// Dont update first time to skip
// redundant save on app definition load
const { createDataQuery } = useDataQueriesActions();
const { setPreviewData } = useQueryPanelActions();
const sampleDataSource = useSampleDataSource();
const firstUpdate = useRef(true);

const { showComments, currentLayout } = useEditorStore(
Expand Down Expand Up @@ -564,6 +574,22 @@ export const Container = ({
[setIsResizing]
);

const openAddUserWorkspaceSetting = () => {
const workspaceId = getWorkspaceId();
const subPath = getSubpath();
const path = subPath
? `${subPath}/${workspaceId}/workspace-settings?adduser=true`
: `/${workspaceId}/workspace-settings?adduser=true`;
window.open(path, '_blank');
};

const handleConnectSampleDB = () => {
const source = sampleDataSource;
const query = `SELECT tablename \nFROM pg_catalog.pg_tables \nWHERE schemaname='public';`;
createDataQuery(source, true, { query });
setPreviewData(null);
};

const draggingStatusChanged = useCallback(
(status) => {
setIsDragging(status);
Expand Down Expand Up @@ -614,6 +640,10 @@ export const Container = ({
childComponents,
]);

const queryBoxText = sampleDataSource
? 'Connect to your data source or use our sample data source to start playing around!'
: 'Connect to a data source to be able to create a query';

return (
<div
{...(config.COMMENT_FEATURE_ENABLE && showComments && { onClick: handleAddThread })}
Expand Down Expand Up @@ -695,20 +725,58 @@ export const Container = ({
})}
{Object.keys(boxes).length === 0 && !appLoading && !isDragging && (
<div style={{ paddingTop: '10%' }}>
<div className="mx-auto w-50 p-5 bg-light no-components-box">
<center className="text-muted" data-cy={`empty-editor-text`}>
You haven&apos;t added any components yet. Drag components from the right sidebar and drop here. Check out
our&nbsp;
<a
className="color-indigo9 "
href="https://docs.tooljet.com/docs/#quickstart-guide"
target="_blank"
rel="noreferrer"
>
guide
</a>{' '}
on adding components.
</center>
<div className="row empty-box-cont">
<div className="col-md-4 dotted-cont">
<div className="box-icon">
<BulkIcon name="addtemplate" width="25" viewBox="0 0 28 28" />
</div>
<div className={`title-text`} data-cy="empty-editor-text">
Drag and drop a component
</div>
<div className="title-desc">
Choose a component from the right side panel or use our pre-built templates to get started quickly!
</div>
</div>
<div className="col-md-4 dotted-cont">
<div className="box-icon">
<SolidIcon name="datasource" fill="#3E63DD" width="25" />
</div>
<div className={`title-text`}>Create a Query</div>
<div className="title-desc">{queryBoxText}</div>
{!!sampleDataSource && (
<div className="box-link">
<div className="child">
<a className="link-but" onClick={handleConnectSampleDB}>
Connect to sample data source{' '}
</a>
</div>

<div>
<BulkIcon name="arrowright" fill="#3E63DD" />
</div>
</div>
)}
</div>

<div className="col-md-4 dotted-cont">
<div className="box-icon">
<BulkIcon name="invitecollab" width="25" viewBox="0 0 28 28" />
</div>
<div className={`title-text `}>Share your application!</div>
<div className="title-desc">
Invite users to collaborate in real-time with multiplayer editing and comments for seamless development.
</div>
<div className="box-link">
<div className="child">
<a className="link-but" onClick={openAddUserWorkspaceSetting}>
Invite collaborators{' '}
</a>
</div>
<div>
<BulkIcon name="arrowright" fill="#3E63DD" />
</div>
</div>
</div>
</div>
</div>
)}
Expand Down

0 comments on commit eef2a49

Please sign in to comment.