Skip to content
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

Adds isSelected to RichText component and Paragraph, Heading blocks #237

Merged
merged 5 commits into from
Nov 15, 2018

Conversation

mzorz
Copy link
Contributor

@mzorz mzorz commented Nov 14, 2018

Fixes part of #113 (for RichText only)

This PR only updates the gutenberg (PR here) and react-native-aztec (Aztec wrapper PR) subprojects to make use of the corresponding additions of isSelected prop that propagates all the way down from Paragraph and Heading blocks down to RichText down to the Aztec RN wrapper to grab focus programmatically when one of these blocks get inserted.

focus_insert2

To test:

  1. start the app
  2. grab focus on any block, see the toolbar appears on the focused block
  3. tap on + to show the block-type picker
  4. tap on Heading or Paragraph blocks
  5. observe the new block is inserted, the selected block is the new block and the blinking cursor is on the new block as well.
  6. Repeat step 3 to 5 choosing the other block (Heading if you chose Paragraph previously, or viceversa).

NOTE: the focus is handled only in Paragraph and Heading blocks in this PR (both RichText-based, which in turn is powered by Aztec). Handling for other non-RichText-based blocks will be done in a separate PR.

@daniloercoli
Copy link
Contributor

Approved the GB companion PR.
Feel free to merge once the GB hash is updated here.

@mzorz mzorz merged commit b6b1c2c into master Nov 15, 2018
@mzorz mzorz deleted the try/add-is-selected-rich-text branch November 15, 2018 13:13
Sign up for free to 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.

None yet

2 participants