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

Block: Fix form element alignment for Embed + Table #19495

Closed
wants to merge 1 commit into from

Conversation

ItsJonQ
Copy link

@ItsJonQ ItsJonQ commented Jan 7, 2020

Screen Shot 2020-01-07 at 3 45 10 PM

This update fixes the Input x Button alignment for both the Embed and
Table blocks via the internal Placeholder component.

The issue was caused by a recent update made to the base Placeholder
component which normalized its margins. However, due to the element/layout
rendering of the Table block, it required certain margin values for the
Placeholder button to align correctly.

The solution was to revert the globalized changes and apply the normalization
specifically to the Embed block.

I don't think this will be a permanent solution given how unpredictable
component combinations may affect the layout (via margin). For now, this
solution is adequate to resolve these 2 Blocks.

How has this been tested?

Tested locally in Gutenberg dev environment

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

Follow up to #19438

This update fixes the Input x Button alignment for both the Embed and
Table blocks via the internal Placeholder component.

The issue was caused by a recent update made to the base Placeholder
component which normalized it's margins. However, due to the element/layout
rendering of the Table block, it required certain margin values for the
Placeholder button to align correctly.

The solution was to revert the globalized changes, and apply the normalization
specifically to the Embed block.

I don't think this will be a permanent solution given how unpredictable
component combinations may affect layout (via margin). For now, this
solution is adequete to resolve these 2 Blocks.
@ItsJonQ ItsJonQ added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components [Block] Embed Affects the Embed Block labels Jan 7, 2020
@ItsJonQ ItsJonQ self-assigned this Jan 7, 2020
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@youknowriad
Copy link
Contributor

The test failure is unrelated and I believe is being fixed separately.

@youknowriad
Copy link
Contributor

Looks like this is already fixed in master now right?

@ItsJonQ
Copy link
Author

ItsJonQ commented Jan 29, 2020

Looks like this is already fixed in master now right?
@youknowriad Yes 🙌 . I believe it was resolved here:
#19673

Closing this PR

@ItsJonQ ItsJonQ closed this Jan 29, 2020
@youknowriad youknowriad deleted the fix/embed-table-block-placeholder-alignment branch January 29, 2020 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Embed Affects the Embed Block [Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants