Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #3436013: Fix sidebar blocks display in flexible groups #3833

Merged

Conversation

tregismoreira
Copy link
Contributor

@tregismoreira tregismoreira commented Mar 27, 2024

Problem

We received a bug report saying that some of our clients can't see the sidebar blocks "Upcoming events" and "Newest topics" in flexible groups.

As a result of a extensive investigation, we discovered that the issue is caused by 3 misconfigurations:

  1. The visibility settings in the block is restricting it to some group types;
  2. The contextual filter in the View has a validation criteria restricting the query to some group types;
  3. The social_course module is overriding some of the Views configs affecting the query for those blocks.

We also discovered that this issue does not happen to fresh installations.

Solution

Since the config overriding (3rd item mentioned above) is already been taken care on another issue (#3416433), we should write an update script to reset the other two configs: block visibility settings, and contextual filter validation criteria, so they will match with the install config state.

We should also write a Behat test to make sure the blocks appears properly in the flexible group sidebar region.

Issue tracker

Theme issue tracker

N/A

How to test

  • Checkout the branch feature/3436013-fix-sidebar-blocks-display-in-flexible-groups
  • Run the update script (drush updb)
  • Create (or visit an existing) Flexible group

Expected result

We should be able to see all 3 group sidebar blocks:

  • Upcoming events
  • Newest topics
  • Newest Members

Behat test expected result

Run the Behat test tests/behat/features/capabilities/groups/flexible/groups-flexible-sidebar-blocks.feature

image

Definition of done

Before merge

  • Code/peer review is completed
  • All commit messages are clear and clean. If applicable a rebase was performed
  • All automated tests are green
  • Functional/manual tests of the acceptance criteria are approved
  • All acceptance criteria were met
  • New features or changes to existing features are covered by tests, either unit (preferably) or behat
  • Update path is tested. New hook_updates should respect update order, right naming convention and consider hook_post_update code
  • Module can be safely uninstalled. Update/implement hook_uninstall and make sure that removed configuration or dependencies are removed/uninstalled
  • This pull request has all required labels (team/type/priority)
  • This pull request has a milestone
  • This pull request has an assignee (if applicable)
  • Any front end changes are tested on all major browsers
  • New UI elements, or changes on UI elements are approved by the design team
  • New features, or feature changes are approved by the product owner

After merge

  • Code is tested on all branches that it has been cherry-picked
  • Update hook number might need adjustment, make sure they have the correct order
  • The Drupal.org ticket(s) are updated according to this pull request status

Screenshots

Release notes

Ensure Events and Topics blocks are displayed in the group sidebar.

Change Record

Translations

@tregismoreira tregismoreira added type: bug Fixes a bug in Open Social team: enterprise This PR originates from the ECI team prio: medium labels Mar 27, 2024
Copy link

mergeable bot commented Mar 27, 2024

Thanks for contributing towards Open Social! A maintainer from the @goalgorilla/maintainers group might not review all changes from all teams/contributors. Please don't be discouraged if it takes a while. In the meantime, we have some automated checks running and it might be that you will see our comments with some tips or requests to speed up the review process. 😊

@ribel ribel added this to the 12.2.5 milestone Mar 28, 2024
Copy link
Contributor

@ribel ribel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tregismoreira,
Changes look good to me on a clean test env, and was tested on existing env as well.
I put more details in a ticket.
Jut please rename hook update numbers, since we plan to release it in version 12.2.x.

modules/social_features/social_topic/social_topic.install Outdated Show resolved Hide resolved
modules/social_features/social_event/social_event.install Outdated Show resolved Hide resolved
@ribel ribel added the status: needs work This pull request needs more work before it's ready for review label Apr 9, 2024
@tregismoreira tregismoreira force-pushed the feature/3436013-fix-sidebar-blocks-display-in-flexible-groups branch from bfcca36 to 9d33651 Compare April 9, 2024 15:56
@tregismoreira
Copy link
Contributor Author

@ribel your comments are done, and the commits are cleaned.

@ribel ribel added status: needs review This pull request is waiting for a requested review and removed status: needs work This pull request needs more work before it's ready for review labels Apr 10, 2024
@ribel ribel self-requested a review April 10, 2024 12:59
Copy link
Contributor

@ribel ribel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update hooks were tested and configs are as expected.

@ronaldtebrake ronaldtebrake modified the milestones: 12.2.5, 12.2.6, 12.3.5 Apr 23, 2024
@ribel ribel modified the milestones: 12.3.5, 13.0.0-alpha2 May 8, 2024
@ribel ribel force-pushed the feature/3436013-fix-sidebar-blocks-display-in-flexible-groups branch 2 times, most recently from 51d1a7b to 39c801f Compare May 9, 2024 09:37
@ribel
Copy link
Contributor

ribel commented May 9, 2024

Since these changes depends on version 13.0.0 I have changed milestone and update hooks to 13000x

@ribel ribel force-pushed the feature/3436013-fix-sidebar-blocks-display-in-flexible-groups branch from 39c801f to 542515e Compare May 9, 2024 09:47
To ensure the sidebar blocks will be properly displayed in flexible groups, this commit implements an update script to:

- Delete the Blocks visibility settings, which was mistakenly set to be restricted to just a few group types;
- Delete the Views' Contextual filter validation criteria, which was also mistakenly set to enable just a few group types.

A Behat test was also provided to make sure all 3 sidebar blocks are present in the group.
@ribel ribel force-pushed the feature/3436013-fix-sidebar-blocks-display-in-flexible-groups branch from 542515e to bd27f89 Compare May 9, 2024 10:08
@ribel ribel merged commit fe85d5d into main May 9, 2024
191 checks passed
@ribel ribel deleted the feature/3436013-fix-sidebar-blocks-display-in-flexible-groups branch May 9, 2024 11:30
@ribel ribel added backport: not needed This pull request only needs to land on main and does not need a backport and removed status: needs review This pull request is waiting for a requested review labels May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport: not needed This pull request only needs to land on main and does not need a backport prio: medium team: enterprise This PR originates from the ECI team type: bug Fixes a bug in Open Social
3 participants