-
-
-
- {t('label.suggested-by')}
-
-
-
-
-
-
-
- {hasEditAccess && (
-
- }
- size="small"
- type="primary"
- onClick={() =>
- acceptRejectSuggestion(suggestion, SuggestionAction.Reject)
- }
- />
- }
- size="small"
- type="primary"
- onClick={() =>
- acceptRejectSuggestion(suggestion, SuggestionAction.Accept)
- }
- />
-
+
+
+
+
+
+
+ {showSuggestedBy && (
+ <>
+
+
+ {t('label.suggested-by')}
+
+
+
+
+
+
+ >
)}
-
-
+
+ {hasEditAccess && (
+
+ }
+ size="small"
+ type="primary"
+ onClick={() =>
+ acceptRejectSuggestion(suggestion, SuggestionAction.Reject)
+ }
+ />
+ }
+ size="small"
+ type="primary"
+ onClick={() =>
+ acceptRejectSuggestion(suggestion, SuggestionAction.Accept)
+ }
+ />
+
+ )}
+
+
);
};
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Suggestions/SuggestionsProvider/SuggestionsProvider.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Suggestions/SuggestionsProvider/SuggestionsProvider.interface.ts
index 2095bbd350f..6537b0ddf21 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Suggestions/SuggestionsProvider/SuggestionsProvider.interface.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Suggestions/SuggestionsProvider/SuggestionsProvider.interface.ts
@@ -24,7 +24,7 @@ export interface SuggestionsContextType {
loadingAccept: boolean;
loadingReject: boolean;
allSuggestionsUsers: EntityReference[];
- onUpdateActiveUser: (user: EntityReference) => void;
+ onUpdateActiveUser: (user?: EntityReference) => void;
fetchSuggestions: (entityFqn: string) => void;
acceptRejectSuggestion: (
suggestion: Suggestion,
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Suggestions/SuggestionsProvider/SuggestionsProvider.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Suggestions/SuggestionsProvider/SuggestionsProvider.tsx
index 0b13e57e66a..05e8f4b87e0 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Suggestions/SuggestionsProvider/SuggestionsProvider.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Suggestions/SuggestionsProvider/SuggestionsProvider.tsx
@@ -119,7 +119,7 @@ const SuggestionsProvider = ({ children }: { children?: ReactNode }) => {
);
const onUpdateActiveUser = useCallback(
- (user: EntityReference) => {
+ (user?: EntityReference) => {
setActiveUser(user);
},
[suggestionsByUser]
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Suggestions/SuggestionsSlider/SuggestionsSlider.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Suggestions/SuggestionsSlider/SuggestionsSlider.tsx
index 94eb966d19a..810b49e81df 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Suggestions/SuggestionsSlider/SuggestionsSlider.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Suggestions/SuggestionsSlider/SuggestionsSlider.tsx
@@ -10,7 +10,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { Button, Typography } from 'antd';
+import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
+import { Button, Space, Typography } from 'antd';
import { t } from 'i18next';
import React from 'react';
import { SuggestionType } from '../../../generated/entity/feed/suggestion';
@@ -24,6 +25,7 @@ const SuggestionsSlider = () => {
acceptRejectAllSuggestions,
loadingAccept,
loadingReject,
+ onUpdateActiveUser,
} = useSuggestionsContext();
return (
@@ -33,11 +35,13 @@ const SuggestionsSlider = () => {
{selectedUserSuggestions.length > 0 && (
- <>
+
}
loading={loadingAccept}
- size="small"
type="primary"
onClick={() =>
acceptRejectAllSuggestions(
@@ -45,15 +49,14 @@ const SuggestionsSlider = () => {
SuggestionAction.Accept
)
}>
-
- {t('label.accept-all')}
-
+ {t('label.accept-all')}
}
loading={loadingReject}
- size="small"
type="primary"
onClick={() =>
acceptRejectAllSuggestions(
@@ -61,11 +64,18 @@ const SuggestionsSlider = () => {
SuggestionAction.Reject
)
}>
-
- {t('label.reject-all')}
-
+ {t('label.reject-all')}
- >
+ }
+ type="primary"
+ onClick={() => onUpdateActiveUser()}>
+ {t('label.close')}
+
+
)}
);
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/AvatarCarousel/AvatarCarousel.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/AvatarCarousel/AvatarCarousel.test.tsx
index 8c74fd23c21..9edf8baf92e 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/AvatarCarousel/AvatarCarousel.test.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/AvatarCarousel/AvatarCarousel.test.tsx
@@ -10,7 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { fireEvent, render, screen } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import React from 'react';
import AvatarCarousel from './AvatarCarousel';
@@ -35,6 +35,7 @@ jest.mock('../../Suggestions/SuggestionsProvider/SuggestionsProvider', () => ({
{ id: '2', name: 'Avatar 2', type: 'user' },
],
acceptRejectSuggestion: jest.fn(),
+ selectedUserSuggestions: [],
onUpdateActiveUser: jest.fn(),
})),
__esModule: true,
@@ -70,19 +71,10 @@ jest.mock('../../../rest/suggestionsAPI', () => ({
describe('AvatarCarousel', () => {
it('renders without crashing', () => {
- render(
-
}
- size="small"
- type="text"
- onClick={prevSlide}
- />
+ {showArrows && (
+
}
+ size="small"
+ type="text"
+ onClick={prevSlide}
+ />
+ )}
+
setCurrentSlide(current)}
dots={false}
slidesToShow={avatarList.length < 3 ? avatarList.length : 3}>
- {avatarList.map((avatar, index) => (
-
+ {avatarList.map((avatar, index) => {
+ const isActive = currentSlide === index;
+
+ const button = (
-
- ))}
+ );
+
+ return (
+
+ {isActive ? ( // Show Badge only for active item
+ {button}
+ ) : (
+ button
+ )}
+
+ );
+ })}
-
}
- size="small"
- type="text"
- onClick={nextSlide}
- />
+
+ {showArrows && (
+
}
+ size="small"
+ type="text"
+ onClick={nextSlide}
+ />
+ )}
);
};
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/AvatarCarousel/avatar-carousel.less b/openmetadata-ui/src/main/resources/ui/src/components/common/AvatarCarousel/avatar-carousel.less
index ff03595271c..a3059609a85 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/AvatarCarousel/avatar-carousel.less
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/AvatarCarousel/avatar-carousel.less
@@ -13,20 +13,42 @@
@import url('../../../styles/variables.less');
.avatar-item {
- opacity: 0.4;
- &.active {
- opacity: 1;
- }
+ position: relative;
&:hover {
border-color: @border-color !important;
}
&:focus {
border-color: @border-color !important;
}
+ &.ant-btn {
+ width: 28px;
+ height: 28px;
+ min-width: 28px;
+ }
}
.avatar-carousel-container {
.slick-slide {
width: 32px !important;
}
+ .slick-list {
+ overflow: visible !important;
+ }
+ .ant-badge-count {
+ right: 4px;
+ background-color: @red-3;
+ }
+}
+
+.slider-btn-container {
+ .ant-btn {
+ padding: 0 10px;
+ height: 30px;
+ }
+ .ant-btn.exit-suggestion {
+ color: @grey-4;
+ border-color: @grey-4;
+ padding: 0;
+ width: 30px;
+ }
}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/EntityDescription/DescriptionV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/EntityDescription/DescriptionV1.tsx
index c5a840bc16f..864fd2e40fa 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/EntityDescription/DescriptionV1.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/EntityDescription/DescriptionV1.tsx
@@ -205,7 +205,7 @@ const DescriptionV1 = ({
data-testid="asset-description-container"
direction="vertical"
size={16}>
-