-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Updated schema tab as per new design. https://www.figma.com/design/8L9BXMzNTKboGWlHpdXyYP/Appsmith-IDE?node-id=3071-101845&node-type=text&m=dev Fixes #35289 ## Automation /ok-to-test tags="@tag.Sanity" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/12022221992> > Commit: c38fc99 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12022221992&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Sanity` > Spec: > <hr>Tue, 26 Nov 2024 03:45:12 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced new components: `CurrentDataSource`, `DatasourceSelector`, `SchemaTables`, `TableColumns`, `StatusDisplay`, `CurrentDataSourceLink`, `Schema`, `MenuField`, and custom hooks `useCreateDatasource` and `useGoToDatasource`. - Added constants for improved user feedback in schema-related messages. - **Improvements** - Enhanced layout and styling for various components, including `BottomView` and `Schema`. - Updated test identifiers for better consistency and testability. - **Bug Fixes** - Adjusted test cases to ensure accurate schema validation. - **Refactor** - Updated internal logic for handling datasource interactions and state management across components. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
1 parent
d0fc6d7
commit b778d2c
Showing
26 changed files
with
967 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
210 changes: 0 additions & 210 deletions
210
app/client/src/PluginActionEditor/components/PluginActionResponse/components/Schema.tsx
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
...luginActionEditor/components/PluginActionResponse/components/Schema/CurrentDataSource.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from "react"; | ||
import { Flex } from "@appsmith/ads"; | ||
import { getAssetUrl } from "ee/utils/airgapHelpers"; | ||
import { EntityIcon } from "pages/Editor/Explorer/ExplorerIcons"; | ||
import { useSelector } from "react-redux"; | ||
import { | ||
getPluginIdFromDatasourceId, | ||
getPluginImages, | ||
} from "ee/selectors/entitiesSelector"; | ||
|
||
interface Props { | ||
datasourceId: string; | ||
datasourceName: string; | ||
} | ||
|
||
const CurrentDataSource = ({ datasourceId, datasourceName }: Props) => { | ||
const { pluginId, pluginImages } = useSelector((state) => ({ | ||
pluginId: getPluginIdFromDatasourceId(state, datasourceId), | ||
pluginImages: getPluginImages(state), | ||
})); | ||
|
||
const datasourceIcon = pluginId ? pluginImages?.[pluginId] : undefined; | ||
|
||
return ( | ||
<Flex alignItems="center" gap="spaces-2"> | ||
<EntityIcon height="16px" width="16px"> | ||
<img alt="entityIcon" src={getAssetUrl(datasourceIcon)} /> | ||
</EntityIcon> | ||
{datasourceName} | ||
</Flex> | ||
); | ||
}; | ||
|
||
export { CurrentDataSource }; |
30 changes: 30 additions & 0 deletions
30
...nActionEditor/components/PluginActionResponse/components/Schema/CurrentDataSourceLink.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React, { useCallback } from "react"; | ||
import { Link } from "@appsmith/ads"; | ||
import { CurrentDataSource } from "./CurrentDataSource"; | ||
import { useGoToDatasource } from "PluginActionEditor/components/PluginActionResponse/hooks/useGoToDatasource"; | ||
|
||
const CurrentDataSourceLink = ({ | ||
datasourceId, | ||
datasourceName, | ||
}: { | ||
datasourceId: string; | ||
datasourceName: string; | ||
}) => { | ||
const { goToDatasource } = useGoToDatasource(); | ||
|
||
const handleClick = useCallback( | ||
() => goToDatasource(datasourceId), | ||
[datasourceId, goToDatasource], | ||
); | ||
|
||
return ( | ||
<Link onClick={handleClick}> | ||
<CurrentDataSource | ||
datasourceId={datasourceId} | ||
datasourceName={datasourceName} | ||
/> | ||
</Link> | ||
); | ||
}; | ||
|
||
export { CurrentDataSourceLink }; |
Oops, something went wrong.