Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor UI Changes #3222

Merged
merged 1 commit into from
Mar 7, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,25 @@ const FeedListBody: FC<FeedListBodyProp> = ({
/>
{postLength > 0 ? (
<Fragment>
<div className="tw-mb-6">
<div className="tw-ml-9 tw-flex tw-mb-6">
<FeedFooter
isFooterVisible
className="tw--mt-4"
lastReplyTimeStamp={lastPost?.postTs}
repliedUsers={repliedUsers}
replies={replies}
threadId={feed.id}
onThreadSelect={(id: string) => {
onThreadIdSelect('');
onThreadSelect(id);
onViewMore();
}}
/>
{postLength > 1 ? (
<div className="tw-mb-6">
<div className="tw-ml-9 tw-flex tw-mb-6">
<FeedFooter
isFooterVisible
className="tw--mt-4"
lastReplyTimeStamp={lastPost?.postTs}
repliedUsers={repliedUsers}
replies={replies}
threadId={feed.id}
onThreadSelect={(id: string) => {
onThreadIdSelect('');
onThreadSelect(id);
onViewMore();
}}
/>
</div>
</div>
</div>
) : null}
<ActivityFeedCard
className="tw-mb-6 tw-ml-9"
feed={lastPost}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,21 @@ const ActivityThreadList: FC<ActivityThreadListProp> = ({
/>
{postLength > 0 ? (
<Fragment>
<div className="tw-mb-6">
<div className="tw-ml-9 tw-flex tw-mb-6">
<FeedFooter
isFooterVisible
className="tw--mt-4"
lastReplyTimeStamp={lastPost?.postTs}
repliedUsers={repliedUsers}
replies={replies}
threadId={thread.id}
onThreadSelect={() => onThreadSelect(thread.id)}
/>
{postLength > 1 ? (
<div className="tw-mb-6">
<div className="tw-ml-9 tw-flex tw-mb-6">
<FeedFooter
isFooterVisible
className="tw--mt-4"
lastReplyTimeStamp={lastPost?.postTs}
repliedUsers={repliedUsers}
replies={replies}
threadId={thread.id}
onThreadSelect={() => onThreadSelect(thread.id)}
/>
</div>
</div>
</div>
) : null}
<ActivityFeedCard
isEntityFeed
className="tw-mb-6 tw-ml-9"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,18 @@ const EntityTable = ({
</p>
</div>
) : (
<div className="tw-flex">
<div className="tw-mr-2">
<i className="fas fa-check-square tw-text-status-success" />
</div>
<p>{`${passingTests.length} tests`}</p>
</div>
<Fragment>
{passingTests.length ? (
<div className="tw-flex">
<div className="tw-mr-2">
<i className="fas fa-check-square tw-text-status-success" />
</div>
<p>{`${passingTests.length} tests`}</p>
</div>
) : (
<p>{`${columnTestLength} tests`}</p>
)}
</Fragment>
)}
</Fragment>
) : (
Expand Down Expand Up @@ -591,18 +597,23 @@ const EntityTable = ({
)
) && !cell.value ? (
<button
className="focus:tw-outline-none tw-ml-1 tw-opacity-0 group-hover:tw-opacity-100"
className="focus:tw-outline-none tw-ml-1 tw-opacity-0 group-hover:tw-opacity-100 tw--mt-2"
data-testid="request-description"
onClick={() =>
onEntityFieldSelect?.(
`columns/${cell.row.cells[0].value}/description`
)
}>
<SVGIcons
alt="request-description"
icon={Icons.REQUEST}
width="20px"
/>
<PopOver
position="top"
title="Request description"
trigger="mouseenter">
<SVGIcons
alt="request-description"
icon={Icons.REQUEST}
width="22px"
/>
</PopOver>
</button>
) : null}
{getFieldThreadElement(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import ActivityThreadPanel from '../ActivityFeed/ActivityThreadPanel/ActivityThr
import Description from '../common/description/Description';
import EntityPageInfo from '../common/entityPageInfo/EntityPageInfo';
import NonAdminAction from '../common/non-admin-action/NonAdminAction';
import PopOver from '../common/popover/PopOver';
import RichTextEditorPreviewer from '../common/rich-text-editor/RichTextEditorPreviewer';
import TabsPane from '../common/TabsPane/TabsPane';
import PageContainer from '../containers/PageContainer';
Expand Down Expand Up @@ -472,11 +473,16 @@ const PipelineDetails = ({
`tasks/${task.name}/description`
)
}>
<SVGIcons
alt="request-description"
icon={Icons.REQUEST}
width="20px"
/>
<PopOver
position="top"
title="Request description"
trigger="mouseenter">
<SVGIcons
alt="request-description"
icon={Icons.REQUEST}
width="22px"
/>
</PopOver>
</button>
) : null}
{getFieldThreadElement(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const PercentageGraph = ({
position="top"
title={`${percentage}% ${title}`}
trigger="mouseenter">
<div className="tw-border tw-border-primary tw-h-8 tw-w-20">
<div className="tw-border tw-border-primary tw-h-6 tw-w-20">
<div
className="tw-bg-primary tw-opacity-40 tw-h-full"
style={{ width: `${percentage}%` }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { getEntityFeedLink } from '../../../utils/EntityUtils';
import SVGIcons, { Icons } from '../../../utils/SvgUtils';
import { ModalWithMarkdownEditor } from '../../Modals/ModalWithMarkdownEditor/ModalWithMarkdownEditor';
import NonAdminAction from '../non-admin-action/NonAdminAction';
import PopOver from '../popover/PopOver';
import RichTextEditorPreviewer from '../rich-text-editor/RichTextEditorPreviewer';

type Props = {
Expand Down Expand Up @@ -126,19 +127,24 @@ const Description = ({
onEntityFieldSelect &&
!description?.trim() ? (
<button
className="focus:tw-outline-none tw-ml-1 tw-opacity-0 hover:tw-opacity-100 tw--mt-6"
className="focus:tw-outline-none tw-ml-2 tw-opacity-0 hover:tw-opacity-100 tw--mt-6"
data-testid="request-description"
onClick={() => onEntityFieldSelect?.('description')}>
<SVGIcons
alt="request-description"
icon={Icons.REQUEST}
width="20px"
/>
<PopOver
position="top"
title="Request description"
trigger="mouseenter">
<SVGIcons
alt="request-description"
icon={Icons.REQUEST}
width="22px"
/>
</PopOver>
</button>
) : null}
{!isUndefined(descriptionThread) ? (
<p
className="link-text tw-ml-1 tw-w-8 tw-h-8 tw-flex-none"
className="link-text tw-ml-2 tw-w-8 tw-h-8 tw-flex-none"
onClick={() =>
onThreadLinkSelect?.(descriptionThread.entityLink)
}>
Expand Down
16 changes: 10 additions & 6 deletions openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export async function suggestions(searchTerm: string, mentionChar: string) {

return {
id: hit._id,
value: `@${hit._source.display_name}`,
value: `@${hit._source.name ?? hit._source.display_name}`,
link: `${document.location.protocol}//${document.location.host}/${
entityUrlMap[entityType as keyof typeof entityUrlMap]
}/${hit._source.name}`,
Expand All @@ -158,7 +158,7 @@ export async function suggestions(searchTerm: string, mentionChar: string) {

return {
id: hit._id,
value: `@${hit._source.display_name}`,
value: `@${hit._source.name ?? hit._source.display_name}`,
link: `${document.location.protocol}//${document.location.host}/${
entityUrlMap[entityType as keyof typeof entityUrlMap]
}/${hit._source.name}`,
Expand All @@ -174,21 +174,25 @@ export async function suggestions(searchTerm: string, mentionChar: string) {
const hits = data.data.hits.hits;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
hashValues = hits.map((hit: any) => {
const entityType = hit._source.entity_type;

return {
id: hit._id,
value: `#${hit._source.name}`,
link: `${document.location.protocol}//${document.location.host}/${hit._source.entity_type}/${hit._source.fqdn}`,
value: `#${entityType}/${hit._source.name}`,
link: `${document.location.protocol}//${document.location.host}/${entityType}/${hit._source.fqdn}`,
};
});
} else {
const data = await getSuggestions(searchTerm);
const hits = data.data.suggest['table-suggest'][0]['options'];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
hashValues = hits.map((hit: any) => {
const entityType = hit._source.entity_type;

return {
id: hit._id,
value: `#${hit._source.name}`,
link: `${document.location.protocol}//${document.location.host}/${hit._source.entity_type}/${hit._source.fqdn}`,
value: `#${entityType}/${hit._source.name}`,
link: `${document.location.protocol}//${document.location.host}/${entityType}/${hit._source.fqdn}`,
};
});
}
Expand Down
18 changes: 12 additions & 6 deletions openmetadata-ui/src/main/resources/ui/src/utils/TableUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,18 @@ export const getTableTestsValue = (tableTestCase: TableTest[]) => {
<p>{`${failingTests.length}/${tableTestLength} tests failing`}</p>
</div>
) : (
<div className="tw-flex">
<div className="tw-mr-2">
<i className="fas fa-check-square tw-text-status-success" />
</div>
<p>{`${passingTests.length} tests`}</p>
</div>
<Fragment>
{passingTests.length ? (
<div className="tw-flex">
<div className="tw-mr-2">
<i className="fas fa-check-square tw-text-status-success" />
</div>
<p>{`${passingTests.length} tests`}</p>
</div>
) : (
<p>{`${tableTestLength} tests`}</p>
)}
</Fragment>
)}
</Fragment>
) : null}
Expand Down