mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-08 15:04:29 +00:00
Improvements(UI): Made table styling consistent across the project (#7155)
* Made table border styling consistent across the project * Worked on comments * classname changed for table container in dataqualitytable component * Update openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/DashboardVersion.component.tsx Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com> Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com>
This commit is contained in:
parent
8462d4389d
commit
383075aec9
@ -72,12 +72,12 @@ export const CustomPropertyTable: FC<CustomPropertyTableProp> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<div className="tw-bg-white tw-border tw-border-main tw-rounded tw-shadow">
|
<div className="tw-table-container">
|
||||||
<table
|
<table
|
||||||
className="tw-w-full"
|
className="tw-w-full"
|
||||||
data-testid="entity-custom-properties-table">
|
data-testid="entity-custom-properties-table">
|
||||||
<thead data-testid="table-header">
|
<thead data-testid="table-header">
|
||||||
<tr className="tableHead-row tw-border-t-0 tw-border-l-0 tw-border-r-0">
|
<tr className="tableHead-row">
|
||||||
<th className="tableHead-cell" data-testid="property-name">
|
<th className="tableHead-cell" data-testid="property-name">
|
||||||
Name
|
Name
|
||||||
</th>
|
</th>
|
||||||
@ -98,7 +98,6 @@ export const CustomPropertyTable: FC<CustomPropertyTableProp> = ({
|
|||||||
<tr
|
<tr
|
||||||
className={classNames(
|
className={classNames(
|
||||||
`tableBody-row ${!isEven(index + 1) && 'odd-row'}`,
|
`tableBody-row ${!isEven(index + 1) && 'odd-row'}`,
|
||||||
'tw-border-l-0 tw-border-r-0',
|
|
||||||
{
|
{
|
||||||
'tw-border-b-0': index === customProperties.length - 1,
|
'tw-border-b-0': index === customProperties.length - 1,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -567,7 +567,7 @@ const DashboardDetails = ({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="tw-table-responsive tw-my-6">
|
<div className="tw-table-responsive tw-my-6 tw-table-container">
|
||||||
<table className="tw-w-full" data-testid="charts-table">
|
<table className="tw-w-full" data-testid="charts-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="tableHead-row">
|
<tr className="tableHead-row">
|
||||||
|
|||||||
@ -249,7 +249,7 @@ const DashboardVersion: FC<DashboardVersionProp> = ({
|
|||||||
description={getDashboardDescription()}
|
description={getDashboardDescription()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="tw-table-responsive tw-my-6 tw-col-span-full">
|
<div className="tw-table-responsive tw-my-6 tw-col-span-full tw-table-container">
|
||||||
<table className="tw-w-full" data-testid="schema-table">
|
<table className="tw-w-full" data-testid="schema-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="tableHead-row">
|
<tr className="tableHead-row">
|
||||||
|
|||||||
@ -94,7 +94,9 @@ const DataQualityTable = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="tw-table-responsive" data-testid="table-container">
|
<div
|
||||||
|
className="tw-table-responsive tw-table-container"
|
||||||
|
data-testid="table-container">
|
||||||
<table className="tw-w-full">
|
<table className="tw-w-full">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="tableHead-row" data-testid="table-header">
|
<tr className="tableHead-row" data-testid="table-header">
|
||||||
|
|||||||
@ -40,7 +40,7 @@ const AssetsTabs = ({ assetData, onAssetPaginate, currentPage }: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="" data-testid="table-container">
|
<div className="tw-table-container" data-testid="table-container">
|
||||||
<table
|
<table
|
||||||
className="tw-bg-white tw-w-full tw-mb-4"
|
className="tw-bg-white tw-w-full tw-mb-4"
|
||||||
data-testid="database-tables">
|
data-testid="database-tables">
|
||||||
|
|||||||
@ -426,7 +426,7 @@ const Ingestion: React.FC<IngestionProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{getSearchedIngestions().length ? (
|
{getSearchedIngestions().length ? (
|
||||||
<div className="tw-table-responsive tw-mb-6">
|
<div className="tw-table-responsive tw-mb-6 tw-table-container">
|
||||||
<table
|
<table
|
||||||
className="tw-bg-white tw-w-full tw-mb-4"
|
className="tw-bg-white tw-w-full tw-mb-4"
|
||||||
data-testid="ingestion-table">
|
data-testid="ingestion-table">
|
||||||
|
|||||||
@ -340,8 +340,9 @@ const MlModelDetail: FC<MlModelDetailProp> = ({
|
|||||||
return (
|
return (
|
||||||
<div className="tw-flex tw-flex-col tw-mt-2">
|
<div className="tw-flex tw-flex-col tw-mt-2">
|
||||||
<h6 className="tw-font-medium tw-text-base">Hyper Parameters</h6>
|
<h6 className="tw-font-medium tw-text-base">Hyper Parameters</h6>
|
||||||
|
<div className="tw-table-container tw-mt-2">
|
||||||
<table
|
<table
|
||||||
className="tw-w-full tw-mt-2"
|
className="tw-w-full"
|
||||||
data-testid="hyperparameters-table"
|
data-testid="hyperparameters-table"
|
||||||
id="hyperparameters-table">
|
id="hyperparameters-table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -359,10 +360,14 @@ const MlModelDetail: FC<MlModelDetailProp> = ({
|
|||||||
className={classNames('tableBody-row')}
|
className={classNames('tableBody-row')}
|
||||||
data-testid="tableBody-row"
|
data-testid="tableBody-row"
|
||||||
key={uniqueId()}>
|
key={uniqueId()}>
|
||||||
<td className="tableBody-cell" data-testid="tableBody-cell">
|
<td
|
||||||
|
className="tableBody-cell"
|
||||||
|
data-testid="tableBody-cell">
|
||||||
{param.name}
|
{param.name}
|
||||||
</td>
|
</td>
|
||||||
<td className="tableBody-cell" data-testid="tableBody-cell">
|
<td
|
||||||
|
className="tableBody-cell"
|
||||||
|
data-testid="tableBody-cell">
|
||||||
{param.value}
|
{param.value}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -384,6 +389,7 @@ const MlModelDetail: FC<MlModelDetailProp> = ({
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -392,8 +398,9 @@ const MlModelDetail: FC<MlModelDetailProp> = ({
|
|||||||
<div className="tw-flex tw-flex-col tw-mt-2">
|
<div className="tw-flex tw-flex-col tw-mt-2">
|
||||||
<h6 className="tw-font-medium tw-text-base">Model Store</h6>
|
<h6 className="tw-font-medium tw-text-base">Model Store</h6>
|
||||||
{mlModelDetail.mlStore ? (
|
{mlModelDetail.mlStore ? (
|
||||||
|
<div className="tw-mt-2 tw-table-container">
|
||||||
<table
|
<table
|
||||||
className="tw-w-full tw-mt-2"
|
className="tw-w-full"
|
||||||
data-testid="model-store-table"
|
data-testid="model-store-table"
|
||||||
id="model-store-table">
|
id="model-store-table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -433,6 +440,7 @@ const MlModelDetail: FC<MlModelDetailProp> = ({
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<span className="tw-text-grey-muted tw-text-center">No Data</span>
|
<span className="tw-text-grey-muted tw-text-center">No Data</span>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -246,7 +246,7 @@ const PipelineVersion: FC<PipelineVersionProp> = ({
|
|||||||
description={getPipelineDescription()}
|
description={getPipelineDescription()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="tw-table-responsive tw-my-6 tw-col-span-full">
|
<div className="tw-table-responsive tw-my-6 tw-col-span-full tw-table-container">
|
||||||
<table className="tw-w-full" data-testid="schema-table">
|
<table className="tw-w-full" data-testid="schema-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="tableHead-row">
|
<tr className="tableHead-row">
|
||||||
|
|||||||
@ -101,7 +101,9 @@ const SampleDataTable: FunctionComponent<Props> = ({ sampleData }: Props) => {
|
|||||||
</button>
|
</button>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<div className="tw-table-responsive tw-overflow-x-auto" ref={tableRef}>
|
<div
|
||||||
|
className="tw-table-responsive tw-overflow-x-auto tw-table-container"
|
||||||
|
ref={tableRef}>
|
||||||
{sampleData?.rows?.length && sampleData?.columns?.length ? (
|
{sampleData?.rows?.length && sampleData?.columns?.length ? (
|
||||||
<table
|
<table
|
||||||
className="tw-min-w-max tw-w-full tw-table-auto"
|
className="tw-min-w-max tw-w-full tw-table-auto"
|
||||||
|
|||||||
@ -52,10 +52,10 @@ export const CustomPropertyTable: FC<CustomPropertyProps> = ({
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="tw-bg-white tw-border tw-border-main tw-rounded">
|
<div className="tw-table-container">
|
||||||
<table className="tw-w-full" data-testid="custom-properties-table">
|
<table className="tw-w-full" data-testid="custom-properties-table">
|
||||||
<thead data-testid="table-header">
|
<thead data-testid="table-header">
|
||||||
<tr className="tableHead-row tw-border-t-0 tw-border-l-0 tw-border-r-0">
|
<tr className="tableHead-row">
|
||||||
<th className="tableHead-cell tw-w-2/4" data-testid="property-name">
|
<th className="tableHead-cell tw-w-2/4" data-testid="property-name">
|
||||||
Name
|
Name
|
||||||
</th>
|
</th>
|
||||||
@ -72,7 +72,6 @@ export const CustomPropertyTable: FC<CustomPropertyProps> = ({
|
|||||||
<tr
|
<tr
|
||||||
className={classNames(
|
className={classNames(
|
||||||
`tableBody-row ${!isEven(index + 1) && 'odd-row'}`,
|
`tableBody-row ${!isEven(index + 1) && 'odd-row'}`,
|
||||||
'tw-border-l-0 tw-border-r-0',
|
|
||||||
{
|
{
|
||||||
'tw-border-b-0': index === customProperties.length - 1,
|
'tw-border-b-0': index === customProperties.length - 1,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -514,9 +514,9 @@ const DatabaseSchemaPage: FunctionComponent = () => {
|
|||||||
|
|
||||||
const getSchemaTableList = () => {
|
const getSchemaTableList = () => {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<div className="tw-table-container tw-mb-4">
|
||||||
<table
|
<table
|
||||||
className="tw-bg-white tw-w-full tw-mb-4"
|
className="tw-bg-white tw-w-full"
|
||||||
data-testid="databaseSchema-tables">
|
data-testid="databaseSchema-tables">
|
||||||
<thead data-testid="table-header">
|
<thead data-testid="table-header">
|
||||||
<tr className="tableHead-row">
|
<tr className="tableHead-row">
|
||||||
@ -565,7 +565,7 @@ const DatabaseSchemaPage: FunctionComponent = () => {
|
|||||||
)}
|
)}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</Fragment>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -667,8 +667,9 @@ const DatabaseDetails: FunctionComponent = () => {
|
|||||||
<div className="tw-bg-white tw-flex-grow tw--mx-6 tw-px-7 tw-py-4">
|
<div className="tw-bg-white tw-flex-grow tw--mx-6 tw-px-7 tw-py-4">
|
||||||
{activeTab === 1 && (
|
{activeTab === 1 && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
<div className="tw-table-container tw-mb-4">
|
||||||
<table
|
<table
|
||||||
className="tw-bg-white tw-w-full tw-mb-4"
|
className="tw-bg-white tw-w-full"
|
||||||
data-testid="database-databaseSchemas">
|
data-testid="database-databaseSchemas">
|
||||||
<thead data-testid="table-header">
|
<thead data-testid="table-header">
|
||||||
<tr className="tableHead-row">
|
<tr className="tableHead-row">
|
||||||
@ -751,6 +752,7 @@ const DatabaseDetails: FunctionComponent = () => {
|
|||||||
)}
|
)}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
{Boolean(
|
{Boolean(
|
||||||
!isNil(databaseSchemaPaging.after) ||
|
!isNil(databaseSchemaPaging.after) ||
|
||||||
!isNil(databaseSchemaPaging.before)
|
!isNil(databaseSchemaPaging.before)
|
||||||
|
|||||||
@ -996,10 +996,10 @@ const ServicePage: FunctionComponent = () => {
|
|||||||
{activeTab === 1 && (
|
{activeTab === 1 && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<div
|
<div
|
||||||
className="tw-mt-4 tw-px-1"
|
className="tw-my-4 tw-table-container"
|
||||||
data-testid="table-container">
|
data-testid="table-container">
|
||||||
<table
|
<table
|
||||||
className="tw-bg-white tw-w-full tw-mb-4"
|
className="tw-bg-white tw-w-full"
|
||||||
data-testid="database-tables">
|
data-testid="database-tables">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="tableHead-row">{getTableHeaders()}</tr>
|
<tr className="tableHead-row">{getTableHeaders()}</tr>
|
||||||
|
|||||||
@ -590,7 +590,7 @@ const TagsPage = () => {
|
|||||||
onDescriptionUpdate={UpdateCategory}
|
onDescriptionUpdate={UpdateCategory}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="tw-bg-white">
|
<div className="tw-table-container">
|
||||||
<table className="tw-w-full" data-testid="table">
|
<table className="tw-w-full" data-testid="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="tableHead-row">
|
<tr className="tableHead-row">
|
||||||
|
|||||||
@ -78,7 +78,7 @@
|
|||||||
|
|
||||||
/* Table css start */
|
/* Table css start */
|
||||||
.tableHead-row {
|
.tableHead-row {
|
||||||
@apply tw-border tw-border-main tw-leading-normal;
|
@apply tw-leading-normal;
|
||||||
}
|
}
|
||||||
.tableHead-cell {
|
.tableHead-cell {
|
||||||
@apply tw-py-3 tw-px-6 tw-font-medium tw-text-left tw-whitespace-nowrap;
|
@apply tw-py-3 tw-px-6 tw-font-medium tw-text-left tw-whitespace-nowrap;
|
||||||
@ -87,10 +87,10 @@
|
|||||||
@apply tw-text-grey-body;
|
@apply tw-text-grey-body;
|
||||||
}
|
}
|
||||||
.tableBody-row {
|
.tableBody-row {
|
||||||
@apply tw-border tw-border-main hover:tw-bg-body-hover;
|
@apply tw-border-t tw-border-main hover:tw-bg-body-hover;
|
||||||
}
|
}
|
||||||
.tableBody-cell {
|
.tableBody-cell {
|
||||||
@apply tw-py-3 tw-px-6 tw-text-left;
|
@apply tw-py-2 tw-px-6 tw-text-left;
|
||||||
}
|
}
|
||||||
/* Table css end */
|
/* Table css end */
|
||||||
|
|
||||||
@ -494,4 +494,8 @@
|
|||||||
.tw-max-w-75 {
|
.tw-max-w-75 {
|
||||||
max-width: 75%;
|
max-width: 75%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tw-table-container {
|
||||||
|
@apply tw-bg-white tw-border tw-border-main tw-rounded tw-shadow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user