Skip to content

fix: remove app list filter empty state on clear search#3080

Merged
AbhishekA1509 merged 1 commit into
mainfrom
fix/app-list-empty-filter
Mar 24, 2026
Merged

fix: remove app list filter empty state on clear search#3080
AbhishekA1509 merged 1 commit into
mainfrom
fix/app-list-empty-filter

Conversation

@AbhishekA1509

@AbhishekA1509 AbhishekA1509 commented Mar 24, 2026

Copy link
Copy Markdown
Member

Description

This pull request refactors how the "Create your first application" guided cards are rendered in the DevtronAppListContainer component. The main change is to move the guided cards logic into a new ViewWrapper component, which is then passed to the Table component for more modular and maintainable code. Additionally, the TableAdditionalPropsType interface is updated to include noRows and isSearchOrFilterApplied props, ensuring correct prop passing and type safety.

Component Refactoring and UI Behavior:

  • Introduced a new ViewWrapper component in DevtronAppListContainer.tsx that renders the guided cards when there are no rows and no filters/search applied, improving code modularity and separation of concerns. ([src/components/app/list/DevtronAppListContainer.tsxR77-R119](https://github.com/devtron-labs/dashboard/pull/3080/files#diff-5c086a7526148fa67d8f4c2a587a1fdc083a991b2a3ac52a2bc75d01617ec1afR77-R119))
  • Removed the inline renderGuidedCards function from DevtronAppList and refactored its logic into the new ViewWrapper. The guided cards are now rendered via ViewWrapper instead of directly in the main render function. ([[1]](https://github.com/devtron-labs/dashboard/pull/3080/files#diff-5c086a7526148fa67d8f4c2a587a1fdc083a991b2a3ac52a2bc75d01617ec1afL109-L138), [[2]](https://github.com/devtron-labs/dashboard/pull/3080/files#diff-5c086a7526148fa67d8f4c2a587a1fdc083a991b2a3ac52a2bc75d01617ec1afL194-L197), [[3]](https://github.com/devtron-labs/dashboard/pull/3080/files#diff-5c086a7526148fa67d8f4c2a587a1fdc083a991b2a3ac52a2bc75d01617ec1afR240))

Type and Prop Updates:

  • Updated the TableAdditionalPropsType interface in types.tsx to include noRows and isSearchOrFilterApplied properties, ensuring these props are available for the new wrapper logic. ([src/components/app/list/types.tsxL107-R110](https://github.com/devtron-labs/dashboard/pull/3080/files#diff-15d87e95aa4404cf61de423b940d066121ad3e9ce8b2eee1c1da90268183d4c3L107-R110))
  • Passed noRows and isSearchOrFilterApplied as part of additionalProps to the Table component, supporting the new wrapper behavior. ([src/components/app/list/DevtronAppListContainer.tsxR221-R222](https://github.com/devtron-labs/dashboard/pull/3080/files#diff-5c086a7526148fa67d8f4c2a587a1fdc083a991b2a3ac52a2bc75d01617ec1afR221-R222))

Dependency Updates:

  • Added TableViewWrapperProps to the imports from @devtron-labs/devtron-fe-common-lib to support the new ViewWrapper component. ([src/components/app/list/DevtronAppListContainer.tsxR30](https://github.com/devtron-labs/dashboard/pull/3080/files#diff-5c086a7526148fa67d8f4c2a587a1fdc083a991b2a3ac52a2bc75d01617ec1afR30))

Fixes https://github.com/devtron-labs/sprint-tasks/issues/2857

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@AbhishekA1509 AbhishekA1509 self-assigned this Mar 24, 2026
Copilot AI review requested due to automatic review settings March 24, 2026 07:38
@github-actions

Copy link
Copy Markdown

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

@sonarqubecloud

Copy link
Copy Markdown

@github-actions github-actions Bot added PR:Ready-to-Review PR:Ready-to-Review and removed PR:Issue-verification-failed PR:Issue-verification-failed labels Mar 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the Devtron app list empty-state behavior by moving the “Create your first application” guided cards rendering behind the Table’s ViewWrapper, so the guided cards are shown only when there are no rows and no search/filters are applied.

Changes:

  • Added a ViewWrapper in DevtronAppListContainer to render guided cards when noRows && !isSearchOrFilterApplied.
  • Updated TableAdditionalPropsType to include noRows and isSearchOrFilterApplied and passed them via additionalProps.
  • Wired ViewWrapper into the Table via the ViewWrapper prop and imported TableViewWrapperProps.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/components/app/list/types.tsx Extends TableAdditionalPropsType to include noRows and isSearchOrFilterApplied for wrapper logic/type-safety.
src/components/app/list/DevtronAppListContainer.tsx Introduces ViewWrapper + guided cards rendering and passes required props into Table’s additionalProps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/app/list/DevtronAppListContainer.tsx
@AbhishekA1509 AbhishekA1509 merged commit 237a28c into main Mar 24, 2026
15 of 16 checks passed
@AbhishekA1509 AbhishekA1509 deleted the fix/app-list-empty-filter branch March 24, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR:Ready-to-Review PR:Ready-to-Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants