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

Add: Format library to the widget screen. #15948

Merged
merged 1 commit into from
Jun 7, 2019

Conversation

jorgefilipecosta
Copy link
Member

Description

The PR just adds the missing format library to the widget screen.

How has this been tested?

I went to the widget block editor.
I added a paragraph and I verified I could see and use the format options e.g: Bold.

@jorgefilipecosta jorgefilipecosta added [Type] Bug An existing feature does not function as intended [Feature] Widgets Screen The block-based screen that replaced widgets.php. labels May 31, 2019
@noisysocks
Copy link
Member

When I go to insert a link the Apply button is appearing on a new line:

Screen Shot 2019-06-03 at 15 30 35

It should look like this:

Screen Shot 2019-06-03 at 15 32 33

@@ -3,6 +3,7 @@
*/
import { render } from '@wordpress/element';
import { registerCoreBlocks } from '@wordpress/block-library';
import '@wordpress/format-library';
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add the "package.json" and backend dependency?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @youknowriad, I changed the PR and applied the same approach used by edit-post. The format library is not imported and wp_enqueue* is used to load the scripts and styles. A package.json dependency was added as edit-post also contains it.

@jorgefilipecosta jorgefilipecosta force-pushed the add/format-library-widget-screen branch from d826b0f to 7222446 Compare June 3, 2019 13:06
@jorgefilipecosta
Copy link
Member Author

Hi @noisysocks, nice catch the styles problem should be fixed now.
Thank you @noisysocks, @youknowriad for the reviews.

@@ -25,6 +25,7 @@
"@wordpress/block-editor": "file:../block-editor",
"@wordpress/components": "file:../components",
"@wordpress/element": "file:../element",
"@wordpress/format-library": "file:../format-library",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I think we should, I only added it because the edit-post also contained but I think we can also remove it from there. I created PR to do that #16034.

Copy link
Member

@noisysocks noisysocks left a comment

Choose a reason for hiding this comment

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

This is working great for me! :shipit:

@jorgefilipecosta jorgefilipecosta force-pushed the add/format-library-widget-screen branch from 7222446 to b4d14bf Compare June 7, 2019 10:17
@jorgefilipecosta jorgefilipecosta merged commit ace322f into master Jun 7, 2019
@jorgefilipecosta jorgefilipecosta deleted the add/format-library-widget-screen branch June 7, 2019 10:31
@youknowriad youknowriad added this to the Gutenberg 5.9 milestone Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants