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

SHS-5775: Implementation: Social Media Footer Block #1619

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from

Conversation

codechefmarc
Copy link
Collaborator

@codechefmarc codechefmarc commented Sep 5, 2024

Summary

Adds config and update hook to create new social media footer block.

Need Review By (Date)

2024-09-09

Urgency

low

Steps to Test

  1. Login to the site as a Developer role
  2. Under the Content menu, hover over "Blocks", then "Add content block", then click "Social Media Footer Block"

Screenshot 2024-09-05 at 1 19 07 PM

  1. Fill out the fields for description, icon size, layout, and add as many links as you wish
  2. Click "Save and configure" at the bottom
  3. When on the "Configure block" screen, select "Footer" as the value for the "Region" field
  4. At the bottom, click "Save block"
  5. View the front-end of the site and scroll all the way to the footer area
  6. Verify that there is a new social media footer block present, with the correct styles according to the selected icon size and layout

Grid layout:
Screenshot 2024-09-23 at 10 07 15 AM

List layout:
Screenshot 2024-09-23 at 10 07 48 AM

  1. Masquerade as a user who does not have a developer role, for example someone who only has "Site manager" role
  2. View the front-end of the site and scroll all the way to the footer area
  3. Hover over the social media block and click the pencil icon
  4. Verify that the only thing a non-developer role can do is edit the block, not remove it or configure it.
Screenshot 2024-09-23 at 10 08 54 AM

PR Checklist

@ahughes3 ahughes3 temporarily deployed to Tugboat September 5, 2024 20:02 Destroyed
@codechefmarc codechefmarc self-assigned this Sep 5, 2024
@codechefmarc codechefmarc marked this pull request as ready for review September 5, 2024 20:27
@ahughes3 ahughes3 temporarily deployed to Tugboat September 10, 2024 21:17 Destroyed
@codechefmarc
Copy link
Collaborator Author

@cienvaras - I've added the template suggestion so this is now ready for your review.

Copy link
Collaborator

@cienvaras cienvaras left a comment

Choose a reason for hiding this comment

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

@codechefmarc Works as expected, thanks!

@ahughes3 Ready for you to test.

Base automatically changed from 11.2.4-release to develop September 18, 2024 15:31
@ahughes3 ahughes3 temporarily deployed to Tugboat September 18, 2024 20:44 Destroyed
@cienvaras cienvaras changed the base branch from develop to 11.2.5-release September 18, 2024 20:45
@cienvaras
Copy link
Collaborator

cienvaras commented Sep 23, 2024

@ahughes3 This one is ready to review, includes both backend (SHS-5675) and frontend (SHS-5676) work.

@cienvaras cienvaras changed the title SHS-5775: Implementation: Social Media Footer Block - site building SHS-5775: Implementation: Social Media Footer Block Sep 24, 2024
@ahughes3 ahughes3 requested a review from joegl September 26, 2024 17:00
@ahughes3 ahughes3 assigned joegl and unassigned ahughes3 Sep 26, 2024
@ahughes3 ahughes3 temporarily deployed to Tugboat September 26, 2024 19:07 Destroyed
@joegl
Copy link
Contributor

joegl commented Oct 2, 2024

👀 I did a cursory review of this and looks good. I just want to take a closer look at the database update and .module hook. @codechefmarc There's a conflict in the hs_paragraph_types.module if you want merge in the latest 11.2.5-release and resolve it that'd be great 👍

@ahughes3 ahughes3 temporarily deployed to Tugboat October 2, 2024 21:33 Destroyed
@cienvaras
Copy link
Collaborator

@joegl Merge conflicts fixed!

Base automatically changed from 11.2.5-release to develop October 3, 2024 15:39
@joegl joegl changed the base branch from develop to 11.3.1-release October 3, 2024 16:35
@joegl
Copy link
Contributor

joegl commented Oct 7, 2024

@codechefmarc I'm curious why you went with a custom block built via the UI and a new paragraph type, instead of creating a custom block plugin programmatically. Because of the large hook to format the icons based on the link URL's, it feels like a block plugin could have worked really well here and kept everything organized in a single block instance with a configuration form, instead of piecing together hooks and field/paragraph configuration. I think this could all comfortably fit into a single block plugin and would prefer that route if possible.

@codechefmarc
Copy link
Collaborator Author

@codechefmarc I'm curious why you went with a custom block built via the UI and a new paragraph type, instead of creating a custom block plugin programmatically.

@joegl - This was discussed internally before we started this ticket and we thought it was best to create a block via the UI because of the repeating mulit-value field with the paragraph, maintainability, and the ability to more easily add fields to this block if needed via the UI. I certainly can see it both ways - there are pros and cons to building this way vs a custom block plugin.

@ahughes3 ahughes3 temporarily deployed to Tugboat October 8, 2024 16:37 Destroyed
@codechefmarc
Copy link
Collaborator Author

@joegl - Reverted permissions to 11.3.1-release version. Ready for a retest. Thanks!

@joegl
Copy link
Contributor

joegl commented Oct 9, 2024

@codechefmarc I'm curious why you went with a custom block built via the UI and a new paragraph type, instead of creating a custom block plugin programmatically.

@joegl - This was discussed internally before we started this ticket and we thought it was best to create a block via the UI because of the repeating mulit-value field with the paragraph, maintainability, and the ability to more easily add fields to this block if needed via the UI. I certainly can see it both ways - there are pros and cons to building this way vs a custom block plugin.

Ok, that makes sense. I think the use of a new paragraph type to capture a multi-value field for a block is a bit out of scope for the intended use of paragraphs. A basic URL field comes with a title and URL which could suffice for the label and URL being captured here. A single block plugin also would probably be easier to maintain than all the configuration and module hooks here.

We can still move forward with this implementation and I understand the reasons you chose this route. But I do want to push again to use a custom block plugin instead if possible.

Base automatically changed from 11.3.1-release to develop October 16, 2024 15:43
@codechefmarc
Copy link
Collaborator Author

@codechefmarc I'm curious why you went with a custom block built via the UI and a new paragraph type, instead of creating a custom block plugin programmatically.

@joegl - This was discussed internally before we started this ticket and we thought it was best to create a block via the UI because of the repeating mulit-value field with the paragraph, maintainability, and the ability to more easily add fields to this block if needed via the UI. I certainly can see it both ways - there are pros and cons to building this way vs a custom block plugin.

Ok, that makes sense. I think the use of a new paragraph type to capture a multi-value field for a block is a bit out of scope for the intended use of paragraphs. A basic URL field comes with a title and URL which could suffice for the label and URL being captured here. A single block plugin also would probably be easier to maintain than all the configuration and module hooks here.

We can still move forward with this implementation and I understand the reasons you chose this route. But I do want to push again to use a custom block plugin instead if possible.

@joegl - I'm going to create a new PR to address this and create a custom block instead of one via the UI. For the moment, I'll keep this PR open, but will mark it as don't merge and once we're happy with the other PR, we can close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants