-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
…date hook to migrate old bg color to new bg color field
…o top of paragraph toolbar
…-5783--well-color-collections
…-5783--well-color-collections
* 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>
…-5785--well-color-cleanup
There was a problem hiding this 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.
There was a problem hiding this 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 👍
FieldConfig::loadByName('paragraph', 'hs_collection', 'field_paragraph_style')->delete(); | ||
FieldConfig::loadByName('paragraph', 'hs_priv_collection', 'field_paragraph_style')->delete(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
field_paragraph_style
field from the Collection paragraph that was replaced with the new Background Color Fieldfield_bg_color
Need Review By (Date)
2024-09-18
Urgency
low
Steps to Test
/admin/structure/paragraphs_type/hs_collection/fields
field_paragraph_style
/admin/structure/paragraphs_type/hs_priv_collection/fields
field_paragraph_style
PR Checklist