mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-02 11:39:12 +00:00
Fix customize page layout for Governance and Data Assets (#22766)
* Fix customize page layout for Governance and Data Assets * minor fix * fix e2e test --------- Co-authored-by: Pranita Fulsundar <pfulsundar8@gmail.com> (cherry picked from commit 30d132156e5344a7a8576a40dd723c493bdabd77)
This commit is contained in:
parent
87866218e8
commit
ab3b69d246
@ -33,15 +33,16 @@ export enum ECustomizedGovernance {
|
||||
}
|
||||
|
||||
export const TABLE_DEFAULT_TABS = [
|
||||
'Schema',
|
||||
'Activity Feeds & Tasks',
|
||||
'Sample Data',
|
||||
'Queries',
|
||||
'Contract',
|
||||
'Custom Properties',
|
||||
'Data Observability',
|
||||
'Lineage',
|
||||
'dbt',
|
||||
'Queries',
|
||||
'Sample Data',
|
||||
'Schema',
|
||||
'View Definition',
|
||||
'Custom Properties',
|
||||
'dbt',
|
||||
];
|
||||
|
||||
export const TOPIC_DEFAULT_TABS = [
|
||||
|
||||
@ -388,6 +388,9 @@ test.describe('Persona customization', () => {
|
||||
.getByTestId('remove-widget-button')
|
||||
.click();
|
||||
|
||||
await adminPage.getByTestId('tab-Custom Properties').click();
|
||||
await adminPage.getByText('Hide').click();
|
||||
|
||||
await adminPage.getByRole('button', { name: 'Add tab' }).click();
|
||||
|
||||
await adminPage
|
||||
|
||||
@ -81,6 +81,7 @@ export const GenericTab = ({ type }: GenericTabProps) => {
|
||||
verticalCompact
|
||||
className={classNames('grid-container bg-grey', {
|
||||
'custom-tab': !leftSideWidgetPresent,
|
||||
'height-auto': type === PageType.Glossary,
|
||||
})}
|
||||
cols={8}
|
||||
containerPadding={[0, 0]}
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
|
||||
.grid-container {
|
||||
position: relative;
|
||||
height: auto !important;
|
||||
|
||||
.react-grid-item {
|
||||
background: transparent;
|
||||
@ -65,3 +64,7 @@
|
||||
min-height: 54px; // Minimum height to prevent collapse
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.height-auto {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
@ -243,8 +243,31 @@ const CustomiseLandingPageHeader = ({
|
||||
infinite={false}
|
||||
nextArrow={<CustomNextArrow />}
|
||||
prevArrow={<CustomPrevArrow />}
|
||||
slidesToScroll={6}
|
||||
slidesToShow={6}>
|
||||
responsive={[
|
||||
{
|
||||
breakpoint: 1900,
|
||||
settings: {
|
||||
slidesToShow: 8,
|
||||
slidesToScroll: 8,
|
||||
},
|
||||
},
|
||||
{
|
||||
breakpoint: 1600,
|
||||
settings: {
|
||||
slidesToShow: 6,
|
||||
slidesToScroll: 6,
|
||||
},
|
||||
},
|
||||
{
|
||||
breakpoint: 1300,
|
||||
settings: {
|
||||
slidesToShow: 4,
|
||||
slidesToScroll: 4,
|
||||
},
|
||||
},
|
||||
]}
|
||||
slidesToScroll={10}
|
||||
slidesToShow={10}>
|
||||
{recentlyViewData.map((data, index) => (
|
||||
<div
|
||||
className={classNames('customise-recently-viewed-data', {
|
||||
@ -262,7 +285,7 @@ const CustomiseLandingPageHeader = ({
|
||||
{data.icon}
|
||||
</div>
|
||||
<Typography.Text
|
||||
className="text-sm font-medium text-white wrap-text"
|
||||
className="text-sm font-medium text-white"
|
||||
ellipsis={{ tooltip: true }}>
|
||||
{data.name}
|
||||
</Typography.Text>
|
||||
|
||||
@ -91,7 +91,9 @@ const WidgetHeader = ({
|
||||
data-testid="widget-header"
|
||||
justify="space-between">
|
||||
<Col className="d-flex items-center h-full min-h-8">
|
||||
{icon && <div className="d-flex h-6 w-6 m-r-xs">{icon}</div>}
|
||||
{icon && (
|
||||
<div className="d-flex h-6 w-6 m-r-xs header-title-icon">{icon}</div>
|
||||
)}
|
||||
<Typography.Paragraph
|
||||
className="widget-title cursor-pointer"
|
||||
ellipsis={{ tooltip: true }}
|
||||
|
||||
@ -17,6 +17,12 @@
|
||||
box-shadow: 0px 4px 8px -4px rgba(10, 13, 18, 0.08);
|
||||
z-index: 1;
|
||||
|
||||
.header-title-icon {
|
||||
svg {
|
||||
color: @grey-600;
|
||||
}
|
||||
}
|
||||
|
||||
.widget-title {
|
||||
margin: 0;
|
||||
font-weight: 500;
|
||||
|
||||
@ -225,7 +225,7 @@ describe('CustomizableLandingPageUtils', () => {
|
||||
|
||||
expect(result).toHaveLength(1);
|
||||
expect(result[0].i).toBe('ExtraWidget.EmptyWidgetPlaceholder');
|
||||
expect(result[0].h).toBe(4);
|
||||
expect(result[0].h).toBe(2);
|
||||
});
|
||||
|
||||
it('should add placeholder to existing layout', () => {
|
||||
|
||||
@ -444,25 +444,19 @@ export const CustomPrevArrow = (props: DOMAttributes<HTMLDivElement>) => (
|
||||
*/
|
||||
export const getLayoutWithEmptyWidgetPlaceholder = (
|
||||
layout: WidgetConfig[],
|
||||
emptyWidgetHeight = 4,
|
||||
emptyWidgetHeight = 2,
|
||||
emptyWidgetWidth = 1
|
||||
) => {
|
||||
// Handle empty or null layout
|
||||
if (!layout || layout.length === 0) {
|
||||
return [
|
||||
{
|
||||
h: emptyWidgetHeight,
|
||||
i: LandingPageWidgetKeys.EMPTY_WIDGET_PLACEHOLDER,
|
||||
w: emptyWidgetWidth,
|
||||
x: 0,
|
||||
y: 0,
|
||||
isDraggable: false,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
return ensurePlaceholderAtEnd(layout);
|
||||
};
|
||||
) => [
|
||||
...layout,
|
||||
{
|
||||
h: emptyWidgetHeight,
|
||||
i: LandingPageWidgetKeys.EMPTY_WIDGET_PLACEHOLDER,
|
||||
w: emptyWidgetWidth,
|
||||
x: 0,
|
||||
y: 1000,
|
||||
isDraggable: false,
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* Creates a landing page layout with empty widget placeholder
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user