Skip to content

Commit

Permalink
chore: Fixing the top padding for queries and JS empty state to match…
Browse files Browse the repository at this point in the history
… UI segment empty state (#38365)

## Description

Fixing the top padding for queries and JS empty state to match UI
segment empty state

Fixes [#38364](#38364)

## Automation

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

### 🔍 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/12492225163>
> Commit: 7be7180
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12492225163&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.IDE`
> Spec:
> <hr>Wed, 25 Dec 2024 11:07:53 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 conditional rendering of the `BlankState` component to
indicate when there are no items to display.
- Added a `NoSearchResults` component for clearer feedback when searches
yield no results.
- **Bug Fixes**
- Removed redundant rendering of the `BlankState` component to
streamline the user interface.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
ankitakinger authored Dec 25, 2024
1 parent 1be746c commit 0605501
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/client/src/pages/Editor/IDE/EditorPane/JS/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ const ListJSObjects = () => {
px="spaces-3"
py="spaces-3"
>
{(!itemGroups || itemGroups.length === 0) && <BlankState />}

{itemGroups && itemGroups.length > 0 ? (
<SearchAndAdd
onAdd={openAddJS}
Expand Down Expand Up @@ -119,8 +121,6 @@ const ListJSObjects = () => {
) : null}
</Flex>
</FilesContextProvider>

{(!itemGroups || itemGroups.length === 0) && <BlankState />}
</JSContainer>
);
};
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/pages/Editor/IDE/EditorPane/Query/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ const ListQuery = () => {
px="spaces-3"
py="spaces-3"
>
{Object.keys(itemGroups).length === 0 && <BlankState />}

{itemGroups.length > 0 ? (
<SearchAndAdd
onAdd={openAddQuery}
Expand Down Expand Up @@ -102,8 +104,6 @@ const ListQuery = () => {
/>
) : null}
</Flex>

{Object.keys(itemGroups).length === 0 && <BlankState />}
</Flex>
);
};
Expand Down

0 comments on commit 0605501

Please sign in to comment.