Skip to content

Conversation

@aarya-16
Copy link

@aarya-16 aarya-16 commented Oct 10, 2025

Description

Overview

Replaced three duplicate empty state components (DestinationEmptyState, SourceEmptyState, JobEmptyState) with a single reusable EmptyState component, while preserving existing functionality and visual styling.

File Changes

New Files Added

ui/src/modules/common/components/EmptyState.tsx

  • Generic empty state component with configuration-driven rendering
  • Handles asset mapping, icon mapping, and HTML content support

ui/src/utils/emptyStateConfigs.ts

  • Configuration objects for destination, source, and job empty states
  • Contains styling, content, and asset paths for each variant

Files Modified

ui/src/types/commonTypes.ts

  • Added EmptyStateConfig and EmptyStateProps interfaces for TypeScript support

ui/src/modules/destinations/components/DestinationEmptyState.tsx

  • Now uses generic EmptyState component with destination configuration

ui/src/modules/sources/components/SourceEmptyState.tsx

  • Now uses generic EmptyState component with source configuration

ui/src/modules/jobs/components/JobEmptyState.tsx

  • Now uses generic EmptyState component with job configuration

fixes #220

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Ran pre-commit checks
  • Ensure UI remains consistent before and after refactoring and adding the changes

Related PR's (If Any):

@CLAassistant
Copy link

CLAassistant commented Oct 10, 2025

CLA assistant check
All committers have signed the CLA.

@aarya-16
Copy link
Author

@tarakaswathi-datazip please review this PR, and let me know if any changes are necessary.

@Akshay-datazip
Copy link
Collaborator

hey thanks a lot for your contribution @aarya-16 can you also go ahead and share the pr on our slack in contribute-to-olake channel?
Would help our devs to expedite
regards
https://join.slack.com/t/getolake/

tarakaswathi-datazip and others added 2 commits October 17, 2025 18:11
* test: ✅ base setup for automation testing using playwright , add test cases fro major flows

* fix: integration workflow changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* test: add postgres flow

* fix: lint changes

* test: add iceberg specific test

* fix: tests

* fix: stream name

* fix: test fix

* fix: test fix

* fix: test fix

* fix: test fix

* fix: changes

* fix: ci changes

* fix: ci changes

* fix: ci changes

* test: fail test on test connection failure

* fix: ci changes

* fix: changes

* fix: changes

* fix: changes

* fix: changes

* fix: changes

* fix: changes

* fix: test fix

* fix: changes

* fix: changes

* fix: test-data fix

* fix: test-data fix

* fix: changes

* fix: changes

* fix: changes

* fix: host and port changes

* fix: changes

* fix: change

* test: login test updated

* test: refactor create source and destination page

* test: refactor tests

* fix: test fix

* fix: changes

* fix: fix changes

* fix: changes

* fix: changes

* fix: review changes

* refactor: refactor tests to use authenticated state of playwright

* fix: changes

* docs: update tests readme

* test: intercept and log destination spec response

* docs: update readme

* fix: update timeouts for playwright tests

* test: update readme

* fix: add retries in playwright config

* test: fix timeout duration

* fix: update readme

* test: add connector data test-id

* fix: resolve comments

* refactor(test): make and use enums instead of strings

* fix: fix test data builder

* fix: test data job name

* fix: add todo

---------

Co-authored-by: Duke Dhal <[email protected]>
Co-authored-by: deepanshupal09-datazip <[email protected]>
@deepanshupal09-datazip
Copy link
Collaborator

deepanshupal09-datazip commented Oct 23, 2025

Hi @aarya-16, have you tested your changes? can you share screenshot of your changes made?
Thanks

Copy link
Collaborator

Choose a reason for hiding this comment

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

The goal of this issue was to consolidate all Empty State components into a single shared one
Please remove this component and use the common EmptyState.tsx instead

Copy link
Collaborator

Choose a reason for hiding this comment

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

same for this

Copy link
Collaborator

Choose a reason for hiding this comment

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

and this too

Comment on lines 83 to 107
export interface EmptyStateConfig {
image: string
welcomeText: string
welcomeTextColor: string
heading: string
description: string
descriptionColor: string

button: {
text: string
icon: string
className: string
}

tutorial: {
link: string
image: string
altText: string
}
}

export interface EmptyStateProps {
config: EmptyStateConfig
onButtonClick: () => void
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don’t need to pass this much information into the EmptyState component. Instead, the props can be simplified to something like:

export interface EmptyStateProps {
  page: "job" | "sources" | "destinations";
  onButtonClick: () => void
}

The config logic can live inside the EmptyState component itself... since it’s only used there and not reused elsewhere. This way, we can conditionally render based on the page prop instead of passing the entire config through props.

Copy link
Collaborator

Choose a reason for hiding this comment

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

As mentioned in the above comment, please remove this file from utils, and keep the config inside the EmptyState Component itself

@@ -0,0 +1,87 @@
import { Button } from "antd"
import { PlayCircle, Plus, GitCommit } from "@phosphor-icons/react"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please change this to

Suggested change
import { PlayCircle, Plus, GitCommit } from "@phosphor-icons/react"
import { PlayCircleIcon, PlusIcon, GitCommitIcon } from "@phosphor-icons/react"

as these are depracted icon, and there is a separate PR to replace them everywhere, so let's keep it consistent here too

Comment on lines 5 to 22
image: "/src/assets/FirstDestination.svg",
welcomeText: "Welcome User !",
welcomeTextColor: "text-brand-blue",
heading: "Ready to create your first destination",
description:
"Get started and experience the speed of OLake by running jobs",
descriptionColor: "text-text-primary",
button: {
text: "New Destination",
icon: "Plus",
className:
"border-1 mb-12 border-[1px] border-[#D9D9D9] bg-white px-6 py-4 text-black",
},
tutorial: {
link: "https://youtu.be/Ub1pcLg0WsM?si=V2tEtXvx54wDoa8Y",
image: "/src/assets/DestinationTutorial.svg",
altText: "Destination Tutorial",
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, I don't think we need these many things in the config... some attributes here are common in all three configs(job, source, destination)

Please remove such attributes that are common, and try to keep the attributes here to minimum, things that are actually different in all three.

Comment on lines 83 to 103
export interface EmptyStateConfig {
image: string
welcomeText: string
welcomeTextColor: string
heading: string
description: string
descriptionColor: string

button: {
text: string
icon: string
className: string
}

tutorial: {
link: string
image: string
altText: string
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we are moving the config to the component itself, also remove this interface from here

Sarthak2845 and others added 2 commits October 24, 2025 16:37
* Added success message on Job History refetch

* Update ui/src/modules/jobs/pages/JobHistory.tsx

Co-authored-by: deepanshupal09-datazip <[email protected]>

---------

Co-authored-by: vikash choudhary <[email protected]>
Co-authored-by: deepanshupal09-datazip <[email protected]>
…datazip-inc#216)

* fix: replace deprecated Phosphor icons with latest *Icon alternatives

* fix: update Phosphor icons to latest alternatives in DestinationEdit and SourceEdit components and fix Lint issue

* refactor: remove EditSourceModal

* fix: update icon import

---------

Co-authored-by: vikash choudhary <[email protected]>
@deepanshupal09-datazip deepanshupal09-datazip added the hacktoberfest Issues open for Hacktoberfest contributors label Oct 28, 2025
* feat: add append only mode in ui

* fix: data filter bug

* fix: fix color of append only mode switch

* fix: add custom option in all streams ingestion mode change

* fix: use clsx for conditional styling

* fix: fix icons
@aarya-16
Copy link
Author

@deepanshupal09-datazip Here are the screenshots:

Jobs
image

Source
image

Destination
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest Issues open for Hacktoberfest contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants