Post Editor - Make heading style distinguishable from paragraph#10912
Post Editor - Make heading style distinguishable from paragraph#10912
Conversation
# Conflicts: # Podfile.lock
# Conflicts: # Podfile # Podfile.lock
|
Hey @iamthomasbishop 👋 You can request a new build from this PR's branch and start reviewing the style |
|
Changes look nice! I think the text-shadow might be a tiny bit too strong, but it at least is better than no visual difference. Are we using straight css to apply this? If so, what are the values? One other thing I noticed: When I try go to HTML Mode and change a header, from an |
|
Hey @iamthomasbishop thanks for the feedback.
We aren't using css, We are doing this on native side with NSShadow, it has basically 3 parameters: shadow-x-offset: Horizontal growing amount for shadow, this is determined with the if-else I am putting below here is how shadow-x-offset is calculated with respect to the font size: We can play with these values to find the best result.
I guess you did this on Gutenberg editor right? If so, it is because we don't support h5 in GB, if you were in debug mode you'd see a validation error about it. I tried with one of the supported values and worked fine: |
Ok, thanks for the explanation! Does that code you shared above only apply to headings, or any text with those fontSizes? I do think we could pull back on the shadow slightly (~.1 less), but what we have now isn't terrible. Maybe we could try:
That's correct. I just found it a little odd – but something we can address separately maybe. |
Only headings. We don't use shadow effect at any other type of text, other type of texts won't get effected. I'll update the PR with those values you suggested and let you know @iamthomasbishop |
|
Hey @iamthomasbishop 👋 I've updated the values, this is ready to give another try. |
diegoreymendez
left a comment
There was a problem hiding this comment.
Works as advertised!
# Conflicts: # Podfile.lock
# Conflicts: # Podfile # Podfile.lock

Fixes wordpress-mobile/gutenberg-mobile#351
This PR updates the style of Heading block and makes it distinguishable from paragraph.
Aztec PR: wordpress-mobile/AztecEditor-iOS#1127
mobile-gutenberg PR: wordpress-mobile/gutenberg-mobile#525
To Test
Prerequisites
run rake dependenciesRepeat Gutenberg Tests for both Aztec and Gutenberg editors
Additional Tests
Dirty Flag:
Open a post, select a Heading text and tap B button
Tap close button
Check if Alert sheet is popped up asking if you want to save or discard changes
(For Aztec classes editor tapping B button also should activate the Update button on navigation bar)
Saving
Try Saving post after changing Bold attribute of some part of Header and paragraph blocks
Close the post
Reopen the post
Verify that changes are saved
Update release notes:
RELEASE-NOTES.txt.