Page MenuHomePhabricator

[web] Introduce `NotificationsModal` component
ClosedPublic

Authored by jacek on May 6 2022, 7:48 AM.
Tags
None
Referenced Files
F3262032: D3952.id12360.diff
Fri, Nov 15, 11:32 PM
F3262027: D3952.diff
Fri, Nov 15, 11:32 PM
Unknown Object (File)
Sat, Nov 9, 3:03 PM
Unknown Object (File)
Sat, Nov 9, 3:03 PM
Unknown Object (File)
Sat, Nov 9, 2:57 PM
Unknown Object (File)
Sat, Nov 9, 2:45 PM
Unknown Object (File)
Sat, Nov 9, 2:43 PM
Unknown Object (File)
Sat, Nov 9, 2:37 PM

Details

Summary

Introduce modal component for notifications settings in thread. Currently it doesn't have "onSave" callback, and the notifications settings itself.
The settings options will be added in separate diff.

Screenshot_Google Chrome_2022-05-06_164902.png (632×460 px, 54 KB)

Test Plan

It is not accesible from menu yet. Can be launched after diff introducing menu item in thread menu.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jacek added reviewers: tomek, benschac, atul.
jacek added inline comments.
web/modals/threads/notifications/notifications-modal.react.js
36 ↗(On Diff #12360)

The eslint-disable will be removed in next diff

40–41 ↗(On Diff #12360)

Will be implemented in separate diffs.

tomek added a reviewer: ashoat.

Adding @ashoat as this diff touches the copy (modal name and save button)

web/modals/threads/notifications/notifications-modal.css
7 ↗(On Diff #12360)

If we use the same value in a couple of places, maybe we should extract it to common place? If we're using a different value every time, maybe we should make it more consistent?

web/modals/threads/notifications/notifications-modal.react.js
24–32 ↗(On Diff #12360)

Maybe like this?

atul added inline comments.
web/modals/threads/notifications/notifications-modal.css
7 ↗(On Diff #12360)

Why do we need to hard-code a min-width value here?

The value seems particularly specific.. so I'm guessing it's from the Figma designs?

web/modals/threads/notifications/notifications-modal.react.js
12–15 ↗(On Diff #12360)

I think(?) we generally put the "Props" type right above the component. So maybe swap positions with the NotificationSettings type?

Don't feel strongly, nor do I know if this is something we care about keeping consistent... but figured I'd throw it out there

24 ↗(On Diff #12360)

Maybe like initialThreadSetting?

(don't feel strongly, feel free to go with whatever)

36 ↗(On Diff #12360)

Thanks for the heads up

This revision is now accepted and ready to land.May 9 2022, 9:39 AM
web/modals/threads/notifications/notifications-modal.css
7 ↗(On Diff #12360)

This min-width value is used to make the modal match size with design in Figma. The value is specific for each modal, although some of them have the same size. As the design system doesn't define a common size of modals, I'm not sure if we should extract the value.
Making it consistent between modals would change their design a bit, and we'd need to confirm it looks good after the changes, but I'm also not sure if such changes are needed now.

web/modals/threads/notifications/notifications-modal.react.js
12–15 ↗(On Diff #12360)

Yes, I agree with you

24 ↗(On Diff #12360)

It's much better name, thanks for suggestion

24–32 ↗(On Diff #12360)

Yes, it looks better. Thanks!

fixes following review comments