Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
aedd7be
change asset list
anshbansal Jul 14, 2025
f5e6b16
changes for assets
anshbansal Jul 14, 2025
57749fd
change asset section
anshbansal Jul 14, 2025
83e3f8f
add unit test
anshbansal Jul 14, 2025
cb79a13
remove comment
anshbansal Jul 14, 2025
3bedabc
fix styling
anshbansal Jul 14, 2025
b3da1e7
change for other ingested assets
anshbansal Jul 14, 2025
d4a1ef2
lint fix
anshbansal Jul 14, 2025
2813ec7
left align text
anshbansal Jul 14, 2025
e163121
code review feedback
anshbansal Jul 14, 2025
91974e0
replace typography, reuse component
anshbansal Jul 14, 2025
d5a8d4e
simplify
anshbansal Jul 14, 2025
97f0b6b
increase modal width
anshbansal Jul 14, 2025
962aa24
use pill component
anshbansal Jul 14, 2025
8ea70bf
use colors instead of ANTD_gray
anshbansal Jul 14, 2025
740c8da
useMemo
anshbansal Jul 14, 2025
f12b928
add tabs to modal
anshbansal Jul 14, 2025
7a04098
code review feedback
anshbansal Jul 15, 2025
509abbc
code review feedback
anshbansal Jul 15, 2025
4545ea8
move tabs to their own files
anshbansal Jul 16, 2025
fffd30a
fix lint
anshbansal Jul 16, 2025
cd743dd
move success/fail pill to title, add file paramter to gradle task
anshbansal Jul 16, 2025
46fc38f
fix header
anshbansal Jul 16, 2025
4eda519
fix color pill
anshbansal Jul 16, 2025
1768881
changes for fixing positioning
anshbansal Jul 16, 2025
8797985
fix lint
anshbansal Jul 16, 2025
77e054b
minor tweaks
anshbansal Jul 16, 2025
cfa831c
fix lint
anshbansal Jul 16, 2025
0a3c316
code review feedback
anshbansal Jul 16, 2025
4a01640
use component
anshbansal Jul 16, 2025
d9e46b7
fix broken manage sources tab
anshbansal Jul 16, 2025
39ec4c5
code review feedback
anshbansal Jul 16, 2025
869c4ef
Merge branch 'master' into ab-2025-jul-14-edit-ingest-assets-page
anshbansal Jul 20, 2025
baa9758
code review feedback
anshbansal Jul 20, 2025
def23d7
update test
anshbansal Jul 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@
"Bash(ruff:*)",
"Bash(python -m mypy:*)",
"Bash(python -m ruff:*)",
"Bash(python -m pytest:*)"
"Bash(python -m pytest:*)",
"Bash(yarn format:*)",
"Bash(yarn lint:*)",
"Bash(yarn type-check:*)",
"Bash(yarn test:*)",
"Bash(yarn generate:*)",
"Bash(./gradlew :datahub-web-react:yarnLintFix)",
"Bash(./gradlew :datahub-web-react:yarnLint)"
],
"deny": []
}
Expand Down
15 changes: 13 additions & 2 deletions datahub-web-react/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,19 @@ yarn generate
# Run formatting
yarn format

# Run linting
yarn lint
# Run linting on all files
../gradlew yarnLint

# Run lint-fix on a single file
../gradlew -x yarnInstall -x yarnGenerate yarnLintFix -Pfile=src/path/to/file.tsx

# Run linting on a single file
# This does not run full type-check when we run for a single file
# that should be run at the end of all changes before commit
../gradlew -x yarnInstall -x yarnGenerate yarnLint -Pfile=src/path/to/file.tsx

# Run lint-fix on all files
../gradlew yarnLintFix

# Run type checking
yarn type-check
Expand Down
68 changes: 55 additions & 13 deletions datahub-web-react/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,26 +105,68 @@ task yarnTest(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
}

task yarnLint(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
args = ['run', 'lint']
def targetFile = project.findProperty('file') ?: ''

if (targetFile.isEmpty()) {
// Run on all files
args = ['run', 'lint']
} else {
// Run on specific file - run lint, format-check, and type-check
doFirst {
// Run lint-file first
exec {
workingDir projectDir
commandLine 'yarn', 'run', 'lint-file', targetFile
}
// Then run format-check-file
exec {
workingDir projectDir
commandLine 'yarn', 'run', 'format-check-file', targetFile
}
// This does not run full type-check when we run for a single file
// as that would take too long
}
outputs.cacheIf { false }
}
}

test.dependsOn([yarnInstall, yarnTest, yarnLint])

task yarnLintFix(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
args = ['run', 'lint-fix']
def lint_sentinel = "${buildDir}/.yarn-lint-sentinel"
outputs.file(lint_sentinel)
inputs.files(project.fileTree(dir: 'src', include: ['**/*.ts', '**/*.tsx']))
doLast {
// touch a file with name yarn-lint.txt in the build directory
def file = file(lint_sentinel)
if (!file.exists()) {
file.createNewFile()
} else {
file.setLastModified(System.currentTimeMillis())
def targetFile = project.findProperty('file') ?: ''

if (targetFile.isEmpty()) {
// Run on all files
args = ['run', 'lint-fix']
def lint_sentinel = "${buildDir}/.yarn-lint-sentinel"
outputs.file(lint_sentinel)
inputs.files(project.fileTree(dir: 'src', include: ['**/*.ts', '**/*.tsx']))
doLast {
// touch a file with name yarn-lint.txt in the build directory
def file = file(lint_sentinel)
if (!file.exists()) {
file.createNewFile()
} else {
file.setLastModified(System.currentTimeMillis())
}
}
outputs.cacheIf { true }
} else {
// Run on specific file - need to run both lint-fix and format
doFirst {
// Run lint-fix-file first
exec {
workingDir projectDir
commandLine 'yarn', 'run', 'lint-fix-file', targetFile
}
// Then run format-file
exec {
workingDir projectDir
commandLine 'yarn', 'run', 'format-file', targetFile
}
}
outputs.cacheIf { false }
}
outputs.cacheIf { true }
}

task yarnBuild(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
Expand Down
4 changes: 4 additions & 0 deletions datahub-web-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,12 @@
"generate": "NODE_OPTIONS='--max-old-space-size=5120 --openssl-legacy-provider' graphql-codegen --config codegen.yml",
"lint": "eslint . --ext .ts,.tsx --quiet && yarn format-check && yarn type-check",
"lint-fix": "eslint . --ext .ts,.tsx --quiet --fix && yarn format",
"lint-file": "eslint --ext .ts,.tsx --quiet",
"format-check-file": "prettier --check",
"lint-fix-file": "eslint --ext .ts,.tsx --quiet --fix",
"format-check": "prettier --check src",
"format": "prettier --write src",
"format-file": "prettier --write",
"type-check": "tsc --noEmit",
"type-watch": "tsc -w --noEmit",
"storybook": "storybook dev -p 6006",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ const HeaderContainer = styled.div<{ hasChildren: boolean }>`
flex-direction: column;
`;

const TitleRow = styled.div`
display: flex;
align-items: center;
gap: 8px;
`;

const ButtonsContainer = styled.div`
display: flex;
gap: 16px;
Expand All @@ -59,6 +65,7 @@ export interface ModalProps {
buttons: ModalButton[];
title: string;
subtitle?: string;
titlePill?: React.ReactNode;
children?: React.ReactNode;
onCancel: () => void;
dataTestId?: string;
Expand All @@ -68,6 +75,7 @@ export function Modal({
buttons,
title,
subtitle,
titlePill,
children,
onCancel,
dataTestId,
Expand All @@ -83,9 +91,12 @@ export function Modal({
data-testid={dataTestId}
title={
<HeaderContainer hasChildren={!!children}>
<Heading type="h1" color="gray" colorLevel={600} weight="bold" size="lg">
{title}
</Heading>
<TitleRow>
<Heading type="h1" color="gray" colorLevel={600} weight="bold" size="lg">
{title}
</Heading>
{titlePill}
</TitleRow>
{!!subtitle && (
<Text type="span" color="gray" colorLevel={1700} weight="medium">
{subtitle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@ const meta = {
getCurrentUrl: {
description: 'A custom function to get the current URL. Defaults to window.location.pathname',
},
scrollToTopOnChange: {
description: 'Whether to scroll to the top of the tabs container when switching tabs',
control: { type: 'boolean' },
},
maxHeight: {
description:
'Maximum height of the scrollable tabs container (only applies when scrollToTopOnChange is true)',
control: { type: 'text' },
},
stickyHeader: {
description: 'Whether to make the tab headers sticky when scrolling',
control: { type: 'boolean' },
},
},

// Args for the story
Expand Down Expand Up @@ -136,3 +149,77 @@ export const urlAware: Story = {
tags: ['dev'],
render: () => <UrlAwareTabsDemo />,
};

const StickyHeaderTabsDemo = () => {
const [selectedTab, setSelectedTab] = React.useState('tab1');

const stickyTabs = [
{
key: 'tab1',
name: 'Tab One',
component: (
<div style={{ padding: '20px' }}>
<h3>Tab One with Sticky Header</h3>
{Array.from({ length: 40 }, (_, i) => (
<p key={i}>
This is paragraph {i + 1}. The tab header will stick to the top when you scroll down. Lorem
ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua.
</p>
))}
</div>
),
},
{
key: 'tab2',
name: 'Tab Two',
component: (
<div style={{ padding: '20px' }}>
<h3>Tab Two Content</h3>
{Array.from({ length: 35 }, (_, i) => (
<div key={i} style={{ marginBottom: '15px', padding: '15px', backgroundColor: '#f0f0f0' }}>
Content block {i + 1} - Notice how the tab header remains visible at the top while
scrolling.
</div>
))}
</div>
),
},
{
key: 'tab3',
name: 'Tab Three',
component: (
<div style={{ padding: '20px' }}>
<h3>Tab Three Content</h3>
{Array.from({ length: 50 }, (_, i) => (
<p key={i}>
Line {i + 1}: The sticky header allows you to easily switch between tabs even when scrolled
deep into the content. This is particularly useful for long content like logs or detailed
configuration files.
</p>
))}
</div>
),
},
];

return (
<div style={{ width: '700px', height: '500px' }}>
<h4>Sticky Header & Scroll to Top on Tab Change Demo</h4>
<p>Scroll down within the tab content to see the sticky header behavior and switch between tabs</p>
<Tabs
tabs={stickyTabs}
selectedTab={selectedTab}
onChange={setSelectedTab}
scrollToTopOnChange
maxHeight="400px"
stickyHeader
/>
</div>
);
};

export const stickyHeader: Story = {
tags: ['dev'],
render: () => <StickyHeaderTabsDemo />,
};
Loading
Loading