...
describe the changes and additions to the backend architecture (API and Storage)
describe the UX changes (webapp and redux)
...
we fetch the group(s) objects from the server and use them to populate the client state
we filter the client state based if the the current channel or team is group-constrained or not and select the groups that fulfill the right conditions (see below)
we populate the mentions suggestion list with the names of the groups obtained in the previous step.
...
constrained to the group(s)
not constrained by any group.
Depending if the current channel and/or the containing team is group constrained , we can have the following group mentioning cases:
If the current channel is constrained by the group(s), the user in the channel can only mention one of these groups.
Otherwise, if the current team is constrained tot he group(s)to one or more groups, the user can only mention one or more of these groups.
If neither the current channel is constrained, nor the current team the channel belongs to, then the user can mention any group constrained to any channel/group in the system. (currently all groups in MM are linked groups).
While we do not know how have a good grasp of many groups we can have in an org, we made the assumption that the number is small enough where we could fetch them from the server more than once - also we will retrieve only the group-mentionable onesduring a session (we optimize this action by retrieving only the mentionable ones). The group mention flow is initiated from a channel's textbox; it is an expensive operation to repeatedly fetch the group(s) from the server when as the user types , so the goal is to fetch them once at client start. Currently the plan is to - we will fetch the groups and populate the client state (depending if the channel/team re is group-constrained or not) once per team initialization (which means that if we switch team teams in the work session we will fetch the teams from the server again).
Future Work: Ideally, the groups will need to be fetched only once, at server start, not at every team change (and then only updated based on group-related System Console actions).
...
When we enable group mentioning on a group in the System Console, we are also generating the actual group name property from the group’s display name (e.g. from “software developers” to “@software-developers”). This happens at the server-side and since we enforce the uniqueness of the *name
* column in the UserGroups table, there is a potential of erroring by throwing a SQL exception if there is already a group with the same name already stored.
Future Work: Fully address the duplicate group name case. We should probably One solution would be to surface the duplicate error in the UI and allow the user to specify a different (custom) group name if the current one is a duplicate of another.
...
When we build the list of groups to mention, the groups are added to the list based if the channel/team are group-constrained or not. However, it could be that for some of these groups all none of their members are not members of the team to which the current channel from which we mentioncurrent team. Since the members of these groups are not going to be notified, one solution is to not select these groups avoid selecting them for inclusion in the mentions suggestion list to begin with. The current plan is to include these groups in the suggestion list.
...
we will add a new “Group Mention Settings” toggle widget containing a toggle in the Group Configuration details panel in the System Console. We will change the group states on the server at every UI toggle action (there is no Save action).
Future Work: converting this toggle into a proper “validate and update on Save" panel - the server state gets updated only when we click Save in the Group Configuration panel
...
Team : …/ groups_by_channels
getGroupsAssociatedToChannelsByTeam
(GET) - returns for a team, a map of channels constrained by groups and their linked the corresponding groups.
we will update the following
GetGroups*
API endpoints with the additional *filter_allow_reference
* filter (default is false), to be able to retrieve only the groups that are enabled for mentions and invites.
...