-
Notifications
You must be signed in to change notification settings - Fork 13
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
[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 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
BlockFormatHandler
andBlockModel
are meant to be easily extensible, in case we need similar implementations with other blocks in the future.Refertences:
mobile-gutenberg
branch:issue/ios-heading-behavior
gutenberg
PR: WordPress/gutenberg#12869Aztec-iOS
PR wordpress-mobile/AztecEditor-iOS#1108To Test:
Setup:
gutenberg-mobile
branchissue/ios-heading-behavior
.git submodule update
to checkout submodules commits.yarn preios
to force update the Aztec version.yarn start:reset
open ios/gutenberg.xcodeproj
.yarn ios
)Testing:
Thank you!