Minor UI Changes (#3222)

This commit is contained in:
Sachin Chaurasiya 2022-03-07 21:56:40 +05:30 committed by GitHub
parent 197b0a83e8
commit b4118c7863
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 106 additions and 69 deletions

View File

@ -1,6 +1,6 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.916 8.15268C12.916 8.44395 12.6799 8.68002 12.3887 8.68002C12.0975 8.68002 11.8613 8.44395 11.8613 8.15268C11.8613 7.86154 12.0975 7.62534 12.3887 7.62534C12.6799 7.62534 12.916 7.86154 12.916 8.15268Z" fill="#6b7280"/>
<path d="M12.388 2.54181C11.3176 2.54181 10.4492 3.40808 10.4492 4.48062V4.48131C10.4492 4.77245 10.6853 5.00838 10.9766 5.00838C11.2678 5.00838 11.5039 4.7719 11.5039 4.48062C11.5039 3.9931 11.8982 3.5965 12.3887 3.5965C12.8765 3.5965 13.2734 3.99338 13.2734 4.48131C13.2734 4.9691 12.8765 5.36598 12.3887 5.36598C12.0974 5.36598 11.8614 5.60219 11.8614 5.89333V6.45816C11.8614 6.74944 12.0974 6.9855 12.3887 6.9855C12.6799 6.9855 12.9161 6.74944 12.9161 6.45816V6.34789C13.73 6.11758 14.3281 5.3679 14.3281 4.48131C14.3281 3.41179 13.4581 2.54181 12.388 2.54181V2.54181Z" fill="#6b7280"/>
<path d="M5.0603 13.4583C5.71564 12.9479 6.13834 12.1523 6.13834 11.2593C6.13834 9.72276 4.88809 8.47266 3.35152 8.47266C1.81494 8.47266 0.564835 9.72276 0.564835 11.2593C0.564835 12.1523 0.987534 12.9479 1.64273 13.4583C0.717957 14.0084 0 15.0474 0 16.343V17.4727C0 17.7639 0.236069 18 0.527344 18H6.17583C6.46696 18 6.70317 17.7639 6.70317 17.4727V16.343C6.70317 15.0477 5.98535 14.0085 5.0603 13.4583ZM1.61952 11.2593C1.61952 10.3044 2.39653 9.52734 3.35165 9.52734C4.30664 9.52734 5.08365 10.3044 5.08365 11.2593C5.08365 12.2145 4.30664 12.9915 3.35165 12.9915C2.39653 12.9915 1.61952 12.2145 1.61952 11.2593ZM5.64848 16.9453H1.05469V16.343C1.05469 15.0743 2.08109 14.0462 3.35152 14.0462C4.62016 14.0462 5.64835 15.0726 5.64835 16.343V16.9453H5.64848Z" fill="#6b7280"/>
<path d="M15.7783 0H9.00017C7.77299 0 6.77832 0.992889 6.77832 2.22185V12.389C6.77832 12.8204 7.27298 13.0726 7.62207 12.8109L9.74078 11.2218H15.7783C17.0055 11.2218 18.0002 10.229 18.0002 9V2.22185C18.0002 0.994675 17.0073 0 15.7783 0V0ZM16.9455 9C16.9455 9.64517 16.4238 10.1672 15.7783 10.1672H9.565C9.45088 10.1672 9.33992 10.2042 9.2486 10.2726L7.83301 11.3343V2.22185C7.83301 1.57668 8.35472 1.05469 9.00017 1.05469H15.7783C16.4235 1.05469 16.9455 1.5764 16.9455 2.22185V9Z" fill="#6b7280"/>
<path d="M12.916 8.15268C12.916 8.44395 12.6799 8.68002 12.3887 8.68002C12.0975 8.68002 11.8613 8.44395 11.8613 8.15268C11.8613 7.86154 12.0975 7.62534 12.3887 7.62534C12.6799 7.62534 12.916 7.86154 12.916 8.15268Z" fill="#7147E8"/>
<path d="M12.388 2.54181C11.3176 2.54181 10.4492 3.40808 10.4492 4.48062V4.48131C10.4492 4.77245 10.6853 5.00838 10.9766 5.00838C11.2678 5.00838 11.5039 4.7719 11.5039 4.48062C11.5039 3.9931 11.8982 3.5965 12.3887 3.5965C12.8765 3.5965 13.2734 3.99338 13.2734 4.48131C13.2734 4.9691 12.8765 5.36598 12.3887 5.36598C12.0974 5.36598 11.8614 5.60219 11.8614 5.89333V6.45816C11.8614 6.74944 12.0974 6.9855 12.3887 6.9855C12.6799 6.9855 12.9161 6.74944 12.9161 6.45816V6.34789C13.73 6.11758 14.3281 5.3679 14.3281 4.48131C14.3281 3.41179 13.4581 2.54181 12.388 2.54181V2.54181Z" fill="#7147E8"/>
<path d="M5.0603 13.4583C5.71564 12.9479 6.13834 12.1523 6.13834 11.2593C6.13834 9.72276 4.88809 8.47266 3.35152 8.47266C1.81494 8.47266 0.564835 9.72276 0.564835 11.2593C0.564835 12.1523 0.987534 12.9479 1.64273 13.4583C0.717957 14.0084 0 15.0474 0 16.343V17.4727C0 17.7639 0.236069 18 0.527344 18H6.17583C6.46696 18 6.70317 17.7639 6.70317 17.4727V16.343C6.70317 15.0477 5.98535 14.0085 5.0603 13.4583ZM1.61952 11.2593C1.61952 10.3044 2.39653 9.52734 3.35165 9.52734C4.30664 9.52734 5.08365 10.3044 5.08365 11.2593C5.08365 12.2145 4.30664 12.9915 3.35165 12.9915C2.39653 12.9915 1.61952 12.2145 1.61952 11.2593ZM5.64848 16.9453H1.05469V16.343C1.05469 15.0743 2.08109 14.0462 3.35152 14.0462C4.62016 14.0462 5.64835 15.0726 5.64835 16.343V16.9453H5.64848Z" fill="#7147E8"/>
<path d="M15.7783 0H9.00017C7.77299 0 6.77832 0.992889 6.77832 2.22185V12.389C6.77832 12.8204 7.27298 13.0726 7.62207 12.8109L9.74078 11.2218H15.7783C17.0055 11.2218 18.0002 10.229 18.0002 9V2.22185C18.0002 0.994675 17.0073 0 15.7783 0V0ZM16.9455 9C16.9455 9.64517 16.4238 10.1672 15.7783 10.1672H9.565C9.45088 10.1672 9.33992 10.2042 9.2486 10.2726L7.83301 11.3343V2.22185C7.83301 1.57668 8.35472 1.05469 9.00017 1.05469H15.7783C16.4235 1.05469 16.9455 1.5764 16.9455 2.22185V9Z" fill="#7147E8"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -107,6 +107,7 @@ const FeedListBody: FC<FeedListBodyProp> = ({
/>
{postLength > 0 ? (
<Fragment>
{postLength > 1 ? (
<div className="tw-mb-6">
<div className="tw-ml-9 tw-flex tw-mb-6">
<FeedFooter
@ -124,6 +125,7 @@ const FeedListBody: FC<FeedListBodyProp> = ({
/>
</div>
</div>
) : null}
<ActivityFeedCard
className="tw-mb-6 tw-ml-9"
feed={lastPost}

View File

@ -105,6 +105,7 @@ const ActivityThreadList: FC<ActivityThreadListProp> = ({
/>
{postLength > 0 ? (
<Fragment>
{postLength > 1 ? (
<div className="tw-mb-6">
<div className="tw-ml-9 tw-flex tw-mb-6">
<FeedFooter
@ -118,6 +119,7 @@ const ActivityThreadList: FC<ActivityThreadListProp> = ({
/>
</div>
</div>
) : null}
<ActivityFeedCard
isEntityFeed
className="tw-mb-6 tw-ml-9"

View File

@ -396,12 +396,18 @@ const EntityTable = ({
</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>
) : (
@ -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`
)
}>
<PopOver
position="top"
title="Request description"
trigger="mouseenter">
<SVGIcons
alt="request-description"
icon={Icons.REQUEST}
width="20px"
width="22px"
/>
</PopOver>
</button>
) : null}
{getFieldThreadElement(

View File

@ -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';
@ -472,11 +473,16 @@ const PipelineDetails = ({
`tasks/${task.name}/description`
)
}>
<PopOver
position="top"
title="Request description"
trigger="mouseenter">
<SVGIcons
alt="request-description"
icon={Icons.REQUEST}
width="20px"
width="22px"
/>
</PopOver>
</button>
) : null}
{getFieldThreadElement(

View File

@ -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}%` }}

View File

@ -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 = {
@ -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')}>
<PopOver
position="top"
title="Request description"
trigger="mouseenter">
<SVGIcons
alt="request-description"
icon={Icons.REQUEST}
width="20px"
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)
}>

View File

@ -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}`,
@ -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}`,
@ -174,10 +174,12 @@ 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 {
@ -185,10 +187,12 @@ export async function suggestions(searchTerm: string, mentionChar: string) {
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}`,
};
});
}

View File

@ -315,12 +315,18 @@ export const getTableTestsValue = (tableTestCase: TableTest[]) => {
<p>{`${failingTests.length}/${tableTestLength} tests failing`}</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}