UI :- Fix announcement card, overflow, no search placeholder (#7323)

* Fix announcement card, overflow, no search placeholder

* announcement badge left alignment as per task

* decrease opacity of noData in search filter
This commit is contained in:
Ashish Gupta 2022-09-08 14:13:07 +05:30 committed by GitHub
parent 72374f449e
commit 27f94e45ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 30 additions and 15 deletions

View File

@ -164,7 +164,7 @@ const ActivityFeedCard: FC<ActivityFeedCardProp> = ({
<div <div
className={classNames( className={classNames(
className, className,
'hover:tw-bg-gray-100 tw--mx-2.5 tw-px-2.5 tw--mt-1 tw-py-1 tw-mb-1 tw-rounded', 'hover:tw-bg-gray-100 tw--mx-2.5 tw-px-2.5 tw--mt-1 tw-py-2 tw-mb-1 tw-rounded',
{ {
'tw-bg-gray-100': visible, 'tw-bg-gray-100': visible,
} }

View File

@ -136,7 +136,7 @@ const FeedListBody: FC<FeedListBodyProp> = ({
style={{ style={{
...leftPanelAntCardStyle, ...leftPanelAntCardStyle,
marginTop: '20px', marginTop: '20px',
paddingTop: isTask ? '8px' : '', paddingTop: isTask || isAnnouncement ? '8px' : '',
border: isTask border: isTask
? `1px solid ${TASK_BORDER}` ? `1px solid ${TASK_BORDER}`
: isAnnouncement : isAnnouncement

View File

@ -98,6 +98,7 @@ const AnnouncementThreads: FC<ActivityThreadListProp> = ({
style={{ style={{
...leftPanelAntCardStyle, ...leftPanelAntCardStyle,
marginTop: '20px', marginTop: '20px',
paddingTop: '8px',
border: `1px solid ${ANNOUNCEMENT_BORDER}`, border: `1px solid ${ANNOUNCEMENT_BORDER}`,
background: `${ANNOUNCEMENT_BG}`, background: `${ANNOUNCEMENT_BG}`,
}}> }}>

View File

@ -1,38 +1,39 @@
@background: #fcf6fc; @background: #fcf6fc;
@border: #b02aac99; @border: #b02aac99;
@text: #b02aac; @text: #b02aac;
@primary: #7147e8;
.announcement-badge-container { .announcement-badge-container {
position: absolute; position: absolute;
top: -11px; top: -12px;
left: 10px; left: 16px;
background: @background; background: @background;
border-radius: 4px; border-radius: 4px;
border: 1px solid @border; border: 1px solid @border;
padding: 2px 8px; padding: 0 8px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.announcement-badge { .announcement-badge {
width: 12px; width: 14px;
height: 12px; height: 14px;
background: @background; background: @background;
} }
.announcement-content { .announcement-content {
font-size: 10px; font-size: 12px;
margin-left: 5px; margin-left: 5px;
color: @text; color: @text;
font-weight: 600; font-weight: 500;
} }
.task-badge { .task-badge {
background: #f1edfd; background: #f1edfd;
border: 1px solid #c6b5f6; border: 1px solid #c6b5f6;
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.06); box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.06);
border-radius: 2px; border-radius: 4px;
color: @text; color: @primary;
font-size: 12px; font-size: 12px;
} }

View File

@ -11,7 +11,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { Empty, Select } from 'antd'; import { Select, Typography } from 'antd';
import { AxiosError } from 'axios'; import { AxiosError } from 'axios';
import { isEmpty } from 'lodash'; import { isEmpty } from 'lodash';
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
@ -27,6 +27,7 @@ import SVGIcons, { Icons } from '../../../utils/SvgUtils';
import { getEntityLink } from '../../../utils/TableUtils'; import { getEntityLink } from '../../../utils/TableUtils';
import { showErrorToast } from '../../../utils/ToastUtils'; import { showErrorToast } from '../../../utils/ToastUtils';
import CmdKIcon from '../../common/CmdKIcon/CmdKIcon.component'; import CmdKIcon from '../../common/CmdKIcon/CmdKIcon.component';
import ErrorPlaceHolder from '../../common/error-with-placeholder/ErrorPlaceHolder';
import Loader from '../../Loader/Loader'; import Loader from '../../Loader/Loader';
import { import {
DashboardSource, DashboardSource,
@ -319,7 +320,15 @@ const GlobalSearchSuggestions = ({
listHeight={220} listHeight={220}
notFoundContent={ notFoundContent={
<div className="tw-flex tw-flex-col tw-w-full tw-h-56 tw-items-center tw-justify-center tw-pb-9"> <div className="tw-flex tw-flex-col tw-w-full tw-h-56 tw-items-center tw-justify-center tw-pb-9">
{isSuggestionsLoading ? <Loader size="small" /> : <Empty />} {isSuggestionsLoading ? (
<Loader size="small" />
) : (
<ErrorPlaceHolder classes="tw-mt-0 opacity-60">
<Typography.Text className="tw-text-sm tw-grey-body ">
No Data Available
</Typography.Text>
</ErrorPlaceHolder>
)}
</div> </div>
} }
open={!isEmpty(value)} open={!isEmpty(value)}

View File

@ -70,7 +70,7 @@ const ErrorPlaceHolder = ({
</div> </div>
</> </>
) : ( ) : (
<div className={`${classes} flex-center flex-col mt-24 w-full`}> <div className={`${classes} flex-center flex-col w-full mt-24`}>
<div data-testid="error"> <div data-testid="error">
<img <img
data-testid="no-data-image" data-testid="no-data-image"

View File

@ -226,7 +226,7 @@ const NavBar = ({
return ( return (
<> <>
<div className="tw-h-16 tw-py-3 tw-border-b-2 tw-border-separator"> <div className="tw-h-16 tw-py-3 tw-border-b-2 tw-border-separator">
<div className="tw-flex tw-items-center tw-flex-row tw-justify-between tw-flex-nowrap tw-px-6 centered-layout"> <div className="tw-flex tw-items-center tw-flex-row tw-justify-between tw-flex-nowrap tw-px-6">
<div className="tw-flex tw-items-center tw-flex-row tw-justify-between tw-flex-nowrap"> <div className="tw-flex tw-items-center tw-flex-row tw-justify-between tw-flex-nowrap">
<NavLink className="tw-flex-shrink-0" id="openmetadata_logo" to="/"> <NavLink className="tw-flex-shrink-0" id="openmetadata_logo" to="/">
<SVGIcons alt="OpenMetadata Logo" icon={Icons.LOGO} width="90" /> <SVGIcons alt="OpenMetadata Logo" icon={Icons.LOGO} width="90" />

View File

@ -63,3 +63,7 @@
.mt-24 { .mt-24 {
margin-top: 6rem; margin-top: 6rem;
} }
.opacity-60 {
opacity: 0.6;
}