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: Format boundaries without DOM #13697

Merged
merged 43 commits into from
Feb 8, 2019
Merged

RichText: Format boundaries without DOM #13697

merged 43 commits into from
Feb 8, 2019

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Feb 6, 2019

Description

This PR adds boundary logic to the Rich Text package. Every format will now have boundaries, not just some registered element tags.

Fixes 10 known bugs: closes #13153, closes #12973, closes #12978, closes #11091, closes #11178, closes #11276, closes #12529, closes #11741, closes #11423, closes #11812.

How has this been tested?

Screenshots

Types of changes

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.

youknowriad pushed a commit that referenced this pull request Mar 6, 2019
* Avoid flickering by setting boundary class when creating the DOM tree

* Remove TinyMCE boundaries

* Remove TinyMCE so it doesn't interfere with our boundaries

* Fix failing unit tests

* Only have one boundary class at a time

* Remove filterString param

* Build in own padding and boundary classes

* Update styling

* valueToFormat shouldn't create editable tree

* Add zero with spaces around formatting

* Remove old boundary compatibility code

* Update dom diff, prevent browser selection overwrite on boundary

* Update UI

* Fix inserting format with shortcut

* Add check

* Remove nbsp inserted by TinyMCE from test

* Do not mutate attirbutes object

* Fix link e2e tests

* WIP

* WIP: try boundaries without DOM

* Remove zero width space everywhere

* Fix e2e tests

* Clean up

* Revert selection snapshots

* Correctly remove dependencies

* Add nested boundary test

* Add backtick test

* Fix annotation tests: they now have boundaries

* Merge logic

* Fix getActiveFormat test

* Update some docs and dependencies

* Fix block CSS

* Return focus to editable after pressing format button

* Update docs

* Update changelogs

* Add changelog headings

* Remove obsolete onFocus class method from Editable

* Restore :focus

* Update TinyMCE mentions

* Use Escape instead of mouse move

* Update isHorizontalEdge comment

* Add docs for fromFormat

* Create test content manually
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
* Avoid flickering by setting boundary class when creating the DOM tree

* Remove TinyMCE boundaries

* Remove TinyMCE so it doesn't interfere with our boundaries

* Fix failing unit tests

* Only have one boundary class at a time

* Remove filterString param

* Build in own padding and boundary classes

* Update styling

* valueToFormat shouldn't create editable tree

* Add zero with spaces around formatting

* Remove old boundary compatibility code

* Update dom diff, prevent browser selection overwrite on boundary

* Update UI

* Fix inserting format with shortcut

* Add check

* Remove nbsp inserted by TinyMCE from test

* Do not mutate attirbutes object

* Fix link e2e tests

* WIP

* WIP: try boundaries without DOM

* Remove zero width space everywhere

* Fix e2e tests

* Clean up

* Revert selection snapshots

* Correctly remove dependencies

* Add nested boundary test

* Add backtick test

* Fix annotation tests: they now have boundaries

* Merge logic

* Fix getActiveFormat test

* Update some docs and dependencies

* Fix block CSS

* Return focus to editable after pressing format button

* Update docs

* Update changelogs

* Add changelog headings

* Remove obsolete onFocus class method from Editable

* Restore :focus

* Update TinyMCE mentions

* Use Escape instead of mouse move

* Update isHorizontalEdge comment

* Add docs for fromFormat

* Create test content manually
This was referenced Apr 30, 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
Projects
None yet
6 participants