From f6be261687ae270e9edb6b6f1b246fa9bd670548 Mon Sep 17 00:00:00 2001 From: yash-rajpal Date: Wed, 17 Sep 2025 10:13:57 +0530 Subject: [PATCH 1/8] chore: move quick reactions out of feature preview --- .../items/actions/ReactionMessageAction.tsx | 9 +++------ .../ui-client/src/hooks/useFeaturePreviewList.ts | 16 +--------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/apps/meteor/client/components/message/toolbar/items/actions/ReactionMessageAction.tsx b/apps/meteor/client/components/message/toolbar/items/actions/ReactionMessageAction.tsx index f8873d35f55bf..324e38d3a6d28 100644 --- a/apps/meteor/client/components/message/toolbar/items/actions/ReactionMessageAction.tsx +++ b/apps/meteor/client/components/message/toolbar/items/actions/ReactionMessageAction.tsx @@ -1,5 +1,4 @@ import { isOmnichannelRoom, type IMessage, type IRoom, type ISubscription } from '@rocket.chat/core-typings'; -import { useFeaturePreview } from '@rocket.chat/ui-client'; import { useUser, useEndpoint } from '@rocket.chat/ui-contexts'; import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; @@ -21,7 +20,6 @@ const ReactionMessageAction = ({ message, room, subscription }: ReactionMessageA const chat = useChat(); const user = useUser(); const setReaction = useEndpoint('POST', '/v1/chat.react'); - const quickReactionsEnabled = useFeaturePreview('quickReactions'); const { quickReactions, addRecentEmoji } = useEmojiPickerData(); const { t } = useTranslation(); @@ -53,10 +51,9 @@ const ReactionMessageAction = ({ message, room, subscription }: ReactionMessageA return ( <> - {quickReactionsEnabled && - quickReactions.slice(0, 3).map(({ emoji, image }) => { - return toggleReaction(emoji)} />; - })} + {quickReactions.slice(0, 3).map(({ emoji, image }) => { + return toggleReaction(emoji)} />; + })} Date: Wed, 17 Sep 2025 10:16:11 +0530 Subject: [PATCH 2/8] remove unused translations --- packages/i18n/src/locales/en.i18n.json | 4 +--- packages/i18n/src/locales/hi-IN.i18n.json | 2 -- packages/i18n/src/locales/nb.i18n.json | 2 -- packages/i18n/src/locales/nn.i18n.json | 2 -- packages/i18n/src/locales/pt-BR.i18n.json | 2 -- packages/i18n/src/locales/sv.i18n.json | 2 -- 6 files changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/i18n/src/locales/en.i18n.json b/packages/i18n/src/locales/en.i18n.json index c008cbeff67bd..d7217cb4a9f73 100644 --- a/packages/i18n/src/locales/en.i18n.json +++ b/packages/i18n/src/locales/en.i18n.json @@ -2245,7 +2245,7 @@ "Filter_by_visibility": "Filter by visibility", "Filters": "Filters", "Filters_and_secondary_sidebar": "Filters and secondary sidebar", - "Filters_and_secondary_sidebar_description": "Reduce noise and increase focus using sidebar filters and a secondary navigation layer. Filter your mentions, favorite rooms, discussions or filter by a specific room to see its associated channels and discussions.", + "Filters_and_secondary_sidebar_description": "Reduce noise and increase focus using sidebar filters and a secondary navigation layer. Filter your mentions, favorite rooms, discussions or filter by a specific room to see its associated channels and discussions.", "Filters_applied": "Filters applied", "Financial_Services": "Financial Services", "Finish": "Finish", @@ -4123,8 +4123,6 @@ "Queue_management": "Queue Management", "Queued": "Queued", "Queues": "Queues", - "Quick_reactions": "Quick reactions", - "Quick_reactions_description": "Easily access your most used and most recent emoji message reactions by hovering on a message.", "Quote": "Quote", "Random": "Random", "Rate Limiter": "Rate Limiter", diff --git a/packages/i18n/src/locales/hi-IN.i18n.json b/packages/i18n/src/locales/hi-IN.i18n.json index f5f88aead3c94..01d5126969523 100644 --- a/packages/i18n/src/locales/hi-IN.i18n.json +++ b/packages/i18n/src/locales/hi-IN.i18n.json @@ -3633,8 +3633,6 @@ "Queue_management": "कतार प्रबंधन", "Queued": "कतारबद्ध", "Queues": "पूंछ", - "Quick_reactions": "त्वरित प्रतिक्रियाएँ", - "Quick_reactions_description": "जब आपका माउस संदेश पर होता है तो सबसे अधिक उपयोग की जाने वाली तीन प्रतिक्रियाओं तक आसान पहुंच मिलती है", "Quote": "उद्धरण", "Random": "Random", "Rate Limiter": "दर सीमक", diff --git a/packages/i18n/src/locales/nb.i18n.json b/packages/i18n/src/locales/nb.i18n.json index 27e46c40b513d..2b97530425db1 100644 --- a/packages/i18n/src/locales/nb.i18n.json +++ b/packages/i18n/src/locales/nb.i18n.json @@ -4104,8 +4104,6 @@ "Queue_management": "Køstyring", "Queued": "Satt i kø", "Queues": "Køer", - "Quick_reactions": "Hurtigreaksjoner", - "Quick_reactions_description": "Få enkelt tilgang til de mest brukte og siste emoji-reaksjonene dine ved å holde musepekeren over en melding.", "Quote": "Sitat", "Random": "Tilfeldig", "Rate Limiter": "Frekvensbegrensning ", diff --git a/packages/i18n/src/locales/nn.i18n.json b/packages/i18n/src/locales/nn.i18n.json index d47768ab8d665..3c9a80ed1f452 100644 --- a/packages/i18n/src/locales/nn.i18n.json +++ b/packages/i18n/src/locales/nn.i18n.json @@ -3977,8 +3977,6 @@ "Queue_management": "Køstyring", "Queued": "Satt i kø", "Queues": "Køer", - "Quick_reactions": "Hurtigreaksjoner", - "Quick_reactions_description": "Få enkelt tilgang til de mest brukte og siste emoji-reaksjonene dine ved å holde musepekeren over en melding.", "Quote": "Sitat", "Random": "Tilfeldig", "Rate Limiter": "Frekvensbegrensning ", diff --git a/packages/i18n/src/locales/pt-BR.i18n.json b/packages/i18n/src/locales/pt-BR.i18n.json index 6f15d6d9d670d..dcd3b898c844d 100644 --- a/packages/i18n/src/locales/pt-BR.i18n.json +++ b/packages/i18n/src/locales/pt-BR.i18n.json @@ -4066,8 +4066,6 @@ "Queue_management": "Gerenciamento de fila", "Queued": "Em fila", "Queues": "Filas", - "Quick_reactions": "Reações rápidas", - "Quick_reactions_description": "Acesse facilmente suas reações de mensagens de emoji mais usadas e mais recentes passando o mouse sobre uma mensagem.", "Quote": "Citar", "Random": "Aleatória", "Rate Limiter": "Limitador de taxa", diff --git a/packages/i18n/src/locales/sv.i18n.json b/packages/i18n/src/locales/sv.i18n.json index 61ae01b32a703..8adda554f1af4 100644 --- a/packages/i18n/src/locales/sv.i18n.json +++ b/packages/i18n/src/locales/sv.i18n.json @@ -4085,8 +4085,6 @@ "Queue_management": "Köhantering", "Queued": "I kö", "Queues": "Köer", - "Quick_reactions": "Snabb reaktioner", - "Quick_reactions_description": "Få enkel åtkomst till dina mest använda och senaste emoji-reaktioner genom att hålla muspekaren över ett meddelande.", "Quote": "Citera inlägg", "Random": "Slumpmässig", "Rate Limiter": "Begränsning", From d20243615bfac7eded2a677f68efeb60fad8e3c0 Mon Sep 17 00:00:00 2001 From: yash-rajpal Date: Wed, 17 Sep 2025 16:49:21 +0530 Subject: [PATCH 3/8] fix unit tests --- .../components/FeaturePreview/FeaturePreview.spec.tsx | 6 +++--- .../ui-client/src/hooks/useFeaturePreview.spec.tsx | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx b/packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx index 615887e10402c..8842164a50072 100644 --- a/packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx +++ b/packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx @@ -5,7 +5,7 @@ import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from './FeaturePr test('should renders off if the feature is disabled', async () => { render( - + on off , @@ -19,14 +19,14 @@ test('should renders off if the feature is disabled', async () => { test('should renders on if the feature is enabled', async () => { render( - + on off , { wrapper: mockAppRoot() .withSetting('Accounts_AllowFeaturePreview', true) - .withUserPreference('featuresPreview', [{ name: 'quickReactions', value: true }]) + .withUserPreference('featuresPreview', [{ name: 'newNavigation', value: true }]) .build(), }, ); diff --git a/packages/ui-client/src/hooks/useFeaturePreview.spec.tsx b/packages/ui-client/src/hooks/useFeaturePreview.spec.tsx index af0ccae9f67f3..b0dbea36e12ca 100644 --- a/packages/ui-client/src/hooks/useFeaturePreview.spec.tsx +++ b/packages/ui-client/src/hooks/useFeaturePreview.spec.tsx @@ -4,7 +4,7 @@ import { renderHook } from '@testing-library/react'; import { useFeaturePreview } from './useFeaturePreview'; it('should return false if featurePreviewEnabled is false', () => { - const { result } = renderHook(() => useFeaturePreview('quickReactions'), { + const { result } = renderHook(() => useFeaturePreview('newNavigation'), { wrapper: mockAppRoot().withSetting('Accounts_AllowFeaturePreview', false).build(), }); @@ -13,10 +13,10 @@ it('should return false if featurePreviewEnabled is false', () => { // TODO: fix this test it('should return false if featurePreviewEnabled is true but feature is not in userPreferences', () => { - const { result } = renderHook(() => useFeaturePreview('quickReactions'), { + const { result } = renderHook(() => useFeaturePreview('newNavigation'), { wrapper: mockAppRoot() .withSetting('Accounts_AllowFeaturePreview', false) - .withUserPreference('featuresPreview', [{ name: 'quickReactions', value: true }]) + .withUserPreference('featuresPreview', [{ name: 'newNavigation', value: true }]) .build(), }); @@ -24,10 +24,10 @@ it('should return false if featurePreviewEnabled is true but feature is not in u }); it('should return true if featurePreviewEnabled is true and feature is in userPreferences', () => { - const { result } = renderHook(() => useFeaturePreview('quickReactions'), { + const { result } = renderHook(() => useFeaturePreview('newNavigation'), { wrapper: mockAppRoot() .withSetting('Accounts_AllowFeaturePreview', true) - .withUserPreference('featuresPreview', [{ name: 'quickReactions', value: true }]) + .withUserPreference('featuresPreview', [{ name: 'newNavigation', value: true }]) .build(), }); From 6416096925c450f71c86657e4676dc359701d49b Mon Sep 17 00:00:00 2001 From: yash-rajpal Date: Wed, 17 Sep 2025 16:53:38 +0530 Subject: [PATCH 4/8] remove feature image --- .../images/featurePreview/quick-reactions.png | Bin 5613 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 apps/meteor/public/images/featurePreview/quick-reactions.png diff --git a/apps/meteor/public/images/featurePreview/quick-reactions.png b/apps/meteor/public/images/featurePreview/quick-reactions.png deleted file mode 100644 index 600636789c96bfa685d02e5f8bd63505b8f5b2cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5613 zcmchbXH=6-l*dDn9-0tBq)3sj36LOCq<0WOiuC>}Ql%F|?^0Ey!%LTr^b$zuAPPt? z5{h&PL3(F#ch8>vxS#gJGtd0z%(-{w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(nvP2bx1+z0Ml3Topcz(kL=Gn5GN6yYhJ=@>QF`iTg^*&kn zW*x*H0bZOyR8pA6IyNy$PDvA%U2)e9Ni#pJl?ll;WXEi1$SA->HokKasNO8sQh@2>|^+|*;Zu}>G&#vPJM^2_%mty0V`wwjU%zvODMxD5S%<;4YJQPjB9f@`Z`-kNep zx~Y0#<4-RKm!K!O9?!kCUuJy~B`IPPnB%qWs~cJLuYRvsoDcCs_H*8}gg`tpU3<58 zFC(Gfa-+67ohKkbN~g{0zk~73p^YqS)Ip%A-A z)@AouFIOq=;4f@riM7ULM{2M~GxtfC{c=c`PaCp+s)F-v_-8;wba+C(-_v}Yc{H*K zHk+EDO%IS$#oLvAF$jS+R~hY(4%7DMcOPa}$I8+qr})ko%&mhOxh^<)^?h6!6e9q62qU~en>%Uc-co?h%t)(vBLr6_FfH9=qTkgGIhXs$?^$zNJ^2{4* z4a9#j=_wPvyZ3jco%^5fDvfzoQ``wPr6D3hFUF~{3o1T*2mIg zMUJEkWYF6m0Gl3u@k9p^K~|aE+E1BpUBHbR)Ie1trZ$Dod{bohym{f9Kd7XhncdP^ OfSS@X#Y%b0kpBSo`qq^I From 5bcde932711ad4fd4ba20ea13f0000fe9c0182af Mon Sep 17 00:00:00 2001 From: yash-rajpal Date: Wed, 17 Sep 2025 16:59:29 +0530 Subject: [PATCH 5/8] add changeset --- .changeset/purple-mayflies-approve.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/purple-mayflies-approve.md diff --git a/.changeset/purple-mayflies-approve.md b/.changeset/purple-mayflies-approve.md new file mode 100644 index 0000000000000..c0bd32ca21594 --- /dev/null +++ b/.changeset/purple-mayflies-approve.md @@ -0,0 +1,7 @@ +--- +'@rocket.chat/ui-client': major +'@rocket.chat/i18n': major +'@rocket.chat/meteor': major +--- + +Move quick reactions out of feature preview. From c7ccd21999ad3e1cebfe4ccc841dc6201a749e4f Mon Sep 17 00:00:00 2001 From: Douglas Fabris Date: Wed, 17 Sep 2025 14:13:43 -0300 Subject: [PATCH 6/8] chore: update changeset --- .changeset/purple-mayflies-approve.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/purple-mayflies-approve.md b/.changeset/purple-mayflies-approve.md index c0bd32ca21594..997daff3dce0a 100644 --- a/.changeset/purple-mayflies-approve.md +++ b/.changeset/purple-mayflies-approve.md @@ -4,4 +4,4 @@ '@rocket.chat/meteor': major --- -Move quick reactions out of feature preview. +Promotes quick reactions from preview state to stable From 9fea8e33308e3a1e5c95055d935d07bf731f2f11 Mon Sep 17 00:00:00 2001 From: yash-rajpal Date: Thu, 18 Sep 2025 21:57:53 +0530 Subject: [PATCH 7/8] fix tests --- .../components/FeaturePreview/FeaturePreview.spec.tsx | 6 +++--- .../ui-client/src/hooks/useFeaturePreview.spec.tsx | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx b/packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx index 8842164a50072..b8004efd1d140 100644 --- a/packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx +++ b/packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx @@ -5,7 +5,7 @@ import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from './FeaturePr test('should renders off if the feature is disabled', async () => { render( - + on off , @@ -19,14 +19,14 @@ test('should renders off if the feature is disabled', async () => { test('should renders on if the feature is enabled', async () => { render( - + on off , { wrapper: mockAppRoot() .withSetting('Accounts_AllowFeaturePreview', true) - .withUserPreference('featuresPreview', [{ name: 'newNavigation', value: true }]) + .withUserPreference('featuresPreview', [{ name: 'secondarySidebar', value: true }]) .build(), }, ); diff --git a/packages/ui-client/src/hooks/useFeaturePreview.spec.tsx b/packages/ui-client/src/hooks/useFeaturePreview.spec.tsx index b0dbea36e12ca..ac7839b15220a 100644 --- a/packages/ui-client/src/hooks/useFeaturePreview.spec.tsx +++ b/packages/ui-client/src/hooks/useFeaturePreview.spec.tsx @@ -4,7 +4,7 @@ import { renderHook } from '@testing-library/react'; import { useFeaturePreview } from './useFeaturePreview'; it('should return false if featurePreviewEnabled is false', () => { - const { result } = renderHook(() => useFeaturePreview('newNavigation'), { + const { result } = renderHook(() => useFeaturePreview('secondarySidebar'), { wrapper: mockAppRoot().withSetting('Accounts_AllowFeaturePreview', false).build(), }); @@ -13,10 +13,10 @@ it('should return false if featurePreviewEnabled is false', () => { // TODO: fix this test it('should return false if featurePreviewEnabled is true but feature is not in userPreferences', () => { - const { result } = renderHook(() => useFeaturePreview('newNavigation'), { + const { result } = renderHook(() => useFeaturePreview('secondarySidebar'), { wrapper: mockAppRoot() .withSetting('Accounts_AllowFeaturePreview', false) - .withUserPreference('featuresPreview', [{ name: 'newNavigation', value: true }]) + .withUserPreference('featuresPreview', [{ name: 'secondarySidebar', value: true }]) .build(), }); @@ -24,10 +24,10 @@ it('should return false if featurePreviewEnabled is true but feature is not in u }); it('should return true if featurePreviewEnabled is true and feature is in userPreferences', () => { - const { result } = renderHook(() => useFeaturePreview('newNavigation'), { + const { result } = renderHook(() => useFeaturePreview('secondarySidebar'), { wrapper: mockAppRoot() .withSetting('Accounts_AllowFeaturePreview', true) - .withUserPreference('featuresPreview', [{ name: 'newNavigation', value: true }]) + .withUserPreference('featuresPreview', [{ name: 'secondarySidebar', value: true }]) .build(), }); From 2fc2e50f538396c860038f500795c7bab1349ca2 Mon Sep 17 00:00:00 2001 From: dougfabris Date: Fri, 19 Sep 2025 09:55:27 -0300 Subject: [PATCH 8/8] test: adjust assertion --- apps/meteor/tests/e2e/feature-preview.spec.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/meteor/tests/e2e/feature-preview.spec.ts b/apps/meteor/tests/e2e/feature-preview.spec.ts index 9a1970cc57b3b..89a196258d40a 100644 --- a/apps/meteor/tests/e2e/feature-preview.spec.ts +++ b/apps/meteor/tests/e2e/feature-preview.spec.ts @@ -60,11 +60,10 @@ test.describe.serial('feature preview', () => { poAccountProfile = new AccountProfile(page); }); - test('should show "Message" and "Navigation" feature sections', async ({ page }) => { + test('should show "Navigation" feature section', async ({ page }) => { await page.goto('/account/feature-preview'); await page.waitForSelector('#main-content'); - await expect(page.getByRole('main').getByRole('button', { name: 'Message' })).toBeVisible(); await expect(page.getByRole('main').getByRole('button', { name: 'Navigation' })).toBeVisible(); });