Skip to content

Conversation

vetalcore
Copy link
Contributor

@vetalcore vetalcore commented Oct 6, 2025

Checklist

  • JIRA - LW-13587
  • Proper tests implemented
  • Screenshots added.

Proposed solution

Explain how does this PR solves the problem stated in JIRA ticket.
You can also enumerate different alternatives considered while approaching this task.

Testing

Describe here, how the new implementation can be tested.
Provide link or briefly describe User Acceptance Criteria/Tests that need to be met

Screenshots

Screenshot 2025-10-06 at 02 11 32 Screenshot 2025-10-06 at 02 11 44 Screenshot 2025-10-06 at 02 12 05 Screenshot 2025-10-06 at 02 11 57 Screenshot 2025-10-06 at 02 22 06 Screenshot 2025-10-06 at 02 22 11 Screenshot 2025-10-06 at 02 22 23 Screenshot 2025-10-06 at 02 22 30 Screenshot 2025-10-06 at 02 23 19 Screenshot 2025-10-06 at 02 23 26 Screenshot 2025-10-06 at 02 23 43 Screenshot 2025-10-06 at 02 23 49

@vetalcore vetalcore self-assigned this Oct 6, 2025
@vetalcore vetalcore requested a review from a team as a code owner October 6, 2025 00:07
Copy link

sonarqubecloud bot commented Oct 6, 2025

@lace-bot
Copy link
Collaborator

lace-bot commented Oct 6, 2025

Allure Report

allure-report-publisher generated test report!

processReports: ✅ test report for 3a954b67

passed failed skipped flaky total result
Total 33 0 4 0 37

Copy link
Contributor

@iccicci iccicci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The NotificationListItem shows the topic rather than the publisher (or the chain, I have not clear from figma).

What this PR is missing is that clicking on the NotificationListItem the user should be brought to the notification center with the desired notification information available (even if the rendering of the details is not ready yet).

const formatNotificationCount = (count: number) => (count < 10 ? count.toString() : '9+');
const MAX_NOTIFICATION_COUNT = 9;
const formatNotificationCount = (count: number) =>
count < MAX_NOTIFICATION_COUNT ? count.toString() : `${MAX_NOTIFICATION_COUNT}+`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
count < MAX_NOTIFICATION_COUNT ? count.toString() : `${MAX_NOTIFICATION_COUNT}+`;
count <= MAX_NOTIFICATION_COUNT ? count.toString() : `${MAX_NOTIFICATION_COUNT}+`;

import styles from './NotificationsBell.module.scss';

import NotificationBellIcon from '@lace/core/src/ui/assets/icons/notifications-bell.component.svg';
import NotificationBellIcon from '../../assets/icons/notifications-bell.component.svg';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mirceahasegan asked me to put icons in the core package.

Anyway if there are good reasons to keep them in this package, please remove the other ones (also the happy face).

import { useHistory } from 'react-router';
import { SectionTitle } from '@components/Layout/SectionTitle';

export const NotificationsCenter = (): React.ReactElement => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two component with the same name and purpose?

I'd suggest a refactor to have only one component with that purpose.

remove
remove,
// TODO: Implement loadMore and isLoading
loadMore: () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At UI level loading is a synchronous action. The SW provides all the notifications at once.

I'd simplify the entire PR removing every reference to dynamic loading.

[notifications]
);

const mappedNotifications = useMemo(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand this mapping. Apart from flattening the properties at root level it basically filters out some properties.

I see only two disadvantages in having this (more resources required and the need to modify this in case UI needs some property removed here) and no advantages.

Also the I'd say that implementing the onClick should be part of this PR, but in the NotificationListItem directly rather than here.

return (
<Flex flexDirection="column" alignItems="center" justifyContent="center" gap="$8">
<HappyFaceIcon className={styles.icon} />
<Text.Body.Large>{t('notificationsCenter.allClear.title')}</Text.Body.Large>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also remove the allClear.title and allClear.description properties from the translation file.

/>
);
};
export const NotificationsCenterContainer = (): React.ReactElement => <NotificationsCenter />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mirceahasegan asked me for keeping the logic in this component and passing hooks to the inner component.

I'm more inclined to the proposed approach, but for sure we need some more coherence:

  1. either stick to @mirceahasegan directives
  2. or remove this now useless component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants