diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/announcements-primary.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/announcements-primary.svg new file mode 100644 index 00000000000..e8cb79dd06d --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/announcements-primary.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-all-application-primary.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-all-application-primary.svg new file mode 100644 index 00000000000..a5c70be18e9 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-all-application-primary.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-comment-grey-primary.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-comment-grey-primary.svg new file mode 100644 index 00000000000..6d96431f6f2 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-comment-grey-primary.svg @@ -0,0 +1,4 @@ + + + + diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-folder-primary.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-folder-primary.svg new file mode 100644 index 00000000000..c47e9935773 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-folder-primary.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-mentions-primary.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-mentions-primary.svg new file mode 100644 index 00000000000..c4f483ae8a7 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-mentions-primary.svg @@ -0,0 +1,3 @@ + + + diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-star-primary.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-star-primary.svg new file mode 100644 index 00000000000..2b6ec1ddee0 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-star-primary.svg @@ -0,0 +1,3 @@ + + + diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-task-primary.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-task-primary.svg new file mode 100644 index 00000000000..7e833012258 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-task-primary.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.interface.ts index 6361904dbcc..4ef2dc74afa 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.interface.ts @@ -27,6 +27,7 @@ export interface ActivityFeedListProp extends HTMLAttributes { hideFeedFilter?: boolean; hideThreadFilter?: boolean; refreshFeedCount?: number; + stickyFilter?: boolean; onRefreshFeeds?: () => void; postFeedHandler?: (value: string, id: string) => void; deletePostHandler?: ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.less b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.less new file mode 100644 index 00000000000..960837f69cb --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.less @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Collate + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@import url('../../../styles/variables.less'); +@filters-container-bg: #f8f9fa; + +.feed-list-container { + .ant-btn-link { + padding: 0px; + } + + .dropdown-icon { + fill: @primary-color; + } + + .filters-container { + position: sticky; + top: 0; + padding: 0px; + z-index: 10; + border-bottom: 1px solid @border-color; + } + + // Wrapper to hide the shadows of feed cards while scrolling + .filters-wrapper { + position: sticky; + top: 0; + margin-left: -8px; + margin-right: -8px; + z-index: 10; + background-color: @filters-container-bg; + } +} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.tsx index 623d4c6e6dc..3f8bd1d694a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.tsx @@ -11,33 +11,32 @@ * limitations under the License. */ +import { Button, Col, Row, Typography } from 'antd'; import classNames from 'classnames'; import { isUndefined } from 'lodash'; -import React, { - FC, - Fragment, - useCallback, - useEffect, - useMemo, - useState, -} from 'react'; +import React, { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { confirmStateInitialValue } from '../../../constants/feed.constants'; import { FeedFilter } from '../../../enums/mydata.enum'; import { Thread, ThreadType } from '../../../generated/entity/feed/thread'; import { withLoader } from '../../../hoc/withLoader'; import { getFeedListWithRelativeDays } from '../../../utils/FeedUtils'; import { dropdownIcon as DropDownIcon } from '../../../utils/svgconstant'; -import SVGIcons, { Icons } from '../../../utils/SvgUtils'; -import { Button } from '../../buttons/Button/Button'; +import ErrorPlaceHolder from '../../common/error-with-placeholder/ErrorPlaceHolder'; import DropDownList from '../../dropdown/DropDownList'; import { ConfirmState } from '../ActivityFeedCard/ActivityFeedCard.interface'; import ActivityFeedPanel from '../ActivityFeedPanel/ActivityFeedPanel'; import DeleteConfirmationModal from '../DeleteConfirmationModal/DeleteConfirmationModal'; import NoFeedPlaceholder from '../NoFeedPlaceholder/NoFeedPlaceholder'; import { ActivityFeedListProp } from './ActivityFeedList.interface'; -import { filterList, threadFilterList } from './ActivityFeedList.util'; +import './ActivityFeedList.less'; +import { + filterList, + getFeedFilterDropdownIcon, + getThreadFilterDropdownIcon, + threadFilterList, +} from './ActivityFeedList.util'; import FeedListBody from './FeedListBody'; -import FeedListSeparator from './FeedListSeparator'; const ActivityFeedList: FC = ({ className, @@ -53,7 +52,9 @@ const ActivityFeedList: FC = ({ onFeedFiltersUpdate, hideFeedFilter, hideThreadFilter, + stickyFilter, }) => { + const { t } = useTranslation(); const { updatedFeedList, relativeDays } = getFeedListWithRelativeDays(feedList); const [selectedThread, setSelectedThread] = useState(); @@ -148,67 +149,68 @@ const ActivityFeedList: FC = ({ const getFilterDropDown = () => { return hideFeedFilter && hideThreadFilter ? null : ( -
+ {/* Feed filter */} - {!hideFeedFilter && ( -
- - {fieldListVisible && ( - - )} -
- )} + + {!hideFeedFilter && ( + <> + + {fieldListVisible && ( + + )} + + )} + {/* Thread filter */} - {!hideThreadFilter && ( -
- - {showThreadTypeList && ( - - )} -
- )} -
+ + {!hideThreadFilter && ( + <> + + {showThreadTypeList && ( + + )} + + )} + + ); }; @@ -230,10 +232,12 @@ const ActivityFeedList: FC = ({ }, []); return ( -
- {feedList.length === 0 && feedFilter === FeedFilter.ALL && !threadType - ? null - : getFilterDropDown()} +
+
+ {feedList.length === 0 && feedFilter === FeedFilter.ALL && !threadType + ? null + : getFilterDropDown()} +
{refreshFeedCount ? (
) : null} {feedList.length > 0 ? ( - + <> {relativeDays.map((d, i) => { return (
@@ -266,7 +270,7 @@ const ActivityFeedList: FC = ({ ); })} {withSidePanel && selectedThread && isPanelOpen ? ( - + <> = ({ updateThreadHandler={updateThreadHandler} onCancel={onCancel} /> - + ) : null} - + ) : ( - + <> {entityName && feedFilter === FeedFilter.ALL && !threadType ? ( ) : !refreshFeedCount ? ( - - - <>No conversations found. Try changing the filter. - + + {t('message.no-data-available-for-selected-filter')} + ) : null} - + )} {confirmationState.state && ( { + switch (feedfilter) { + case FeedFilter.OWNER: + return ( + + ); + + case FeedFilter.MENTIONS: + return ( + + ); + + case FeedFilter.FOLLOWS: + return ( + + ); + + case FeedFilter.ALL: + default: + return ( + + ); + } +}; + +export const getThreadFilterDropdownIcon = (threadType: ThreadType | 'ALL') => { + switch (threadType) { + case ThreadType.Announcement: + return ( + + ); + + case ThreadType.Conversation: + return ( + + ); + + case ThreadType.Task: + return ( + + ); + + case 'ALL': + default: + return ( + + ); + } +}; + export const filterList = [ { name: 'All Activity', @@ -8,7 +100,7 @@ export const filterList = [ icon: ( @@ -20,7 +112,7 @@ export const filterList = [ icon: ( @@ -32,7 +124,7 @@ export const filterList = [ icon: ( @@ -44,7 +136,7 @@ export const filterList = [ icon: ( @@ -59,7 +151,7 @@ export const threadFilterList = [ icon: ( @@ -69,7 +161,7 @@ export const threadFilterList = [ name: 'Task', value: 'Task', icon: ( - + ), }, { @@ -78,7 +170,7 @@ export const threadFilterList = [ icon: ( @@ -90,7 +182,7 @@ export const threadFilterList = [ icon: ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/FeedListBody.less b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/FeedListBody.less new file mode 100644 index 00000000000..76a0074c11c --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/FeedListBody.less @@ -0,0 +1,33 @@ +/* + * Copyright 2022 Collate + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@task-card-border: #c6b5f6; +@announcement-card-border: #b02aac99; +@announcement-background-color: #fcf6fc; +@feed-card-border-color: #dde3ea; +@feed-card-shadow-color: #0000000f; + +.ant-card-feed { + border: 1px solid @feed-card-border-color; + border-radius: 4px; + box-shadow: 1px 1px 8px @feed-card-shadow-color; +} + +.task-feed-card { + border: 1px solid @task-card-border; +} + +.announcement-feed-card { + border: 1px solid @announcement-card-border; + background-color: @announcement-background-color; +} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/FeedListBody.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/FeedListBody.tsx index 2270659e481..eb110b83651 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/FeedListBody.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/FeedListBody.tsx @@ -12,14 +12,10 @@ */ import { Card } from 'antd'; +import classNames from 'classnames'; import { isEqual } from 'lodash'; import React, { FC, Fragment } from 'react'; import { useHistory } from 'react-router-dom'; -import { - ANNOUNCEMENT_BG, - ANNOUNCEMENT_BORDER, - TASK_BORDER, -} from '../../../constants/feed.constants'; import { Post, ThreadTaskStatus, @@ -27,13 +23,13 @@ import { } from '../../../generated/entity/feed/thread'; import { getTaskDetailPath } from '../../../utils/TasksUtils'; import AssigneeList from '../../common/AssigneeList/AssigneeList'; -import { leftPanelAntCardStyle } from '../../containers/PageLayout'; import ActivityFeedCard from '../ActivityFeedCard/ActivityFeedCard'; import FeedCardFooter from '../ActivityFeedCard/FeedCardFooter/FeedCardFooter'; import ActivityFeedEditor from '../ActivityFeedEditor/ActivityFeedEditor'; import AnnouncementBadge from '../Shared/AnnouncementBadge'; import TaskBadge from '../Shared/TaskBadge'; import { FeedListBodyProp } from './ActivityFeedList.interface'; +import './FeedListBody.less'; const FeedListBody: FC = ({ updatedFeedList, @@ -131,19 +127,16 @@ const FeedListBody: FC = ({ return ( feed.task && handleCardClick(feed.task.id, isTask) }> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/MyData.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MyData/MyData.component.tsx index 1c8dc7e28b7..9dc7dcd7e36 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/MyData.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/MyData.component.tsx @@ -228,6 +228,7 @@ const MyData: React.FC = ({ {feedData?.length > 0 || !filtersApplied || newFeedsLength ? ( <> = ({ case Icons.ANNOUNCEMENT_BLACK: IconComponent = IconAnnouncementsBlack; + break; + case Icons.ANNOUNCEMENT_PRIMARY: + IconComponent = IconAnnouncementsPrimary; + break; case Icons.REQUEST: IconComponent = IconRequest; @@ -993,26 +1011,50 @@ const SVGIcons: FunctionComponent = ({ case Icons.TASK: IconComponent = IconTask; + break; + case Icons.TASK_PRIMARY: + IconComponent = IconTaskPrimary; + break; case Icons.ALL_APPLICATION: IconComponent = IconAllApplication; + break; + case Icons.ALL_APPLICATION_PRIMARY: + IconComponent = IconAllApplicationPrimary; + break; case Icons.FOLDER: IconComponent = IconFolder; + break; + case Icons.FOLDER_PRIMARY: + IconComponent = IconFolderPrimary; + break; case Icons.STAR: IconComponent = IconStar; + break; + case Icons.STAR_PRIMARY: + IconComponent = IconStarPrimary; + break; case Icons.MENTIONS: IconComponent = IconMentions; + break; + case Icons.MENTIONS_PRIMARY: + IconComponent = IconMentionsPrimary; + break; case Icons.COMMENT_GREY: IconComponent = IconCommentGrey; + break; + case Icons.COMMENT_PRIMARY: + IconComponent = IconCommentPrimary; + break; case Icons.TASK_CLOSED: IconComponent = IconTaskClose; diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/svgconstant.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/svgconstant.tsx index 005be33456b..c54871a0753 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/svgconstant.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/svgconstant.tsx @@ -12,14 +12,21 @@ */ /* eslint-disable max-len */ +import classNames from 'classnames'; import React, { CSSProperties } from 'react'; import { TEXT_BODY_COLOR } from '../constants/constants'; -export const dropdownIcon = ({ style }: { style?: CSSProperties }) => { +export const dropdownIcon = ({ + className, + style, +}: { + className?: string; + style?: CSSProperties; +}) => { return (