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-5785: New Well Color for Collections: Cleanup #1622

Merged
merged 37 commits into from
Oct 17, 2024

Conversation

codechefmarc
Copy link
Collaborator

@codechefmarc codechefmarc commented Sep 11, 2024

READY FOR REVIEW

NOTE This should be merged in AFTER PR-1602 is merged in. This PR contains commits from that PR and the only real changes are:

Summary

  • Removes the old Background Color field_paragraph_style field from the Collection paragraph that was replaced with the new Background Color Field field_bg_color

Need Review By (Date)

2024-09-18

Urgency

low

Steps to Test

  1. Login to the site as an admin
  2. Visit the Manage fields for the Collection paragraph here: /admin/structure/paragraphs_type/hs_collection/fields
  3. Verify there is no longer a "Background Color (old)" field with machine name field_paragraph_style
  4. Visit the Manage fields for the Private Collection paragraph here: /admin/structure/paragraphs_type/hs_priv_collection/fields
  5. Verify there is no longer a "Background Color (old)" field with machine name field_paragraph_style

PR Checklist


Marc Berger and others added 22 commits August 14, 2024 17:00
…date hook to migrate old bg color to new bg color field
* feat(shs-5784): add new well color for collections - FE

* feat(shs-5784): add new well color for collections - FE

* fix(shs-5784): logic

* Updated dependencies

* SHS-5791: Update Stanford University brand bar link (#1618)

* SHS-5791: Update Stanford University brand bar link.

* feat(shs-5784): improve code in module and add vireo light well color

* fix(shs-5784): add import for html

* HSD8-000: Fix localist_url fieldwidget discovery (#1621)

HSD8-000: Fix localist_url fieldwidget discovery.

---------

Co-authored-by: Mari Nez <mariannuar@gmail.com>
Co-authored-by: Andrés Díaz Soto <andres.diaz.soto@gmail.com>
Co-authored-by: CircleCI <sws-developers@lists.stanford.edu>
Co-authored-by: Joe Gilliland-Lloyd <6943710+joegl@users.noreply.github.com>
@ahughes3 ahughes3 temporarily deployed to Tugboat September 11, 2024 18:52 Destroyed
@codechefmarc codechefmarc self-assigned this Sep 11, 2024
@codechefmarc codechefmarc marked this pull request as ready for review September 11, 2024 19:05
@ahughes3 ahughes3 temporarily deployed to Tugboat October 8, 2024 17:40 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat October 9, 2024 23:57 Destroyed
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 great, thanks!

@ahughes3 Ready for you to review.

@ahughes3 ahughes3 requested a review from joegl October 15, 2024 15:37
@ahughes3 ahughes3 removed their assignment Oct 15, 2024
Base automatically changed from 11.3.1-release to develop October 16, 2024 15:43
Copy link
Contributor

@joegl joegl left a comment

Choose a reason for hiding this comment

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

One code suggestion here.

Also, is the intention here to delete the field_paragraph_style field completely or just remove it from the two collection paragraphs? The only other paragraph I see it being used on is hs_row which is being deprecated in #1643.

I think it's safe to delete the field entirely, which would mean deleting the field storage configuration and the permissions for it.

Otherwise if you just want to remove it and focus on deleting it completely later, then we can get this merged after the suggestion is reviewed 👍

Comment on lines 372 to 373
FieldConfig::loadByName('paragraph', 'hs_collection', 'field_paragraph_style')->delete();
FieldConfig::loadByName('paragraph', 'hs_priv_collection', 'field_paragraph_style')->delete();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
FieldConfig::loadByName('paragraph', 'hs_collection', 'field_paragraph_style')->delete();
FieldConfig::loadByName('paragraph', 'hs_priv_collection', 'field_paragraph_style')->delete();
if ($hs_collection_style = FieldConfig::loadByName('paragraph', 'hs_collection', 'field_paragraph_style')) {
$hs_collection_style->delete();
}
if ($hs_priv_collection_style = FieldConfig::loadByName('paragraph', 'hs_priv_collection', 'field_paragraph_style')) {
$hs_priv_collection_style->delete();
}

It's pretty safe to assume these exist, but doesn't hurt to check first just in case.

@joegl joegl changed the base branch from develop to 11.4.1-release October 16, 2024 20:05
@codechefmarc
Copy link
Collaborator Author

One code suggestion here.

Also, is the intention here to delete the field_paragraph_style field completely or just remove it from the two collection paragraphs? The only other paragraph I see it being used on is hs_row which is being deprecated in #1643.

I think it's safe to delete the field entirely, which would mean deleting the field storage configuration and the permissions for it.

Otherwise if you just want to remove it and focus on deleting it completely later, then we can get this merged after the suggestion is reviewed 👍

Yes, I believe it is going away entirely - I would say that if this PR gets merged in first, then we add the delete of the field storage to #1643 so we don't run into any problems.

@ahughes3 ahughes3 temporarily deployed to Tugboat October 17, 2024 18:29 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat October 17, 2024 20:21 Destroyed
@joegl
Copy link
Contributor

joegl commented Oct 17, 2024

One code suggestion here.
Also, is the intention here to delete the field_paragraph_style field completely or just remove it from the two collection paragraphs? The only other paragraph I see it being used on is hs_row which is being deprecated in #1643.
I think it's safe to delete the field entirely, which would mean deleting the field storage configuration and the permissions for it.
Otherwise if you just want to remove it and focus on deleting it completely later, then we can get this merged after the suggestion is reviewed 👍

Yes, I believe it is going away entirely - I would say that if this PR gets merged in first, then we add the delete of the field storage to #1643 so we don't run into any problems.

I merged #1643 before I saw this but I agree, this should be deleted entirely in a separate PR and update hook.

Copy link
Contributor

@joegl joegl left a comment

Choose a reason for hiding this comment

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

LGTM

@joegl joegl merged commit 0f6d8dd into 11.4.1-release Oct 17, 2024
14 of 15 checks passed
@joegl joegl deleted the SHS-5785--well-color-cleanup branch October 17, 2024 20:28
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.

5 participants