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-5771: Make the Paragraph Drag and Drop option more visible to Site Editors #1610

Merged
merged 13 commits into from
Oct 9, 2024

Conversation

codechefmarc
Copy link
Collaborator

@codechefmarc codechefmarc commented Aug 27, 2024

READY FOR REVIEW

Summary

Screenshot 2024-08-27 at 3 41 05 PM

Need Review By (Date)

2024-09-11

Urgency

low

Steps to Test

  1. Login to the site
  2. Add a Flexible page
  3. Verify that in the Main Region, there is a "Drag and drop" button that appears on the table header of the paragraph edit form.

Screenshot 2024-08-27 at 3 22 08 PM

  1. Add a Hero Image into the Full-Width Region
  2. Verify that the full-width region also gets a Drag and Drop button in the table header.

Screenshot 2024-08-27 at 3 22 55 PM

  1. Add a Private page
  2. Verify that the components paragraph also gets a Drag and drop button in the table header
  3. Click on the Drag & drop button and verify that drag and drop still works

Screenshot 2024-08-27 at 3 25 14 PM

PR Checklist


@ahughes3 ahughes3 temporarily deployed to Tugboat August 27, 2024 20:40 Destroyed
@codechefmarc codechefmarc changed the title Shs 5771 paragraphs drag drop SHS-5771: Make the Paragraph Drag and Drop option more visible to Site Editors Aug 27, 2024
@ahughes3 ahughes3 temporarily deployed to Tugboat August 27, 2024 21:58 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat August 27, 2024 22:14 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat August 27, 2024 22:35 Destroyed
@codechefmarc codechefmarc self-assigned this Aug 27, 2024
@codechefmarc codechefmarc requested a review from cienvaras August 27, 2024 22:40
@codechefmarc codechefmarc marked this pull request as ready for review August 27, 2024 22:44
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! Just one detail: can you please remove the changes in composer.lock from the PR. It's better to leave this to SWS, they're the ones in charge of module updates.

@ahughes3 ahughes3 temporarily deployed to Tugboat September 3, 2024 16:22 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat September 3, 2024 16:37 Destroyed
@codechefmarc
Copy link
Collaborator Author

Ok, @cienvaras , reverted composer.lock changes.

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.

Thanks @codechefmarc !

@ahughes3 Ready for you to review.

@cienvaras cienvaras requested a review from ahughes3 September 3, 2024 17:35
@cienvaras cienvaras assigned ahughes3 and unassigned codechefmarc Sep 3, 2024
Base automatically changed from 11.2.3-release to develop September 4, 2024 15:04
Copy link
Collaborator

@ahughes3 ahughes3 left a comment

Choose a reason for hiding this comment

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

Works as expected and looks good, approved by H&S

@ahughes3 ahughes3 requested a review from joegl September 4, 2024 16:03
@ahughes3 ahughes3 assigned joegl and unassigned ahughes3 Sep 4, 2024
@joegl joegl mentioned this pull request Sep 11, 2024
@joegl
Copy link
Contributor

joegl commented Sep 11, 2024

I understand the need to timebox. Do you know where it's failing or which of the two suggestions is preventing it from working?

Not sure which part is causing the issue - testing it with that php-eval seems to work, so troubleshooting is tricky is all. I did notice that if I did a print_r($existing_config) that it didn't print anything, even though it works with that php-eval. A coworker gave me some other suggestions to try, mainly updating the specific key/value pairs directly in the config rather than using a whole config file. And apparently, in 10.3, we can use a piece of the new recipes initiative to do config_actions which are a much simpler way of overriding existing config. So, there are ways forward.

Yea, I'm just not sure if looping through the config key/values will set or unset all the values correctly, even if it gets most of it accomplished. The updateFromStorageRecord method should work.

@joegl
Copy link
Contributor

joegl commented Sep 11, 2024

@codechefmarc @ahughes3 Is #1599 going to make this PR irrelevant since paragraphs_browser is being deprecated?

@joegl
Copy link
Contributor

joegl commented Sep 11, 2024

Not sure which part is causing the issue - testing it with that php-eval seems to work, so troubleshooting is tricky is all. I did notice that if I did a print_r($existing_config) that it didn't print anything, even though it works with that php-eval. A coworker gave me some other suggestions to try, mainly updating the specific key/value pairs directly in the config rather than using a whole config file. And apparently, in 10.3, we can use a piece of the new recipes initiative to do config_actions which are a much simpler way of overriding existing config. So, there are ways forward.

I'm having the same issue. The database update doesn't work but running the update code manually with drush eval works.

@codechefmarc
Copy link
Collaborator Author

@codechefmarc @ahughes3 Is #1599 going to make this PR irrelevant since paragraphs_browser is being deprecated?

@joegl What I added was part of the paragraphs module directly, so not sure if the widget is changing. I'll take a look over on that PR to check first. If not, I'll make the one change you need here and let you know.

@ahughes3 ahughes3 temporarily deployed to Tugboat September 12, 2024 18:26 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat September 12, 2024 19:29 Destroyed
@codechefmarc
Copy link
Collaborator Author

@joegl - So, I checked PR-1599 and this PR to add drag and drop visibility is still needed as we're still using Paragraphs in the regular way, it's just the way to choose a new paragraph is new.

I did test out just changing the service as you had mentioned and again it works with the php-eval as mentioned on the command line, but not with the standard build process. I tested locally and via Tugboat and neither got the change, whereas if I kept $config_directory = new FileStorage(Settings::get('config_sync_directory')); in there, it works fine with both.

I'm out of hours this week, so I can continue to work on this next week if you wish. Let me know your thoughts. Thanks!

@joegl
Copy link
Contributor

joegl commented Sep 12, 2024

@joegl - So, I checked PR-1599 and this PR to add drag and drop visibility is still needed as we're still using Paragraphs in the regular way, it's just the way to choose a new paragraph is new.

I did test out just changing the service as you had mentioned and again it works with the php-eval as mentioned on the command line, but not with the standard build process. I tested locally and via Tugboat and neither got the change, whereas if I kept $config_directory = new FileStorage(Settings::get('config_sync_directory')); in there, it works fine with both.

I'm out of hours this week, so I can continue to work on this next week if you wish. Let me know your thoughts. Thanks!

Sounds good and thanks for all the back-and-forth. We'll definitely need to coordinate the merge and release of these 3 paragraph PR's probably in the next release cycle but it's all looking good so far. Enjoy your time off 👍

Base automatically changed from 11.2.4-release to develop September 18, 2024 15:31
@ahughes3 ahughes3 temporarily deployed to Tugboat September 26, 2024 19:10 Destroyed
@joegl
Copy link
Contributor

joegl commented Oct 2, 2024

A quick update/summary: I'd like to merge #1574 and #1599 first, then get those changes merged into this PR and update this PR necessary. Because this change is much smaller than the other two, it's probably easier to merge those two larger PR's first and accommodate those changes here than vice-versa. CC: @ahughes3 @codechefmarc

@joegl joegl changed the base branch from develop to 11.2.5-release October 2, 2024 19:15
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 4, 2024

Both #1574 and #1599 have been merged now. This will need to have the latest code merged in and get the conflicts resolved, and then probably get a second look to see if it needs to be updated to work with the new paragraph changes. @cienvaras @codechefmarc

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

@joegl the branch is updated and ready to review. I implemented the requested changes in the new update hook (hs_paragraph_types_update_10009()), but, if this is going to be merged into 11.3.1 I think it can be removed. I had to include the new settings in the update hook I created in the Add Above PR (hs_basic_page_update_10002()), because it was overriding the config in my local, so now the change is being applied twice.

@cienvaras cienvaras requested a review from joegl October 7, 2024 23:41
@codechefmarc
Copy link
Collaborator Author

codechefmarc commented Oct 8, 2024

We'll have to reconcile some other code too - I just made changes to PR-1622 that also includes a hs_paragraph_types_update_10009 so mine will probably have to go to hs_paragraph_types_update_10010 is my guess. Just wanted to make a note for all of us to be aware. I can work on that one.

@codechefmarc
Copy link
Collaborator Author

PR-1622 was updated so the update hooks are now corrected.

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.

@joegl joegl merged commit 9a2f347 into 11.3.1-release Oct 9, 2024
17 checks passed
@joegl joegl deleted the SHS-5771--paragraphs-drag-drop branch October 9, 2024 17:10
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