open_social icon indicating copy to clipboard operation
open_social copied to clipboard

Issue #3481367: Enhance group tab management

Open rochek03 opened this issue 4 months ago • 1 comments

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:

    1. About
    2. Albums
    3. Books
    4. Discussions (provided by module from Cablecar)
    5. Events
    6. Files (provided by module from Cablecar)
    7. Tasks (provided by module from Cablecar)
    8. Topics
  • As a group creator, I can select only the allowed tabs for members in the tab manager options:

    1. About
    2. Stream
    3. Albums
    4. Books
    5. Discussions (provided by module from Cablecar)
    6. Events
    7. Files (provided by module from Cablecar)
    8. Members
    9. Tasks (provided by module from Cablecar)
    10. 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)

  1. Create SocialGroupDefaultRouteRedirectService to combine all redirection methods in one place, so it becomes reusable
  2. Set "About" and "Stream" routes as default for non-members and members accordingly
  3. Add new YmlDiscovery plugin manager - GroupLandingTabManager - now new options of landings tabs could be added with module_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
  1. Add social_group.group_landing_tabs.yml to provide default landing tabs.
  2. Add social_flexible_group_book.group_landing_tabs.yml to provide "Books" landing tab.
  3. Add social_album.group_landing_tabs.yml to provide "Album" landing tab.

Screenshots

image

Release notes (to customers)

  1. The "About" and "Stream" pages were set as default for non-members and members accordingly
  2. 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.

rochek03 avatar Oct 17 '24 07:10 rochek03