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

Conversation

ellatrix
Copy link
Member

@ellatrix 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 added [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Code Quality Issues or PRs that relate to code quality [Package] Rich text /packages/rich-text labels Dec 24, 2019
@ellatrix ellatrix merged commit 6209052 into master Dec 24, 2019
@ellatrix ellatrix deleted the try/boundary-style branch December 24, 2019 15:01
@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
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Package] Rich text /packages/rich-text [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants