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: Mark onSetup, getSettings as unstable APIs #9106

Merged
merged 3 commits into from
Aug 20, 2018

Conversation

aduth
Copy link
Member

@aduth aduth commented Aug 17, 2018

This pull request seeks to deprecate the following two props of RichText, while still making them available as intentionally-flagged "unstable" equivalent props:

  • getSettings
    • Now available as unstableGetSettings
  • onSetup
    • Now available as unstableOnSetup

These changes follow a similar pattern to that of #7029 (unstableOnFocus), where the intent is to discourage use of these props, which are already undocumented. Their existence is undesirable, but necessary in current implementations of core blocks. Until the core blocks can be refactored to avoid them, they are marked as unstable to discourage other developers from considering adoption.

These props are considered undesirable because they pierce the abstraction RichText is intended to serve atop TinyMCE. Respectively they are intended to allow a consumer to override TinyMCE settings or to receive the initialized TinyMCE instance.

Testing instructions:

Verify that there are no regressions in the behavior of the List and Table blocks.

Then revert a9a6792 in your local copy of the branch to reintroduce the deprecated prop usage. Verify that the blocks still operate as expected, but log a deprecated warning in the process.

@aduth aduth added [Component] TinyMCE [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable labels Aug 17, 2018
@gziolo gziolo requested review from ellatrix and gziolo August 20, 2018 06:50
Copy link
Member

@ellatrix ellatrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@gziolo gziolo added the [Type] Breaking Change For PRs that introduce a change that will break existing functionality label Aug 20, 2018
@gziolo gziolo added this to the 3.7 milestone Aug 20, 2018
@gziolo
Copy link
Member

gziolo commented Aug 20, 2018

We still need to update deprecations docs page.

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 [Type] Breaking Change For PRs that introduce a change that will break existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants