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

Issue-203: Drag and Drop posts within editor #206

Merged
merged 19 commits into from
Jul 31, 2024

Conversation

mogmarsh
Copy link
Collaborator

@mogmarsh mogmarsh commented Jul 18, 2024

Summary

Implements drag and drop functionality for posts within the editor to make moving a pinned post from one slot to another easier. Fixes #203.

Test Plan

  • Ensure each Post block has a drag handle or uses the Gutenberg one if possible.
  • Confirm each Post block acts as a drop zone.
  • Test the drag action includes a payload with the Post ID, any Post customizations, and the block ID of the Post being dragged.
  • Verify on drop, the Post info in the payload is set on the receiving block, and the pinned post is removed from the originating block via the block ID.
  • Drag and drop should not affect the layout or any block attributes such as class names.
  • Check if a post was previously pinned in the receiving block, it is properly handled.
  • Improved the cancel and move process for a smoother drag and drop experience.
  • Fixed an issue where moving a post did not work as expected.
  • Removed the click handler to ensure that drag and drop functionality is streamlined and intuitive.

Screenshots

Additional Notes

  • Styling has been updated to include a cursor pointer on hover to indicate draggable elements.
  • Efforts were made to reduce border thickness and fix outline styles for a cleaner UI appearance during drag and drop operations.
  • Code has been linted and reworked for better performance and readability.

@mogmarsh mogmarsh marked this pull request as ready for review July 30, 2024 15:30
Copy link
Contributor

@mboynes mboynes left a comment

Choose a reason for hiding this comment

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

💯. Reviewed and tested, works great!

@mogmarsh mogmarsh merged commit 055c15f into develop Jul 31, 2024
5 checks passed
@mogmarsh mogmarsh deleted the feature/issue-203/drag-drop-posts-editor branch July 31, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drag and Drop posts within editor
2 participants