[iOS]: Fix issue where heading blocks are not behaving properly.#98
[iOS]: Fix issue where heading blocks are not behaving properly.#98
Conversation
We try to force typing attributes and manually change it on heading level changes.
|
Sent a couple of commits to solve some issues found by @koke . |
diegoreymendez
left a comment
There was a problem hiding this comment.
I could completely remove the header style by selecting all text and deleting everything. You mentioned in this PR it's a partial fix though so if that's known, everything else looks fine to me.
I also added a comment related to the documentation of a protocol.
| @@ -0,0 +1,11 @@ | |||
| protocol BlockFormatHandler { | |||
There was a problem hiding this comment.
I think it'd be a good idea to document this new protocol to define what its scope is (what does it take care of specifically? what's it purpose?).
This is kinda minor but it's good in making sure all devs stay synchronized moving forward.
…o avoid problems with generated p tags.
|
Thanks for your review @diegoreymendez That odd behavior should not be present. At some point it was solved but seems to be there again. |
…didSet. This correclty refresh typing attributes when an empty Heading block changes level.
diegoreymendez
left a comment
There was a problem hiding this comment.
Works as advertised.
Fixes wordpress-mobile/gutenberg-mobile#355
This PR forces the typing attributes to be corresponding with the Heading level, when Aztec is used to display Heading blocks.
With @diegoreymendez we looked into the possibility of fixing this on the Aztec level but it easily became super complicated. So we decided for an RNAztecView approach.
The
BlockFormatHandlerandBlockModelare meant to be easily extensible, in case we need similar implementations with other blocks in the future.Refertences:
mobile-gutenbergbranch:issue/ios-heading-behaviorgutenbergPR: WordPress/gutenberg#12869Aztec-iOSPR wordpress-mobile/AztecEditor-iOS#1108To Test:
Setup:
gutenberg-mobilebranchissue/ios-heading-behavior.git submodule updateto checkout submodules commits.yarn preiosto force update the Aztec version.yarn start:resetopen ios/gutenberg.xcodeproj.yarn ios)Testing:
Thank you!