Skip to content

Commit

Permalink
fix: fixed tab click issue (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
sundasnoreen12 authored Nov 13, 2024
1 parent 440230c commit 85a0935
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 30 deletions.
2 changes: 1 addition & 1 deletion src/Notification/NotificationSections.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const NotificationSections = () => {
>
{renderNotificationSection('today', today)}
{renderNotificationSection('earlier', earlier)}
{(hasMorePages === undefined || hasMorePages) && notificationListStatus === RequestStatus.IN_PROGRESS ? (
{notificationListStatus === RequestStatus.IN_PROGRESS ? (
<div className="d-flex justify-content-center p-4">
<Spinner animation="border" variant="primary" size="lg" data-testid="notifications-loading-spinner" />
</div>
Expand Down
42 changes: 21 additions & 21 deletions src/Notification/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ const Notifications = ({ notificationAppData, showLeftMargin }) => {
setAppName(selectedAppName);
setNotificationData(prevData => ({
...prevData,
...{ notificationListStatus: RequestStatus.IDLE },
...{ notificationListStatus: appName === selectedAppName ? RequestStatus.SUCCESSFUL : RequestStatus.IN_PROGRESS },
}));
}, []);
}, [appName]);

const updateNotificationData = useCallback((data) => {
setNotificationData(prevData => ({
Expand Down Expand Up @@ -150,13 +150,13 @@ const Notifications = ({ notificationAppData, showLeftMargin }) => {
</NotificationPopoverContext.Provider>
</Popover.Content>
{getConfig().NOTIFICATION_FEEDBACK_URL && (
<Button
onClick={enableFeedback}
variant="warning"
className="notification-feedback-widget"
>
{intl.formatMessage(messages.feedback)}
</Button>
<Button
onClick={enableFeedback}
variant="warning"
className="notification-feedback-widget"
>
{intl.formatMessage(messages.feedback)}
</Button>
)}
</div>
</Popover>
Expand All @@ -178,18 +178,18 @@ const Notifications = ({ notificationAppData, showLeftMargin }) => {
data-testid="notification-bell-icon"
/>
{tabsCount?.count > 0 && (
<Bubble
variant="error"
data-testid="notification-count"
className={classNames('notification-badge zindex-1 cursor-pointer p-1', {
'notification-badge-unrounded mt-1': tabsCount.count >= 10,
'notification-badge-rounded': tabsCount.count < 10,
})}
onClick={toggleNotificationTray}
>
{tabsCount.count >= 100 ? <div className="d-flex">99<p className="mb-0 plus-icon">+</p></div>
: tabsCount.count}
</Bubble>
<Bubble
variant="error"
data-testid="notification-count"
className={classNames('notification-badge zindex-1 cursor-pointer p-1', {
'notification-badge-unrounded mt-1': tabsCount.count >= 10,
'notification-badge-rounded': tabsCount.count < 10,
})}
onClick={toggleNotificationTray}
>
{tabsCount.count >= 100 ? <div className="d-flex">99<p className="mb-0 plus-icon">+</p></div>
: tabsCount.count}
</Bubble>
)}
</div>
</OverlayTrigger>
Expand Down
8 changes: 0 additions & 8 deletions src/Notification/notification.scss
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,6 @@
height: 10px;
width: 10px;
}

.nav-tabs .nav-link {
&:focus {
&::before {
border: none !important;
}
}
}
}

.notification-feedback-widget {
Expand Down

0 comments on commit 85a0935

Please sign in to comment.