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

Bug/264 button block linkcontrol #368

Open
wants to merge 6 commits into
base: feature/wp-scripts-restructure
Choose a base branch
from

Conversation

acketon
Copy link
Member

@acketon acketon commented Jun 18, 2024

Fixes #264

  • Converts URL Input component in sidebar into a Popover LinkControl component opened from the Toolbar
  • Adds Shortcut keyboard support CMD+K & CMD+SHIFT+K
  • Adds Open in new Tab functionality
  • Turns on Custom Classname field... no reason this was disabled on this block
  • Reorganizes new Link Control component and the previous InspectorControls components into editor-partials to test new structure proposed in https://github.com/bu-ist/id-gutenberg/issues/147

Previous version of Button Block:

Screen.Recording.2024-06-18.at.11.58.23.AM.mov

Updated version:
https://github.com/bu-ist/bu-blocks/assets/3139096/8b821497-9e44-4de7-a3d5-6451b37d6e9e

An explanation of the changes
Part 1: https://mymedia.bu.edu/media/t/1_jcr4yfej
Part 2: https://mymedia.bu.edu/media/t/1_xns71p42

kyleevansio and others added 6 commits August 12, 2020 14:18
@acketon acketon marked this pull request as ready for review June 18, 2024 19:39
Copy link

@timkingbu timkingbu left a comment

Choose a reason for hiding this comment

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

Code looks great. Build runs without error. I can't open https://mymedia.bu.edu/edit/1_xns71p42 but everything seems to be in working order. When editing an old button block, it says it contains unexpected or invalid content, but the block recovery works without error, as do the older published page. Good to go!

@acketon
Copy link
Member Author

acketon commented Jun 18, 2024

Code looks great. Build runs without error. I can't open https://mymedia.bu.edu/edit/1_xns71p42 but everything seems to be in working order. When editing an old button block, it says it contains unexpected or invalid content, but the block recovery works without error, as do the older published page. Good to go!

sorry, put the wrong link in: https://mymedia.bu.edu/media/t/1_xns71p42

ah, I thought I had avoided deprecation issues but my test page must have been bad. I'll look at that and can add a new deprecation to the block to prevent those errors. The other thing I could do is maybe convert this from a static block to a dynamic block... but that could be in a different PR. The block has actually been broken since the WP 5.4 upgrade because we mistakenly used a classname for the block that was then used when WP release their button block. So the styles clash and it's breaking on sites. Fixing it is going to be tricky because it's a static block and saved in the DB so it's been left broken for the past couple years because we didn't have resources to deal with it.

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.

3 participants