-
Notifications
You must be signed in to change notification settings - Fork 57
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 split and merge #167
Comments
cc @daniloercoli @diegoreymendez since you're already looking into this. Please comment if I missed any important details. |
Issues remaining (at least in iOS):
|
@daniloercoli @diegoreymendez since you're already working on this, can you make a task list of what needs to be done and add some estimations by Wednesday?
Is this not working now? How is it behaving? |
Also, I initially put this in #168 but take into account as well updating the Heading (and any other ported) block so it works correctly |
It's a pending task. I'm still working on the basics, to at least make it work fine in most scenarios. It'll require some changes in iOS for sure, but they should be fairly simple. |
2 weeks sprint should be enough to complete the list above. Edit: |
I'd say that's the expected behavior and how any other editor does it, no need to worry about that |
Not sure it has already been mentioned but here is an extra edge-case/bug to fix:
|
I did a quick test on RTL (Arabic keyboard), enter and backspace seem to split/merge fine, although the splitted blocks get the wrong alignment |
Moved RTL testing to the beta in #380, since we can use some help with that |
I'm going to close this, since there are only two things in the list:
|
When a user presses return the block should split in two at the cursor. Similarly, backspace at the beginning of a block should merge it with the previous block (or forward delete at the end of a block)
There are some extra rules for this so double check what Gutenberg does and follow the same patterns. I don't think we have to worry about many of those yet since we only support a few block types, but one that I've identified so far is:
When you press return, the newly created block will be a paragraph, unless it's a multiline block (I think we only have
code
in the alpha).Merge the content (or return false to let Aztec native to handle the backspace)
Merge 2 blocks of different types
Resize after block splitting
Fix problem with content lost on merging
Fix delayed updated from native side (not completely related to this feature, but we need it)
Focus is moved to the wrong block after merging/splitting (We may need to wait until focus problems are resolved)
On blocks merging, should we add a white space character before the content of the 2nd block? (if necessary). Otherwise there is a situation where the last word of the first block, and the first word of the 2nd block, are merged together firing up the spell checker inline suggestions.Test on RTL languagesMake sure RTL text is handled correctly #380Block Splitting: If
before
content is omitted, treat as intent to delete block and callonReplace( [] );
Check
Code
block in regard to enter and backspaceUsing backspace while the first word is highlighted should not merge the 2 blocks, only remove the currently selected word. It's working as expected on Android, but iOS does merge the 2 blocks. [iOS] Fix Pressing backspace when the first word of a Para block is selected #325
Add Enter.key handling/detection to PlainText and PlainText powered blocks Add Enter.key handling/detection to PlainText and PlainText powered blocks #324
The text was updated successfully, but these errors were encountered: