Skip to content

Add Mark inline formatting - #943

Merged
geriux merged 1 commit into
developfrom
feature/mark-formatting
Dec 3, 2021
Merged

Add Mark inline formatting#943
geriux merged 1 commit into
developfrom
feature/mark-formatting

Conversation

@geriux

@geriuxgeriux commented Nov 16, 2021

Copy link
Copy Markdown

This PR is a follow-up of #939 to wrap up adding Mark formatting support.

To test this feature, use the iOS build from this PR that uses this feature.

Fix

Adds Mark formatting capabilities.

Test

For test cases, you can check the description of this PR.

Review

@antonis

Make sure strings will be translated:

  • If there are new strings that have to be translated, I have added them to the client's strings.xml as a part of the integration PR.

@geriux

Copy link
Copy Markdown
Author

Hey there @hypest@mchowning 👋

I'm having an issue with this feature and I saw you have worked on this project before, I was wondering if any of you might have some insight 😄

Currently, if you have a word typed in, and an empty <mark> tag at the end, if you focus at the end to write something within the tag, it will let you add content but while you do so, the first word is wrapped by another <mark> tag with the CSS attributes of the original mark tag. The desired result would be to leave the first word as it was and be able to type content within the mark tag that's at the end.

Screenrecorder-2021-11-17-10-47-01-827.mp4

Have you seen this before? I updated the demo app content to show the current issue. Any guidance would be appreciated. Thanks!

@hypest

Copy link
Copy Markdown
Contributor

👋 @geriux , thanks for the ping!

Haven't really dug deeply into this yet, but thought of sharing this in case it helps in the meantime: I wonder if there's some mixup with inline and block level elements handling here that leads to that separate to appear. For example, I see that it's the blockFormatter used here instead of the inlineFormatter. I understand that the mark tag is an inline-level HTML tag, right? So, I'd expect to only see it being handled by the inline elements related classes. Again, I haven't tried to really debug this so, take the above with a grain of salt :)

@geriuxgeriux changed the title [WIP] Feature - Mark inline formattingAdd Mark inline formattingNov 30, 2021
@geriux
geriux marked this pull request as ready for review November 30, 2021 16:20
@geriux
geriux requested a review from antonisNovember 30, 2021 16:20
Comment threadaztec/src/main/kotlin/org/wordpress/aztec/formatting/InlineFormatter.kt Outdated
Comment threadaztec/src/main/kotlin/org/wordpress/aztec/formatting/InlineFormatter.kt Outdated
Comment threadaztec/src/main/kotlin/org/wordpress/aztec/formatting/InlineFormatter.kt Outdated

@antonisantonis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work @geriux 👍
I tested with the Gutenberg PR and everything works as expected. The code also LGTM 🎉

I added a couple of comments that do not affect the code functionally :)

Comment threadapp/src/main/kotlin/org/wordpress/aztec/demo/MainActivity.kt
@geriux
geriuxforce-pushed the feature/mark-formatting branch from 96a3deb to 3823851CompareDecember 2, 2021 14:28
@geriux
geriux merged commit 2878796 into developDec 3, 2021
@geriux
geriux deleted the feature/mark-formatting branch December 3, 2021 09:35
@geriuxgeriux mentioned this pull request Mar 18, 2024
1 task
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@geriux@hypest@antonis