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 #3280811 by vnech: Book page in Flexible Group #2931

Merged
merged 6 commits into from Jul 3, 2022

Conversation

nechai
Copy link
Contributor

@nechai nechai commented May 17, 2022

Problem

There is no ability to add "Book page" nodes in "Flexible Group" groups.

Solution

Add "Book page" node type as a group content to "Flexible Group" group type.

Issue tracker

Theme issue tracker

How to test

  • Login as an admin
  • Enable module social_flexible_group_book
  • Create a flexible group
  • In "Personalisation" section enable option "Enable book pages"
  • Visit page _/group/{gid}/books
  • Click on button "create book page" (make sure during creating you chose "create a new book" in "Book outline" section - otherwise the book page will not be visible on books overview page)

How to test stream notifications:

  • Disable social_advanced_queue module (to make notifications creation faster)
  • When creating a book in FG in "Book outline" section chose "Create a new book" as notifications created only for new books without parents
  • Run cron after adding book in a FG

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
  • If applicable (I.E. new hook_updates) the update path from previous versions (major and minor versions) are tested
  • 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

Books page overview:
Screenshot 2022-05-23 at 18 37 26

Option for enabling/disabling books per group:
Screenshot 2022-05-31 at 17 27 40

Release notes

Add possibility to have "Book page" node type in "Flexible Group"

  • Enable module social_flexible_group_book if you want to have book pages in flexible groups;
  • By default only group managers and platform managers are able to create book pages in flexible group;

Change Record

N/A

Translations

N/A

@nechai nechai added type: feature Adds a new feature to Open Social status: needs work This pull request needs more work before it's ready for review prio: medium team: falcon labels May 17, 2022
@nechai nechai requested a review from rollki May 17, 2022 07:36
@nechai nechai self-assigned this May 17, 2022
@nechai nechai force-pushed the issue/3280811-book-page-in-flexible-group branch 6 times, most recently from 5989ee5 to dee92cc Compare May 22, 2022 21:42
@ribel ribel added this to the 11.4.0-alpha1 milestone May 24, 2022
@ribel
Copy link
Contributor

ribel commented May 24, 2022

@nechai, @rollki, @tbsiqueira I think it would be good to release it in 11.4.x, what do you think?

@nechai nechai force-pushed the issue/3280811-book-page-in-flexible-group branch 7 times, most recently from 1ab8ee8 to 7d5f607 Compare May 30, 2022 11:55
@nechai nechai 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 May 31, 2022
@rollki
Copy link
Contributor

rollki commented Jun 3, 2022

Hi @nechai
Please check few minor comment from me.

@nechai nechai force-pushed the issue/3280811-book-page-in-flexible-group branch from 7d5f607 to 36a0e0b Compare June 3, 2022 12:44
@nechai
Copy link
Contributor Author

nechai commented Jun 3, 2022

Hi @rollki ! Fixed, pls check.

@nechai nechai added the status: needs review This pull request is waiting for a requested review label Jun 22, 2022
@nechai nechai force-pushed the issue/3280811-book-page-in-flexible-group branch from 9779c86 to 064b78c Compare June 24, 2022 15:26
modules/social_features/social_book/social_book.install Outdated Show resolved Hide resolved
module_set_weight('social_flexible_group_book', $weight + 1);

/** @var \Drupal\social_flexible_group_book\SocialFlexibleGroupBookInstallHelper $install_helper */
$install_helper = \Drupal::classResolver(SocialFlexibleGroupBookInstallHelper::class);
Copy link
Contributor

Choose a reason for hiding this comment

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

@nechai I understand that using a helper service looks compact and logical but it disrupts the structure that we use for granting permissions in Open Social. See this commit 7eab050
We have to follow one approach and I need to ask you to move "grant permissions" from the helper service to the .install file

Copy link
Contributor Author

@nechai nechai Jun 29, 2022

Choose a reason for hiding this comment

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

Moved to .install file

@nechai nechai force-pushed the issue/3280811-book-page-in-flexible-group branch from 064b78c to cedf6e0 Compare June 29, 2022 13:35
@nechai nechai added status: needs work This pull request needs more work before it's ready for review and removed status: needs review This pull request is waiting for a requested review labels Jun 30, 2022
@nechai nechai force-pushed the issue/3280811-book-page-in-flexible-group branch 2 times, most recently from 38d137c to 0eedc6f Compare June 30, 2022 15:10
@nechai nechai force-pushed the issue/3280811-book-page-in-flexible-group branch from 0eedc6f to f482bc0 Compare July 1, 2022 10:56
@nechai nechai 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 Jul 3, 2022
@nechai nechai requested a review from Ressinel July 3, 2022 12:09
Copy link
Contributor

@Ressinel Ressinel left a comment

Choose a reason for hiding this comment

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

LGTM

@Ressinel Ressinel merged commit d680600 into main Jul 3, 2022
@Ressinel Ressinel deleted the issue/3280811-book-page-in-flexible-group branch July 3, 2022 12:16
Ressinel added a commit that referenced this pull request Jul 3, 2022
…flexible-group

Issue #3280811 by vnech: Book page in Flexible Group
@Ressinel
Copy link
Contributor

Ressinel commented Jul 3, 2022

🍒-picked to 11.4.x

@Ressinel Ressinel added backport: verified This pull request has been back ported to an older minor version status: no action needed and removed status: needs review This pull request is waiting for a requested review labels Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport: verified This pull request has been back ported to an older minor version prio: high type: feature Adds a new feature to Open Social
5 participants