Page MenuHomePhabricator

[web] Mark inbox icon as active when necessary
ClosedPublic

Authored by tomek on May 27 2022, 9:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 4, 12:03 AM
Unknown Object (File)
Wed, Jul 3, 9:30 AM
Unknown Object (File)
Tue, Jul 2, 9:23 PM
Unknown Object (File)
Tue, Jul 2, 7:03 AM
Unknown Object (File)
Sun, Jun 30, 12:18 AM
Unknown Object (File)
Wed, Jun 26, 11:30 AM
Unknown Object (File)
Wed, Jun 26, 11:30 AM
Unknown Object (File)
Wed, Jun 26, 11:28 AM

Details

Summary

When we're in chat, calendar or apps, we should mark the icon with purple rectangle.
https://www.figma.com/file/a1nkbWgbgjRlrOY9LVurTz/Comm-%2F-Desktop-app?node-id=1170%3A77595

inbox_active.png (566×490 px, 26 KB)

inbox_inactive.png (608×514 px, 24 KB)

Depends on D4144

Test Plan

Check if the icon is marked while on apps, chat or calendar. It shouldn't be marked while on settings page.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested review of this revision.May 27 2022, 9:13 AM
atul added inline comments.
web/sidebar/community-picker.react.js
41–46 ↗(On Diff #13170)

I think alternatively we could "re-use" the isSettingsOpen selector and below do something like:

const inboxButtonContainerClass = classNames({
    [css.activeContainer]: !isSettingsOpen,
}).

to avoid a second useSelector... but overall I think your approach is probably more robust and it's better to be explicit.

This revision is now accepted and ready to land.May 27 2022, 10:29 AM
web/sidebar/community-picker.react.js
41–46 ↗(On Diff #13170)

I prefer being explicit here - just to avoid possible bugs in the future. On the other hand, possible bugs would be easy to catch.