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

RichText: split out boundary style calculation #19319

Merged
merged 2 commits into from Dec 24, 2019
Merged

RichText: split out boundary style calculation #19319

merged 2 commits into from Dec 24, 2019

Conversation

@ellatrix
Copy link
Member

ellatrix commented Dec 24, 2019

Description

This is part of an ongoing effort to split RichText into smaller chunks to make it more readable and accessible.

This PR creates a BoundaryStyle component which reacts to the activeFormats by recalculating the right colour. Since it now depends the activeFormats reference, I made some changes to ensure the same reference is used across different indices.

How has this been tested?

Add some (nested) rich text formatting, ideally with different colours (like the link format). Use different ways to make it active: arrow keys, click, focus across instances...

Screenshots

Types of changes

Refactor

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .
@ellatrix ellatrix merged commit 6209052 into master Dec 24, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@ellatrix ellatrix deleted the try/boundary-style branch Dec 24, 2019
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.