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)
Oct 28 2024, 3:02 AM
Unknown Object (File)
Oct 28 2024, 3:02 AM
Unknown Object (File)
Oct 28 2024, 3:01 AM
Unknown Object (File)
Oct 28 2024, 2:51 AM
Unknown Object (File)
Oct 19 2024, 9:22 PM
Unknown Object (File)
Oct 19 2024, 12:32 PM
Unknown Object (File)
Oct 17 2024, 10:44 AM
Unknown Object (File)
Oct 17 2024, 10:44 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
Branch
ENG-835
Lint
No Lint Coverage
Unit
No Test Coverage

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

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

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