Skip to content

Removes empty lines lists and quotes#1129

Merged
SergioEstevao merged 5 commits intodevelopfrom
issue/empty_lines_lists_and_quotes
Jun 15, 2019
Merged

Removes empty lines lists and quotes#1129
SergioEstevao merged 5 commits intodevelopfrom
issue/empty_lines_lists_and_quotes

Conversation

@SergioEstevao
Copy link
Copy Markdown
Contributor

@SergioEstevao SergioEstevao commented Jun 13, 2019

Fixes #954

This PR addresses the issues iOS were empty lines are being added to new lists or quotes blocks.
It also fixes the placeholders visibility and style on both blocks.

Simulator Screen Shot - iPhone Xʀ - 2019-06-13 at 12 56 47

To test:

  • Start the demo app
  • Add a new list block
  • Check if placeholder info code shows up.
  • Edit the list and add new list elements and check that no new empty line shows up in the end
  • Split lists
  • Indent and outdent
  • Add new quote block
  • Check that placeholder text shows up
  • Edit the quote and check that no extra empty lines show up when editing

Update release notes:

  • If there are user facing changes, I have added an item to RELEASE-NOTES.txt.

Copy link
Copy Markdown
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

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

Great job @SergioEstevao ! 🎉

List blocks is working great!

I just found a small problem with the Quote block:

The citation is not allowing me to create more than 2 paragraphs.
And I can't delete the second line when it's empty

And also the Image Caption field is not responding to Enter keys anymore.

These fields use \n as line terminator and it's translated to <br> by Aztec, maybe that's the difference.

citation

@SergioEstevao
Copy link
Copy Markdown
Contributor Author

@etoledom Thanks for the review! I updated some of the code to take account the <br> cases.

I think the issues are now sorted, can you give it another go?

@SergioEstevao SergioEstevao requested a review from etoledom June 14, 2019 16:08
Copy link
Copy Markdown
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

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

Thank you for the update @SergioEstevao !

Both Quote and List block already feel so much nicer 🎉
The previous issue is completely fixed.

There is still an extra empty line on the cite field inside the Quote block that is traduced to an extra <br> tag at the end of the cite.

The gif shows two issues related to this:

  • After pressing enter once, I can't delete the new line.
  • After removing the extra new line at the bottom, pressing enter generates it again but the cursor stays at the same position.

I'm happy to ✅ if you think this is better suited for another PR, since the main problem is already fixed.

cite


I thought I found another issue on List blocks, but then I realized that this is also happening on web. (I could reproduce it on https://frontenberg.tomjn.com)

The issue happens when merging into a list with many indented items: After merging, all the indented items will merge into one. It sounds familiar so we might have seen something similar before. I'm just writing it down in case you or someone else sees it.

merging-to-list

@SergioEstevao
Copy link
Copy Markdown
Contributor Author

@etoledom the cite problem you are still seeing it's because Aztec auto adds <p> on lines.
That will need to be address on a separate PR were I create an option to disable it on Aztec and then use that option in RCTAztecView.

If we you are happy to approve now I will do a separate PR for that.

Copy link
Copy Markdown
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

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

As we agreed, :shipit: and move on! 🎉

@SergioEstevao SergioEstevao merged commit a3769fe into develop Jun 15, 2019
@SergioEstevao SergioEstevao deleted the issue/empty_lines_lists_and_quotes branch June 15, 2019 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[OS] iOS [Type] Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List shows an empty editable extra line

2 participants