Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Notifications): static component implementation (DATAUI-1582) #57

Merged
merged 19 commits into from
Jun 26, 2023

Conversation

Ruminat
Copy link
Contributor

@Ruminat Ruminat commented Jun 2, 2023

That's how it looks

image

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en.

@Ruminat Ruminat requested review from amje, ValeraS and korvin89 as code owners June 2, 2023 15:02
@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@Ruminat
Copy link
Contributor Author

Ruminat commented Jun 13, 2023

@amje @ValeraS @korvin89
Посмотрите PR?

@@ -0,0 +1,4 @@
export * from './definitions';
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets add this component into /Notifications

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean moving the index.ts's content into Notifications/index.ts or moving the whole Notification directory's content into Notifications directory?

Copy link
Contributor

Choose a reason for hiding this comment

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

Whole directory. I think /components should have only exported elements. Notification seems like part of Notifications

Copy link
Contributor Author

@Ruminat Ruminat Jun 15, 2023

Choose a reason for hiding this comment

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

/Notification can be exported alone, if, for example, you already have some container that you want to use for your notifications that is different from what /Notifications offers you
Another point is that /Notification has it's own Notification.scss. So if put together, the styles are going to be in one big file and become harder to read
Or is it a common practice in your repository to put different style files in one directory? If so, I don't see a problem putting them in a single directory

src/components/Notification/Notification.scss Outdated Show resolved Hide resolved
src/components/Notification/Notification.tsx Outdated Show resolved Hide resolved
src/components/Notification/definitions.ts Outdated Show resolved Hide resolved
src/components/Notification/Notification.tsx Outdated Show resolved Hide resolved
src/components/Notification/definitions.ts Outdated Show resolved Hide resolved
src/components/Notifications/Notifications.scss Outdated Show resolved Hide resolved
src/components/Notifications/Notifications.tsx Outdated Show resolved Hide resolved
src/components/Notifications/Notifications.tsx Outdated Show resolved Hide resolved
@korvin89
Copy link
Contributor

  1. U should rename PR to have properly working CI
  2. Will u add some tests?

@Ruminat Ruminat changed the title DATAUI-1582 New Notifications component feat(Notifications): static component implementation (DATAUI-1582) Jun 14, 2023
@Ruminat
Copy link
Contributor Author

Ruminat commented Jun 16, 2023

@korvin89

U should rename PR to have properly working CI

  • renamed

Will u add some tests?

  • I couldn't find any tests in your repository, can you provide me with some references? And I can't really think of any tests yet — it's a component with basically no logic except for the swiping.

@korvin89
Copy link
Contributor

korvin89 commented Jun 16, 2023

I couldn't find any tests in your repository, can you provide me with some references? And I can't really think of any tests yet — it's a component with basically no logic except for the swiping.

Yep, we do not have tests yet. And it is not good. U can add an issue for tests and do it later. I am talking about testing of basic functionality, for example here. There is a good reference for jest configuration here.

@Ruminat
Copy link
Contributor Author

Ruminat commented Jun 16, 2023

Yep, we do not have tests yet. And it is not good. U can add an issue for tests and do it later. I am talking about testing of basic functionality, for example here. There is a good reference for jest configuration here.

Created an issue — #62

@Ruminat
Copy link
Contributor Author

Ruminat commented Jun 22, 2023

After consulting our designer, I rewrote the NotificationWithSwipe component.
It now uses the tinygesture library instead of the swipejs.
I also made a small NotificationSwipeAction component for simplification of writing swipe actions.

@Ruminat Ruminat merged commit 3016936 into main Jun 26, 2023
@Ruminat Ruminat deleted the DATAUI-1582-new-notifications-component branch June 26, 2023 08:53
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