Skip to content

Add: Format library to the widget screen.#15948

Merged
jorgefilipecosta merged 1 commit intomasterfrom
add/format-library-widget-screen
Jun 7, 2019
Merged

Add: Format library to the widget screen.#15948
jorgefilipecosta merged 1 commit intomasterfrom
add/format-library-widget-screen

Conversation

@jorgefilipecosta
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread packages/edit-widgets/src/index.js Outdated
*/
import { render } from '@wordpress/element';
import { registerCoreBlocks } from '@wordpress/block-library';
import '@wordpress/format-library';
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

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

Comment thread packages/edit-widgets/package.json Outdated
"@wordpress/block-editor": "file:../block-editor",
"@wordpress/components": "file:../components",
"@wordpress/element": "file:../element",
"@wordpress/format-library": "file:../format-library",
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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