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

Adding the bulk of the feature #1

Merged
merged 6 commits into from
Dec 20, 2022
Merged

Adding the bulk of the feature #1

merged 6 commits into from
Dec 20, 2022

Conversation

srtfisher
Copy link
Member

@srtfisher srtfisher commented Dec 19, 2022

Extracts the feature from Alleypack to be used in open-source packages.

@srtfisher srtfisher enabled auto-merge (squash) December 19, 2022 19:01
Copy link
Contributor

@mogmarsh mogmarsh left a comment

Choose a reason for hiding this comment

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

a few little things. Overall 👍

protected function ul( DOMNode $node ): Block {
return new Block(
block_name: 'list',
content: static::get_node_html( $node ),
Copy link
Contributor

Choose a reason for hiding this comment

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

WordPress 6.1 introduces a list item block
WordPress/gutenberg#42711

Copy link
Member Author

Choose a reason for hiding this comment

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

#2

attributes: [
'ordered' => true,
],
content: static::get_node_html( $node ),
Copy link
Contributor

Choose a reason for hiding this comment

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

same on the list item blocks WordPress/gutenberg#42711

*/
protected function minify_block( $block ) {
if ( preg_match( '/(\s){2,}/s', $block ) === 1 ) {
return preg_replace( '/(\s){2,}/s', '', $block );
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to replace with '' or ' '?

Comment on lines +345 to +368
'<!-- wp:html -->
<div></div>
<!-- /wp:html -->',
'<!-- wp:paragraph -->
<div> </div>
<!-- /wp:paragraph -->',
'<!-- wp:html -->
<div> </div>
<!-- /wp:html -->',
'<!-- wp:paragraph -->
<div>  </div>
<!-- /wp:paragraph -->',
'<!-- wp:paragraph --><p><br></p><!-- /wp:paragraph -->',
'<!-- wp:paragraph --><p><br><br><br></p><!-- /wp:paragraph -->',
'<!-- wp:paragraph -->
<p><br></p>
<!-- /wp:paragraph -->',
'<!-- wp:html -->
<div> </div>
<!-- /wp:html -->',
'<!-- wp:heading {"level":3} -->
<h3>
</h3>
<!-- /wp:heading -->',
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like there should be a better way to do this, but good enough for now...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah... I didn't write this part 🙉

@srtfisher srtfisher merged commit c3775bc into develop Dec 20, 2022
@srtfisher srtfisher deleted the feature branch December 20, 2022 17:54
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.

None yet

2 participants