Skip to content

Commit

Permalink
fix: Query Editor Routing in the redesign flow (#37411)
Browse files Browse the repository at this point in the history
## Description

Fixes the order of routes which caused issues in the redesign flow


## Automation

/ok-to-test tags="@tag.Datasource"

### 🔍 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/11855933830>
> Commit: db5e105
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11855933830&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Datasource`
> Spec:
> <hr>Fri, 15 Nov 2024 12:53:11 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new component for adding queries, enhancing the query
management experience.
- Improved loading experience with a `Skeleton` display while the
`AddQuery` component is being loaded.

- **Bug Fixes**
- Adjusted routing logic for query operations based on feature flags for
better performance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
hetunandu authored Nov 16, 2024
1 parent 5db7890 commit 952fb93
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/client/src/ce/pages/Editor/IDE/EditorPane/Query/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@ export const useQueryEditorRoutes = (path: string): UseRoutes => {

const newComponents = useMemo(
() => [
{
key: "AddQuery",
exact: true,
component: () => (
<Suspense fallback={skeleton}>
<AddQuery />
</Suspense>
),
path: [`${path}${ADD_PATH}`, `${path}/:baseQueryId${ADD_PATH}`],
},
{
key: "PluginActionEditor",
component: () => {
Expand All @@ -180,16 +190,6 @@ export const useQueryEditorRoutes = (path: string): UseRoutes => {
],
exact: true,
},
{
key: "AddQuery",
exact: true,
component: () => (
<Suspense fallback={skeleton}>
<AddQuery />
</Suspense>
),
path: [`${path}${ADD_PATH}`, `${path}/:baseQueryId${ADD_PATH}`],
},
{
key: "QueryEmpty",
component: () => (
Expand Down

0 comments on commit 952fb93

Please sign in to comment.