Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Fixes HTML importer to make image entity immutable #2184

Closed

Conversation

claudiopro
Copy link
Contributor

@claudiopro claudiopro commented Sep 19, 2019

Summary
Makes image entities created with the HTML importer immutable

This PR also adds the @flow annotation to the convertFromHTMLToContentBlocks test case and fixes typechecking failures that are surfaced by its addition.

To support a more modern syntax to handle nullable fields, it adds the @babel/plugin-proposal-optional-chaining plugin to Babel config.

Fixes #2149

Test Plan
Adds tests to verify created entities are immutable

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@claudiopro has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@claudiopro has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@claudiopro has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@claudiopro claudiopro deleted the import-immutable-image branch September 19, 2019 13:37
@facebook-github-bot
Copy link

@claudiopro merged this pull request in b858f43.

jdecked pushed a commit to twitter-forks/draft-js that referenced this pull request Oct 9, 2019
)

Summary:
**Summary**
Makes image entities created with the HTML importer immutable

This diff also adds the `flow` annotation to the `convertFromHTMLToContentBlocks` test case and fixes typechecking failures that are surfaced by its addition.

To support a more modern syntax to handle nullable fields, it adds the `babel/plugin-proposal-optional-chaining` plugin to Babel config.

Fixes facebookarchive#2149

**Test Plan**
Adds tests to verify created entities are immutable
Pull Request resolved: facebookarchive#2184

Reviewed By: j-nolan

Differential Revision: D17474930

Pulled By: claudiopro

fbshipit-source-id: c60ef368ff471914c2e188277a0ecc050115533b
mmissey pushed a commit to mmissey/draft-js that referenced this pull request Mar 24, 2020
)

Summary:
**Summary**
Makes image entities created with the HTML importer immutable

This diff also adds the `flow` annotation to the `convertFromHTMLToContentBlocks` test case and fixes typechecking failures that are surfaced by its addition.

To support a more modern syntax to handle nullable fields, it adds the `babel/plugin-proposal-optional-chaining` plugin to Babel config.

Fixes facebookarchive#2149

**Test Plan**
Adds tests to verify created entities are immutable
Pull Request resolved: facebookarchive#2184

Reviewed By: j-nolan

Differential Revision: D17474930

Pulled By: claudiopro

fbshipit-source-id: c60ef368ff471914c2e188277a0ecc050115533b
alicayan008 pushed a commit to alicayan008/draft-js that referenced this pull request Jul 4, 2023
Summary:
**Summary**
Makes image entities created with the HTML importer immutable

This diff also adds the `flow` annotation to the `convertFromHTMLToContentBlocks` test case and fixes typechecking failures that are surfaced by its addition.

To support a more modern syntax to handle nullable fields, it adds the `babel/plugin-proposal-optional-chaining` plugin to Babel config.

Fixes facebookarchive/draft-js#2149

**Test Plan**
Adds tests to verify created entities are immutable
Pull Request resolved: facebookarchive/draft-js#2184

Reviewed By: j-nolan

Differential Revision: D17474930

Pulled By: claudiopro

fbshipit-source-id: c60ef368ff471914c2e188277a0ecc050115533b
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

image entity should be immutable when pasting html
2 participants