-
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-5783 / SHS-5784: New Well Color for Collections #1602
Conversation
…date hook to migrate old bg color to new bg color field
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.
I thought I'd do a review since @cienvaras is out until Monday. This code all looks great. Your explanation matches what I intended. But I'm not sure how to log into tugboat to do an extra confirmation.
What do you suggest for how @mariannuar might move forward tomorrow before Andrés is back? Continue working on this branch?
Thanks! I sent the login info to you in Slack. As to FE work - I think that's fine to work on this same branch. I saw the note about possible changes to the color names, though, so perhaps wait a bit before those are finalized. Then I can update the BE code to match those new colors (if any change) and then FE work can start. |
@dalin- (cc: @codechefmarc ) Just a heads up that I'm done with my allocations this week for this project :) and I'm currently working on the multiselect ticket, so I think I could start working on the FE part of this on Monday afternoon. Thank you! |
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 Need to change a bit how the new field values are being updated. Please take a look at the inline comment and let me know if you have any questions.
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.deploy.php
Outdated
Show resolved
Hide resolved
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 Thanks for implementing the update hook. Code looks good, just found an issue when setting one of the new values, but should be easy to fix.
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
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.
Some suggestions to get a better complexity score.
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
$sandbox['total'] = count($sandbox['ids']); | ||
} | ||
|
||
$paragraph_ids = array_splice($sandbox['ids'], 0, 10); |
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.
Unrelated to complexity, but this technique is not safe. If an exception is thrown on item 5, the rest of the items in this loop will be skipped. Better to wait to remove an item until after it's been successfully processed.
@cienvaras - Ok, this is ready for a re-review. Thank you for the find on setting the second field, that is now fixed. |
@ahughes3 Fixed, both the field order and the screenshots. Let us know if any other change is required. |
…-5783--well-color-collections
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.
A couple of recommendations and suggestions.
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install
Outdated
Show resolved
Hide resolved
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.
Looks good!
docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.module
Outdated
Show resolved
Hide resolved
config/default/field.field.paragraph.hs_collection.field_bg_color_width.yml
Outdated
Show resolved
Hide resolved
…-5783--well-color-collections
READY FOR REVIEW
Summary
Backend
field_bg_color
) and Background Color Width (field_bg_color_width
) to the Collection and Private Collection paragraphsfield_paragraph_style
) - to be cleaned up in a subsequent PR.Frontend
Update the styles and logic to make the new two fields
Background Color (field_bg_color)
andBackground Color Width (field_bg_color_width)
work in the FENeed Review By (Date)
09/11/2024
Urgency
medium
Steps to Test
Backend
hs_colorful
a good example is "Collection with Mixed Components in a Well"field_paragraph_style
) (now labeled "Background Color (old)" for Collections and "Style (old)" for Private Collections) is not visible at all on the Paragraph form. (Verify via/admin/structure/paragraphs_type/hs_collection/form-display
for Collections and/admin/structure/paragraphs_type/hs_priv_collection/form-display
for Private Collections)Private Page
with aPrivate Collection
component.Frontend
Flexible Page
and addCollections
for eachBackground Color
and eachBackground Color Width
Private Page
with aPrivate Collection
component.PR Checklist