mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-11 08:23:40 +00:00
Fix(ui) : Persona customization widgets style issues (#21415)
* fix table widgets overflow issue for persona customization * fix widget header border radius * fix data products widget style for persona customization * minor style update * render normal content instead of expandable card for few widgets
This commit is contained in:
parent
85e8776a10
commit
5a3e5adc60
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
.generic-widget-card {
|
.generic-widget-card {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
padding-bottom: @size-md !important;
|
||||||
|
|
||||||
.ant-card-head {
|
.ant-card-head {
|
||||||
background-color: @grey-100;
|
background-color: @grey-100;
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
@import (reference) url('../../styles/variables.less');
|
||||||
.customize-details-page {
|
.customize-details-page {
|
||||||
box-shadow: 0px 4px 6px -2px #0a0d1208;
|
box-shadow: 0px 4px 6px -2px #0a0d1208;
|
||||||
box-shadow: 0px 12px 16px -4px #0a0d1214;
|
box-shadow: 0px 12px 16px -4px #0a0d1214;
|
||||||
@ -21,6 +22,7 @@
|
|||||||
|
|
||||||
.ant-card-head {
|
.ant-card-head {
|
||||||
border: none;
|
border: none;
|
||||||
|
border-radius: @size-sm;
|
||||||
}
|
}
|
||||||
|
|
||||||
.customize-page-header {
|
.customize-page-header {
|
||||||
|
|||||||
@ -29,7 +29,11 @@ export type Joined = JoinedWith & {
|
|||||||
name: string;
|
name: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FrequentlyJoinedTables = () => {
|
export const FrequentlyJoinedTables = ({
|
||||||
|
renderAsExpandableCard = true,
|
||||||
|
}: {
|
||||||
|
renderAsExpandableCard?: boolean;
|
||||||
|
}) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { data, filterWidgets } = useGenericContext<Table>();
|
const { data, filterWidgets } = useGenericContext<Table>();
|
||||||
|
|
||||||
@ -64,7 +68,7 @@ export const FrequentlyJoinedTables = () => {
|
|||||||
</Space>
|
</Space>
|
||||||
));
|
));
|
||||||
|
|
||||||
return (
|
return renderAsExpandableCard ? (
|
||||||
<ExpandableCard
|
<ExpandableCard
|
||||||
cardProps={{
|
cardProps={{
|
||||||
title: t('label.frequently-joined-table-plural'),
|
title: t('label.frequently-joined-table-plural'),
|
||||||
@ -73,5 +77,7 @@ export const FrequentlyJoinedTables = () => {
|
|||||||
isExpandDisabled={isEmpty(joinedTables)}>
|
isExpandDisabled={isEmpty(joinedTables)}>
|
||||||
{content}
|
{content}
|
||||||
</ExpandableCard>
|
</ExpandableCard>
|
||||||
|
) : (
|
||||||
|
<>{content}</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -23,7 +23,11 @@ import {
|
|||||||
Table as TableType,
|
Table as TableType,
|
||||||
} from '../../../generated/entity/data/table';
|
} from '../../../generated/entity/data/table';
|
||||||
|
|
||||||
export const PartitionedKeys = () => {
|
export const PartitionedKeys = ({
|
||||||
|
renderAsExpandableCard = true,
|
||||||
|
}: {
|
||||||
|
renderAsExpandableCard?: boolean;
|
||||||
|
}) => {
|
||||||
const { data, filterWidgets } = useGenericContext<TableType>();
|
const { data, filterWidgets } = useGenericContext<TableType>();
|
||||||
|
|
||||||
const partitionColumnDetails = useMemo(
|
const partitionColumnDetails = useMemo(
|
||||||
@ -80,7 +84,7 @@ export const PartitionedKeys = () => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return renderAsExpandableCard ? (
|
||||||
<ExpandableCard
|
<ExpandableCard
|
||||||
cardProps={{
|
cardProps={{
|
||||||
title: t('label.table-partition-plural'),
|
title: t('label.table-partition-plural'),
|
||||||
@ -88,5 +92,7 @@ export const PartitionedKeys = () => {
|
|||||||
isExpandDisabled={isEmpty(partitionColumnDetails)}>
|
isExpandDisabled={isEmpty(partitionColumnDetails)}>
|
||||||
{content}
|
{content}
|
||||||
</ExpandableCard>
|
</ExpandableCard>
|
||||||
|
) : (
|
||||||
|
content
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -32,7 +32,11 @@ import ForeignKeyConstraint from './ForeignKeyConstraint';
|
|||||||
import './table-constraints.less';
|
import './table-constraints.less';
|
||||||
import TableConstraintsModal from './TableConstraintsModal/TableConstraintsModal.component';
|
import TableConstraintsModal from './TableConstraintsModal/TableConstraintsModal.component';
|
||||||
|
|
||||||
const TableConstraints = () => {
|
const TableConstraints = ({
|
||||||
|
renderAsExpandableCard = true,
|
||||||
|
}: {
|
||||||
|
renderAsExpandableCard?: boolean;
|
||||||
|
}) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||||
const { data, permissions, onUpdate } = useGenericContext<Table>();
|
const { data, permissions, onUpdate } = useGenericContext<Table>();
|
||||||
@ -168,13 +172,17 @@ const TableConstraints = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ExpandableCard
|
{renderAsExpandableCard ? (
|
||||||
cardProps={{
|
<ExpandableCard
|
||||||
title: header,
|
cardProps={{
|
||||||
}}
|
title: header,
|
||||||
isExpandDisabled={isEmpty(data?.tableConstraints)}>
|
}}
|
||||||
{content}
|
isExpandDisabled={isEmpty(data?.tableConstraints)}>
|
||||||
</ExpandableCard>
|
{content}
|
||||||
|
</ExpandableCard>
|
||||||
|
) : (
|
||||||
|
content
|
||||||
|
)}
|
||||||
{isModalOpen && (
|
{isModalOpen && (
|
||||||
<TableConstraintsModal
|
<TableConstraintsModal
|
||||||
constraint={data?.tableConstraints}
|
constraint={data?.tableConstraints}
|
||||||
|
|||||||
@ -143,11 +143,10 @@ export const WIDGET_COMPONENTS = {
|
|||||||
),
|
),
|
||||||
[DetailPageWidgetKeys.TABLE_SCHEMA]: () => <SchemaTable />,
|
[DetailPageWidgetKeys.TABLE_SCHEMA]: () => <SchemaTable />,
|
||||||
[DetailPageWidgetKeys.FREQUENTLY_JOINED_TABLES]: () => (
|
[DetailPageWidgetKeys.FREQUENTLY_JOINED_TABLES]: () => (
|
||||||
<FrequentlyJoinedTables />
|
<FrequentlyJoinedTables renderAsExpandableCard={false} />
|
||||||
),
|
),
|
||||||
[DetailPageWidgetKeys.DATA_PRODUCTS]: () => (
|
[DetailPageWidgetKeys.DATA_PRODUCTS]: () => (
|
||||||
<DataProductsContainer
|
<DataProductsContainer
|
||||||
newLook
|
|
||||||
dataProducts={tableClassBase.getDummyData().dataProducts ?? []}
|
dataProducts={tableClassBase.getDummyData().dataProducts ?? []}
|
||||||
hasPermission={false}
|
hasPermission={false}
|
||||||
showHeader={false}
|
showHeader={false}
|
||||||
@ -156,7 +155,9 @@ export const WIDGET_COMPONENTS = {
|
|||||||
[GlossaryTermDetailPageWidgetKeys.TERMS_TABLE]: () => (
|
[GlossaryTermDetailPageWidgetKeys.TERMS_TABLE]: () => (
|
||||||
<GlossaryTermTab isGlossary />
|
<GlossaryTermTab isGlossary />
|
||||||
),
|
),
|
||||||
[DetailPageWidgetKeys.TABLE_CONSTRAINTS]: () => <TableConstraints />,
|
[DetailPageWidgetKeys.TABLE_CONSTRAINTS]: () => (
|
||||||
|
<TableConstraints renderAsExpandableCard={false} />
|
||||||
|
),
|
||||||
[DetailPageWidgetKeys.TOPIC_SCHEMA]: () => <TopicSchemaFields />,
|
[DetailPageWidgetKeys.TOPIC_SCHEMA]: () => <TopicSchemaFields />,
|
||||||
[DetailPageWidgetKeys.DATA_MODEL]: () => <ModelTab />,
|
[DetailPageWidgetKeys.DATA_MODEL]: () => <ModelTab />,
|
||||||
[DetailPageWidgetKeys.CONTAINER_CHILDREN]: () => (
|
[DetailPageWidgetKeys.CONTAINER_CHILDREN]: () => (
|
||||||
@ -186,5 +187,7 @@ export const WIDGET_COMPONENTS = {
|
|||||||
[DetailPageWidgetKeys.STORED_PROCEDURE_CODE]: () => (
|
[DetailPageWidgetKeys.STORED_PROCEDURE_CODE]: () => (
|
||||||
<StoredProcedureCodeCard />
|
<StoredProcedureCodeCard />
|
||||||
),
|
),
|
||||||
[DetailPageWidgetKeys.PARTITIONED_KEYS]: () => <PartitionedKeys />,
|
[DetailPageWidgetKeys.PARTITIONED_KEYS]: () => (
|
||||||
|
<PartitionedKeys renderAsExpandableCard={false} />
|
||||||
|
),
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user