open_social
open_social copied to clipboard
Issue #3481367: Enhance group tab management
Problem (for internal)
Currently, the Group Tab Manager module allows managers to select a wide range of options. In this story, we want to clean up these options to align with what we allow.
Acceptance Criteria:
-
As a group creator, I can select only the allowed tabs for non-members in the tab manager options:
- About
- Albums
- Books
- Discussions (provided by module from Cablecar)
- Events
- Files (provided by module from Cablecar)
- Tasks (provided by module from Cablecar)
- Topics
-
As a group creator, I can select only the allowed tabs for members in the tab manager options:
- About
- Stream
- Albums
- Books
- Discussions (provided by module from Cablecar)
- Events
- Files (provided by module from Cablecar)
- Members
- Tasks (provided by module from Cablecar)
- Topics
-
An option is visible only if it is also enabled in the group personalization checkboxes.
-
Options are ordered as listed above.
-
The default option is About for non-members and Stream for members.
Solution (for internal)
- Create
SocialGroupDefaultRouteRedirectService
to combine all redirection methods in one place, so it becomes reusable - Set "About" and "Stream" routes as default for non-members and members accordingly
- Add new YmlDiscovery plugin manager -
GroupLandingTabManager
- now new options of landings tabs could be added withmodule_name.group_landing_tabs.yml
file with the next structure:
module_name.tab_name:
title: Example
route_name: example_route
membership: member/non-member/all
weight: 16
// Isn't required, if it isn't set tabs will appear for all group types.
group_types:
- example_group_type
// Isn't required, if it isn't set tabs will appear without conditions.
conditions:
group_field_name: value
- Add
social_group.group_landing_tabs.yml
to provide default landing tabs. - Add
social_flexible_group_book.group_landing_tabs.yml
to provide "Books" landing tab. - Add
social_album.group_landing_tabs.yml
to provide "Album" landing tab.
Screenshots
Release notes (to customers)
- The "About" and "Stream" pages were set as default for non-members and members accordingly
- The list of available options was changed according to AC
Issue tracker
https://www.drupal.org/project/social/issues/3481367 https://getopensocial.atlassian.net/browse/PROD-30966
How to test
- [ ] Enable module
social_group_default_route
- [ ] Create two verified users - "Member" and "Non-member"
- [ ] Create a public group "Flexible group" - check the settings - there should be the 'Tab Management setting" with default options:
- [ ] For member: About, Stream, Events, Members, Topics
- [ ] For non-members: About, Events, Topics
- [ ] Enable module
social_flexible_group_book
- [ ] The new option "Books" should appear In the 'Tab Management setting" options.
- [ ] Add user "Member" as a member to the "Flexible group" group.
- [ ] As AU or "Non-member" got to page
group/1
- you should be redirected to the "About" page. - [ ] As "Member" got to page
group/1
- you should be redirected to the "Stream" page. - [ ] Go to the edit page of "Test" group
group/1/edit
- [ ] As AU or "Non-member" got to page
group/1
- you should be redirected to the "Event" page. - [ ] As "Member" got to page
group/1
- you should be redirected to the "Topics" page. - [ ] Try to change the landing tab for member and no-member - they should be redirected to the according pages.