Skip to content

Fixing toolbar highlight issues#398

Merged
0nko merged 64 commits intodevelopfrom
issue/345-fixing-toolbar-highlight-issues
Jul 15, 2017
Merged

Fixing toolbar highlight issues#398
0nko merged 64 commits intodevelopfrom
issue/345-fixing-toolbar-highlight-issues

Conversation

@khaykov
Copy link
Copy Markdown
Contributor

@khaykov khaykov commented Jun 29, 2017

#395 need's to be merged before this one.

Fixes #345
Fixes #357
Preserves selected style when deleting the last character on 0 index, and allows the selected style to be removed with extra backspace.

Test 1

  1. Open the demo app.
  2. Remove the demo content.
  3. Close the device keyboard. (Note that the cursor remains in the text view.)
  4. Tap a format toolbar button for inline style (e.g. Bold) to enable it.
  5. Tap back into the text view.
  6. Confirm that previously selected style in the toolbar is still highlighted.
  7. Type text. Confirm that it's correctly styled.

Test 2

  1. Open the demo app.
  2. Remove the demo content.
  3. Tap a format toolbar button for inline style(e.g. Bold) to enable it.
  4. Type text and press enter.
  5. Deselect style and type text.
  6. Notice that the style button is not highlighted and style is not applied.

Test 3

  1. Open the demo app.
  2. Remove the demo content.
  3. Tap a format toolbar button for inline style(e.g. Bold) to enable it.
  4. Type text.
  5. Press backspace to delete all the text.
  6. Confirm that selected style is still highlighted.
  7. Press backspace.
  8. Confirm that selected style is not highlighted.

There are a couple of changes to inline style handling, so it would be awesome if both @0nko and @theck13 could play with inline styles a bit to make sure everything is ok.

khaykov added 30 commits May 31, 2017 22:09
…-Android into issue/345-fixing-toolbar-highlight-issues

# Conflicts:
#	aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt
#	aztec/src/main/kotlin/org/wordpress/aztec/toolbar/AztecToolbar.kt
#	aztec/src/test/kotlin/org/wordpress/aztec/HeadingTest.kt
…-Android into issue/345-fixing-toolbar-highlight-issues

# Conflicts:
#	aztec/src/main/kotlin/org/wordpress/aztec/toolbar/AztecToolbar.kt
…-Android into issue/345-fixing-toolbar-highlight-issues
…-Android into issue/345-fixing-toolbar-highlight-issues
@khaykov
Copy link
Copy Markdown
Contributor Author

khaykov commented Jul 5, 2017

This also fixes #362

…-Android into issue/345-fixing-toolbar-highlight-issues

# Conflicts:
#	aztec/src/main/kotlin/org/wordpress/aztec/formatting/InlineFormatter.kt
@0nko 0nko self-assigned this Jul 14, 2017
@0nko
Copy link
Copy Markdown
Contributor

0nko commented Jul 14, 2017

For Test 2, after step 4 the style gets deselected automatically. Isn't that intentional?

…-Android into issue/345-fixing-toolbar-highlight-issues
@khaykov
Copy link
Copy Markdown
Contributor Author

khaykov commented Jul 14, 2017

Yes! It's intentional. Sorry, I copied the steps from the issue without changing them to reflect fixes :)

@0nko
Copy link
Copy Markdown
Contributor

0nko commented Jul 15, 2017

Nice work! :shipit:

@0nko 0nko merged commit 1b4e4de into develop Jul 15, 2017
@0nko 0nko deleted the issue/345-fixing-toolbar-highlight-issues branch July 15, 2017 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants