From f0601b67e8df8e0c799097231573c1474724ed07 Mon Sep 17 00:00:00 2001 From: M-ZubairAhmed Date: Thu, 23 May 2024 11:24:41 +0000 Subject: [PATCH] [MM-58326] Remove aria-disabled for disabled tooltip in calls button following WithTooltip integration (#27094) --- .../src/components/profile_popover/profile_popover.scss | 7 ------- .../components/profile_popover/profile_popover.test.tsx | 2 +- .../profile_popover_call_button_wrapper/index.tsx | 6 ++---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/webapp/channels/src/components/profile_popover/profile_popover.scss b/webapp/channels/src/components/profile_popover/profile_popover.scss index 12658e491e..49707bc2a2 100644 --- a/webapp/channels/src/components/profile_popover/profile_popover.scss +++ b/webapp/channels/src/components/profile_popover/profile_popover.scss @@ -223,12 +223,5 @@ row-gap: 4px; } } - - button#startCallButton { - &.icon-btn-disabled { - cursor: not-allowed; - opacity: 0.65; - } - } } } diff --git a/webapp/channels/src/components/profile_popover/profile_popover.test.tsx b/webapp/channels/src/components/profile_popover/profile_popover.test.tsx index 61de4a2eff..ffa50baaa7 100644 --- a/webapp/channels/src/components/profile_popover/profile_popover.test.tsx +++ b/webapp/channels/src/components/profile_popover/profile_popover.test.tsx @@ -315,7 +315,7 @@ describe('components/ProfilePopover', () => { renderWithPluginReducers(, initialState); const button = (await screen.findByLabelText('Call with user is ongoing')).closest('button'); - expect(button?.getAttribute('aria-disabled')).toBe('true'); + expect(button).toBeDisabled(); }); test('should not show the start call button when callsChannelState.enabled is false', async () => { diff --git a/webapp/channels/src/components/profile_popover/profile_popover_call_button_wrapper/index.tsx b/webapp/channels/src/components/profile_popover/profile_popover_call_button_wrapper/index.tsx index e06b8b913f..42298a8cab 100644 --- a/webapp/channels/src/components/profile_popover/profile_popover_call_button_wrapper/index.tsx +++ b/webapp/channels/src/components/profile_popover/profile_popover_call_button_wrapper/index.tsx @@ -1,7 +1,6 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. -import classNames from 'classnames'; import React, {useCallback, useEffect, useState} from 'react'; import {useIntl} from 'react-intl'; import {useSelector} from 'react-redux'; @@ -95,7 +94,6 @@ const CallButton = ({ id: 'webapp.mattermost.feature.start_call', defaultMessage: 'Start Call', }); - const iconButtonClassName = classNames('btn btn-icon btn-sm style--none', {'icon-btn-disabled': disabled}); const callButton = (