diff --git a/openmetadata-ui/src/main/resources/ui/playwright/browser-tests/reactions.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/browser-tests/reactions.spec.ts
index c5eb62b066c8..a94e9187b31c 100644
--- a/openmetadata-ui/src/main/resources/ui/playwright/browser-tests/reactions.spec.ts
+++ b/openmetadata-ui/src/main/resources/ui/playwright/browser-tests/reactions.spec.ts
@@ -15,6 +15,17 @@ import { build } from 'esbuild';
import { resolve } from 'path';
import { reactOnFeedCard } from '../utils/activityFeed';
+const PILL_ALIASES = [
+ '+1',
+ '-1',
+ 'smile',
+ 'tada',
+ 'thinking_face',
+ 'heart',
+ 'eyes',
+ 'rocket',
+];
+
const bundle = build({
stdin: {
contents: `import React, { useState } from 'react';
@@ -69,7 +80,7 @@ const bundle = build({
],
}).then((result) => result.outputFiles[0].text);
-test('every reaction can be selected and removed through the animated product popover', async ({
+test('every reaction can be selected through the animated popover and taken back through its pill', async ({
page,
}) => {
test.setTimeout(60_000);
@@ -102,9 +113,17 @@ test('every reaction can be selected and removed through the animated product po
await page.addScriptTag({ content: await bundle });
const card = page.getByTestId('card');
await reactOnFeedCard(page, card);
- await expect(card.getByTestId('emoji-button')).toHaveCount(8);
- await reactOnFeedCard(page, card);
- await expect(card.getByTestId('emoji-button')).toHaveCount(0);
+ const pills = card.getByTestId('emoji-button');
+ await expect(pills).toHaveCount(8);
+ await expect(card.getByTestId('add-reactions')).toBeHidden();
+ for (const alias of PILL_ALIASES) {
+ const pill = pills.filter({
+ has: page.locator(`g-emoji[alias="${alias}"]`),
+ });
+ await pill.click();
+ await expect(pill).toBeHidden();
+ }
+ await expect(pills).toHaveCount(0);
expect(operations).toEqual([
...[
'thumbsUp',
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/CommentCard.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/CommentCard.component.tsx
index b88a3f479ff6..ac8dc4a90972 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/CommentCard.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/CommentCard.component.tsx
@@ -15,10 +15,7 @@ import classNames from 'classnames';
import { lazy, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { Link } from 'react-router-dom';
import withSuspenseFallback from '../../../components/AppRouter/withSuspenseFallback';
-import {
- ReactionOperation,
- ReactionsVariant,
-} from '../../../enums/reactions.enum';
+import { ReactionOperation } from '../../../enums/reactions.enum';
import { EntityReference } from '../../../generated/entity/type';
import { Reaction, ReactionType } from '../../../generated/type/reaction';
import { useUserProfile } from '../../../hooks/user-profile/useUserProfile';
@@ -276,7 +273,6 @@ const CommentCard = ({
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/ActivityEventFooter.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/ActivityEventFooter.tsx
index 0ca2151e4cca..545feaef8366 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/ActivityEventFooter.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/ActivityEventFooter.tsx
@@ -18,10 +18,7 @@ import { noop } from 'lodash';
import { useCallback } from 'react';
import { PressEvent } from 'react-aria-components';
import { useTranslation } from 'react-i18next';
-import {
- ReactionOperation,
- ReactionsVariant,
-} from '../../../../enums/reactions.enum';
+import { ReactionOperation } from '../../../../enums/reactions.enum';
import { ActivityEvent } from '../../../../generated/entity/activity/activityEvent';
import { ReactionType } from '../../../../generated/type/reaction';
import { useActivityFeedProvider } from '../../ActivityFeedProvider/ActivityFeedProvider';
@@ -86,7 +83,6 @@ function ActivityEventFooter({
/>
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/FeedCardFooterNew.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/FeedCardFooterNew.tsx
index 5737f4c5b231..1d60c6fa7478 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/FeedCardFooterNew.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/FeedCardFooterNew.tsx
@@ -24,10 +24,7 @@ import {
} from 'react-aria-components';
import { useTranslation } from 'react-i18next';
import { FEED_FOOTER_AVATAR_SIZE } from '../../../../constants/Feeds.constants';
-import {
- ReactionOperation,
- ReactionsVariant,
-} from '../../../../enums/reactions.enum';
+import { ReactionOperation } from '../../../../enums/reactions.enum';
import { ReactionType } from '../../../../generated/type/reaction';
import UserPopOverCard from '../../../common/PopOverCard/UserPopOverCard';
import ProfilePicture from '../../../common/ProfilePicture/ProfilePicture';
@@ -157,7 +154,6 @@ function FeedCardFooterNew({
)}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/Reactions/Emoji.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/Reactions/Emoji.test.tsx
index 32ed7ea61cab..3fcb0ded9d08 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/Reactions/Emoji.test.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/Reactions/Emoji.test.tsx
@@ -12,7 +12,6 @@
*/
import { fireEvent, render, waitFor } from '@testing-library/react';
-import { ReactionsVariant } from '../../../enums/reactions.enum';
import { User } from '../../../generated/entity/teams/user';
import { ReactionType } from '../../../generated/type/reaction';
import Emoji from './Emoji';
@@ -105,9 +104,7 @@ describe('Test Emoji Component', () => {
// The Inbox's pill marks the viewer's own reaction with the brand tint.
it('Should tint the pill the viewer reacted with, and not another', async () => {
- const { findByTestId, rerender } = render(
-
- );
+ const { findByTestId, rerender } = render();
expect(await findByTestId('emoji-button')).toHaveClass(
'tw:rounded-full!',
@@ -123,7 +120,6 @@ describe('Test Emoji Component', () => {
user: { ...mockProps.reactionList[0].user, id: 'someone-else' },
},
]}
- variant={ReactionsVariant.Pill}
/>
);
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/Reactions/Emoji.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/Reactions/Emoji.tsx
index 324e66e1b4fc..c983f8f3b05d 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/Reactions/Emoji.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/Reactions/Emoji.tsx
@@ -17,47 +17,28 @@ import classNames from 'classnames';
import { createElement, FC, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { REACTION_LIST } from '../../../constants/reactions.constant';
-import {
- ReactionOperation,
- ReactionsVariant,
-} from '../../../enums/reactions.enum';
+import { ReactionOperation } from '../../../enums/reactions.enum';
import { Reaction, ReactionType } from '../../../generated/type/reaction';
import { useApplicationStore } from '../../../hooks/useApplicationStore';
import useImage from '../../../hooks/useImage';
import { getEntityName } from '../../../utils/EntityNameUtils';
-// How a chip is drawn in each variant: its shape, its colors once the viewer
-// has reacted with it, its colors otherwise, and its count.
-interface ChipClasses {
- shape: string;
- reacted: string;
- idle: string;
- count: string;
-}
-
-const CHIP_CLASSES: Record = {
- [ReactionsVariant.Default]: {
- shape: 'tw:h-[22px] tw:rounded-md! tw:px-2! tw:py-0!',
- reacted: 'tw:text-brand-secondary tw:after:outline-brand',
- idle: 'tw:text-secondary',
- count: 'tw:ml-1 tw:text-xs',
- },
- [ReactionsVariant.Pill]: {
- shape:
- 'tw:h-6.5 tw:rounded-full! tw:px-2! tw:py-0! tw:shadow-none tw:font-semibold tw:hover:after:outline-primary tw:[&_g-emoji]:text-sm',
- reacted:
- 'tw:bg-utility-brand-50 tw:hover:bg-utility-brand-50 tw:text-utility-brand-700 tw:hover:text-utility-brand-700 tw:after:outline-utility-brand-300',
- idle: 'tw:bg-primary tw:text-tertiary tw:hover:text-tertiary tw:after:outline-secondary',
- // The chip wraps emoji and count in one text span, so its gap never
- // reaches between them.
- count: 'tw:ml-1.25 tw:text-xs',
- },
+// How a chip is drawn: its shape, its colors once the viewer has reacted with
+// it, its colors otherwise, and its count.
+const CHIP_CLASSES = {
+ shape:
+ 'tw:h-6.5 tw:rounded-full! tw:px-2! tw:py-0! tw:shadow-none tw:font-semibold tw:hover:after:outline-primary tw:[&_g-emoji]:text-sm',
+ reacted:
+ 'tw:bg-utility-brand-50 tw:hover:bg-utility-brand-50 tw:text-utility-brand-700 tw:hover:text-utility-brand-700 tw:after:outline-utility-brand-300',
+ idle: 'tw:bg-primary tw:text-tertiary tw:hover:text-tertiary tw:after:outline-secondary',
+ // The chip wraps emoji and count in one text span, so its gap never
+ // reaches between them.
+ count: 'tw:ml-1.25 tw:text-xs',
};
interface EmojiProps {
reaction: ReactionType;
reactionList: Reaction[];
- variant?: ReactionsVariant;
onReactionSelect: (
reaction: ReactionType,
operation: ReactionOperation
@@ -67,7 +48,6 @@ interface EmojiProps {
const Emoji: FC = ({
reaction,
reactionList,
- variant = ReactionsVariant.Default,
onReactionSelect,
}) => {
const { t } = useTranslation();
@@ -143,8 +123,8 @@ const Emoji: FC = ({