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)
Sat, Nov 30, 1:18 PM
Unknown Object (File)
Sat, Nov 30, 11:47 AM
Unknown Object (File)
Sat, Nov 30, 11:06 AM
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

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.