issue: https://linear.app/comm/issue/ENG-2794/make-it-possible-to-display-only-chats-from-a-given-community-in-the
Add to FilterPanel logic, that will allow to display only chats of a given community in filters.
Details
Checked that when a community is chosen it is not possible to add an event for a chat from a different community - ThreadPickedModal displays only chats from this community. Checked that only chats fro the give community show up in the filter panel.
Check that the square next to the "Your chats" button is filled when all chats from the picked community are selected. Not only when all chats the user is a member of are selected.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Fix filter panel not updating when community is picek and a search query is typed in / when a search query is typed in and a community gets picked
Actually clearCalendarCommunityFilter and updateCalendarCommunityFilter actions will be dispatched from outsied of the filter panel
web/calendar/filter-panel.react.js | ||
---|---|---|
94–98 ↗ | (On Diff #22188) | We want the square next to the "Your chats" button to be filled when all chats from the picked community are selected. Not only when all chats the user is a member of are selected. |
199–201 ↗ | (On Diff #22188) | When a community is picked, we want pressing the "Your chats" button to pick / unpick only chats from this community |
web/calendar/filter-panel.react.js | ||
---|---|---|
94–98 ↗ | (On Diff #22188) | Could you amend this to the test plan? |
Overall looks good, but there are a couple of minor comments and I would like to see this code after the changes are applied.
web/calendar/filter-panel.react.js | ||
---|---|---|
72–75 ↗ | (On Diff #22188) | This can be simplified, but you don't have to do that if you think that the simplified version is less readable |
79–84 ↗ | (On Diff #22188) | Mutating a variable is usually reducing the maintainability. Can we avoid this by introducing a new name instead of reassigning? |
199–202 ↗ | (On Diff #22188) | We can optimize this a bit by avoiding the conversion to an array when the value is not being used (when !value) |
web/calendar/filter-panel.react.js | ||
---|---|---|
72–75 ↗ | (On Diff #22188) | I'd prefer to keep it as it is. It's also consistent with the function right above. |
Add .js to imports
Updating D6462: [web] Add logic for displaying only chats from a given community in calendar filters # # Enter a brief description of the changes included in this update. # The first line is used as subject, next lines as comment. # # If
you intended to create a new revision, use: # $ arc diff --create