Worked on UI improvements from #8513 (#8647)

This commit is contained in:
Aniket Katkar 2022-11-10 20:02:57 +05:30 committed by GitHub
parent af3a0df7ba
commit b2e2d9cff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 57 additions and 49 deletions

View File

@ -251,18 +251,18 @@ const Explore: React.FC<ExploreProps> = ({
return (
<PageLayoutV1
leftPanel={
<div className="tw-h-full">
<Card data-testid="data-summary-container">
<FacetFilter
aggregations={searchResults?.aggregations}
filters={postFilter}
showDeleted={showDeleted}
onChangeShowDeleted={onChangeShowDeleted}
onClearFilter={handleFacetFilterClearFilter}
onSelectHandler={handleFacetFilterChange}
/>
</Card>
</div>
<Card
className="page-layout-v1-left-panel page-layout-v1-vertical-scroll"
data-testid="data-summary-container">
<FacetFilter
aggregations={searchResults?.aggregations}
filters={postFilter}
showDeleted={showDeleted}
onChangeShowDeleted={onChangeShowDeleted}
onClearFilter={handleFacetFilterClearFilter}
onSelectHandler={handleFacetFilterChange}
/>
</Card>
}>
<Tabs
defaultActiveKey={defaultActiveTab}

View File

@ -367,6 +367,7 @@ const GlossaryV1 = ({
) : (
<DirectoryTree
multiple
className="glossary-tree-container"
expandedKeys={expandedKey}
loadedKeys={loadingKey}
selectedKeys={[selectedKey]}

View File

@ -49,3 +49,14 @@
padding: 5px 16px;
}
}
.glossary-tree-container {
.ant-tree-node-content-wrapper {
overflow: hidden;
white-space: nowrap;
gap: 4px;
}
.ant-tree-title {
width: calc(100% - 8px);
}
}

View File

@ -16,12 +16,13 @@ import {
faWindowMinimize,
} from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Button } from 'antd';
import { AxiosError } from 'axios';
import classnames from 'classnames';
import React, { FunctionComponent, useRef, useState } from 'react';
import ReactDOM from 'react-dom';
import { useTranslation } from 'react-i18next';
import { showErrorToast } from '../../../utils/ToastUtils';
import { Button } from '../../buttons/Button/Button';
import RichTextEditor from '../../common/rich-text-editor/RichTextEditor';
import Loader from '../../Loader/Loader';
@ -35,19 +36,18 @@ type Props = {
value: string;
placeholder: string;
onSave?: (text: string) => Promise<void>;
onSuggest?: (text: string) => void;
onCancel?: () => void;
};
export const ModalWithMarkdownEditor: FunctionComponent<Props> = ({
isExpandable = false,
header,
// placeholder,
placeholder,
value,
onSave,
// onSuggest,
onCancel,
}: Props) => {
const { t } = useTranslation();
const [expanded, setExpanded] = useState<boolean>(false);
const [isLoading, setIsLoading] = useState<boolean>(false);
@ -86,7 +86,6 @@ export const ModalWithMarkdownEditor: FunctionComponent<Props> = ({
<Button
className="tw-text-lg tw-text-gray-900 hover:tw-text-gray-900"
size="small"
variant="text"
onClick={() => setExpanded((value) => !value)}>
<FontAwesomeIcon
icon={expanded ? faWindowMinimize : faWindowMaximize}
@ -109,26 +108,26 @@ export const ModalWithMarkdownEditor: FunctionComponent<Props> = ({
</div>
)}
</div>
<div className="tw-modal-body tw-pt-0 tw-pb-1">
<RichTextEditor initialValue={value} ref={markdownRef} />
<div className="tw-modal-body">
<RichTextEditor
initialValue={value}
placeHolder={placeholder}
ref={markdownRef}
/>
</div>
<div className="tw-modal-footer">
<Button
data-testid="cancel"
disabled={isLoading}
size="regular"
theme="primary"
variant="link"
type="link"
onClick={onCancel}>
Cancel
{t('label.cancel')}
</Button>
<Button
data-testid="save"
size="regular"
theme="primary"
variant="contained"
type="primary"
onClick={() => handleSaveData()}>
{isLoading ? <Loader size="small" type="white" /> : 'Save'}
{isLoading ? <Loader size="small" type="white" /> : t('label.save')}
</Button>
</div>
</div>

View File

@ -51,26 +51,24 @@ const SchemaTab: FunctionComponent<Props> = ({
</div>
</div>
<div className="row">
{columns?.length > 0 ? (
<div className="col-sm-12">
<EntityTableV1
columnName={columnName}
entityFieldTasks={entityFieldTasks}
entityFieldThreads={entityFieldThreads}
entityFqn={entityFqn}
hasDescriptionEditAccess={hasDescriptionEditAccess}
hasTagEditAccess={hasTagEditAccess}
isReadOnly={isReadOnly}
joins={joins}
searchText={lowerCase(searchText)}
tableColumns={columns}
tableConstraints={tableConstraints}
onEntityFieldSelect={onEntityFieldSelect}
onThreadLinkSelect={onThreadLinkSelect}
onUpdate={onUpdate}
/>
</div>
) : null}
<div className="col-sm-12">
<EntityTableV1
columnName={columnName}
entityFieldTasks={entityFieldTasks}
entityFieldThreads={entityFieldThreads}
entityFqn={entityFqn}
hasDescriptionEditAccess={hasDescriptionEditAccess}
hasTagEditAccess={hasTagEditAccess}
isReadOnly={isReadOnly}
joins={joins}
searchText={lowerCase(searchText)}
tableColumns={columns}
tableConstraints={tableConstraints}
onEntityFieldSelect={onEntityFieldSelect}
onThreadLinkSelect={onThreadLinkSelect}
onUpdate={onUpdate}
/>
</div>
</div>
</Fragment>
);

View File

@ -343,7 +343,7 @@ const TableProfilerV1: FC<TableProfilerProps> = ({ table, permissions }) => {
target="_blank"
to={{
pathname:
'https://docs.open-metadata.org/openmetadata/ingestion/workflows/profiler',
'https://docs.open-metadata.org/connectors/ingestion/workflows/profiler',
}}>
here.
</Link>

View File

@ -667,7 +667,6 @@ const TagsPage = () => {
data-testid="delete-tag-category-button"
disabled={!categoryPermissions.Delete}
size="small"
type="primary"
onClick={() => {
deleteTagHandler();
}}>