Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -160,19 +160,39 @@ export const DataTable = React.memo(
// Smart pagination defaults based on data size
const smartPaginationConfig = useMemo((): PaginationConfig | false => {
if (pagination === false) return false;
if (pagination) return pagination;
if (pagination) {
// Ensure pageSize is in pageSizeOptions to prevent dropdown sync issues
const configPageSize = pagination.pageSize ?? pageSize;
const defaultOptions = [10, 25, 50, 100];
const options = pagination.pageSizeOptions ?? defaultOptions;

// Deduplicate and ensure pageSize is in options
const uniqueOptions = [...new Set([...options, configPageSize])];
const pageSizeOptions = uniqueOptions.sort((a, b) => a - b);

return {
...pagination,
pageSize: configPageSize,
pageSizeOptions,
};
}

// Auto-detect pagination strategy
if (data.length <= 15) {
return false; // No pagination for small datasets
}

// Ensure default pageSize is in options and deduplicate
const defaultOptions = [10, 25, 50, 100];
const uniqueOptions = [...new Set([...defaultOptions, pageSize])];
const pageSizeOptions = uniqueOptions.sort((a, b) => a - b);

return {
pageSize: pageSize,
showSizeSelector: true,
showPageInfo: true,
showNavigation: true,
pageSizeOptions: [10, 25, 50, 100],
pageSizeOptions,
enableFastNavigation: data.length > 100,
enableJumpToPage: data.length > 200,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ export function MarkdownEditor({
<div className={baseClasses} data-testid={dataTestId}>
{/* Toolbar */}
<div className={toolbarClasses}>
<span style={disabled ? { color: "#000000" } : undefined}>
<span
style={disabled ? { color: "hsl(var(--foreground))" } : undefined}
>
{isPreview ? "Preview" : "Edit"}
</span>
<button
Expand Down
5 changes: 4 additions & 1 deletion packages/ui-kit/src/layout/AppShell/AppShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ export const AppShell: React.FC<AppShellProps> = ({

{/* Footer */}
{footer && (
<div className="mt-auto p-4 bg-background border-t border-gray-200">
<div
className="mt-auto p-4 bg-background border-t border-border"
style={{ borderColor: "hsl(var(--border))" }}
>
{footer}
</div>
)}
Expand Down
1 change: 1 addition & 0 deletions packages/ui-kit/src/layout/AppShell/AppShellTopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ export const AppShellTopBar: React.FC<AppShellTopBarProps> = ({
fixed && "sticky top-0 z-40",
className,
)}
style={{ borderColor: "hsl(var(--border))" }}
role="banner"
aria-label="Top navigation bar"
data-testid={dataTestId}
Expand Down
17 changes: 14 additions & 3 deletions packages/ui-kit/src/layout/AppShell/ContentWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,22 @@ export const ContentWrapper: React.FC<ContentWrapperProps> = ({
<main className={cn("flex flex-col flex-1 overflow-auto", className)}>
{/* Breadcrumbs section */}
{breadcrumbs && breadcrumbs.length > 0 && (
<div className={cn("py-2 px-4 border-b border-border", "bg-muted/40")}>
<div
className={cn("py-2 px-4 border-b bg-muted/40", "border-border")}
style={{ borderColor: "hsl(var(--border))" }}
>
<AppShellBreadcrumbs items={breadcrumbs} />
</div>
)}

{/* Custom header if provided */}
{header && (
<div className="content-header border-b border-border">{header}</div>
<div
className="content-header border-b border-border"
style={{ borderColor: "hsl(var(--border))" }}
>
{header}
</div>
)}

{/* Main content */}
Expand All @@ -70,7 +78,10 @@ export const ContentWrapper: React.FC<ContentWrapperProps> = ({

{/* Custom footer if provided */}
{footer && (
<div className="content-footer border-t border-border mt-auto">
<div
className="content-footer border-t border-border mt-auto"
style={{ borderColor: "hsl(var(--border))" }}
>
{footer}
</div>
)}
Expand Down