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 library: Refactor Quote block to use class names for text align #16779

Merged
merged 2 commits into from Aug 8, 2019

Conversation

@gziolo
Copy link
Member

commented Jul 26, 2019

Description

Related: #16027, #15751, #16777.

This PR follows-up #16035.

Before:

<!-- wp:core/quote {"align":"right"} -->
<blockquote style="text-align:right" class="wp-block-quote">
	<p>Testing deprecated quote block...</p>
	<cite>...with a caption</cite>
</blockquote>
<!-- /wp:core/quote -->

After:

<!-- wp:quote {"align":"right"} -->
<blockquote class="wp-block-quote has-text-align-right"><p>Testing deprecated quote block...</p><cite>...with a caption</cite></blockquote>
<!-- /wp:quote -->

How has this been tested?

Using one of the existing branches (master probably) add a few Quote blocks and set different text alignments and save your post. Open the same post with this branch and ensure that it still works

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.
@draganescu

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

With this change on there is a small inconsistency with master, not sure if intended or not, when text is aligned centre the left border still shows, while on master it doesn't:

This change:

Screenshot 2019-07-31 at 15 48 26

Master:

Screenshot 2019-07-31 at 15 47 32

@gziolo gziolo force-pushed the update/quote-text-align branch from da1ad4f to 71d2c7f Jul 31, 2019

@gziolo

This comment has been minimized.

Copy link
Member Author

commented Jul 31, 2019

With this change on there is a small inconsistency with master, not sure if intended or not, when text is aligned centre the left border still shows, while on master it doesn't:

I partially fixed with 71d2c7f.

This blue thing comes from Twenty Nineteen theme:

Screen Shot 2019-07-31 at 15 42 16

I marked this PR as Needs Dev Note as we will need to let theme developers know about this change which needs to happen to make blocks which text alignments easier to style. At the moment they use the very awkward syntax as you can see in 71d2c7f.

@gziolo gziolo requested review from kjellr, mapk and karmatosed Jul 31, 2019

@gziolo gziolo added [Block] Quote and removed [Block] Verse labels Jul 31, 2019

@kjellr

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

This blue thing comes from Twenty Nineteen theme:
...
I marked this PR as Needs Dev Note as we will need to let theme developers know about this change which needs to happen to make blocks which text alignments easier to style. At the moment they use the very awkward syntax as you can see in 71d2c7f.

I'll get a patch ready for Twenty Nineteen to be compatible with this change. 👍

@kjellr

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

Actually, I'm not seeing that blue line issue. 🤔 I don't think the latest version of Twenty Nineteen actually does provide the style you noted above. It provides a border-width and a border-color, but not a position, and then piggybacks off the default styles provided from Gutenberg.

https://themes.trac.wordpress.org/browser/twentynineteen/1.4/style-editor.scss#L393

... and here's how that looks in the editor when I try it out:

Screen Shot 2019-07-31 at 10 55 04 AM

@gziolo gziolo force-pushed the update/quote-text-align branch from 71d2c7f to b8d1b0b Aug 8, 2019

@youknowriad
Copy link
Contributor

left a comment

LGTM 👍

@gziolo gziolo merged commit 509c9cb into master Aug 8, 2019

1 of 4 checks passed

Filter opened Filter opened
Details
Filter opened Filter opened
Details
Milestone It Milestone It
Details
Travis CI - Pull Request Build Passed
Details

@gziolo gziolo deleted the update/quote-text-align branch Aug 8, 2019

@gziolo gziolo added this to the Gutenberg 6.3 milestone Aug 8, 2019

@swissspidy swissspidy referenced this pull request Aug 13, 2019
2 of 2 tasks complete
gziolo added a commit that referenced this pull request Aug 29, 2019
Block library: Refactor Quote block to use class names for text align (
…#16779)

* Block library: Refactor Quote block to use class names for text align

* Refactor CSS theme styles to use new text align classes
gziolo added a commit that referenced this pull request Aug 29, 2019
Block library: Refactor Quote block to use class names for text align (
…#16779)

* Block library: Refactor Quote block to use class names for text align

* Refactor CSS theme styles to use new text align classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.