watson-developer-cloud / discovery-components

IBM Watson Discovery components
https://watson-developer-cloud.github.io/discovery-components/storybook
Apache License 2.0
20 stars 38 forks source link

fix: make loading prop optional in HtmlView and fix style leaks #439

Closed noah-eigenfeld closed 2 years ago

noah-eigenfeld commented 2 years ago

What do these changes do/fix?

Makes the setLoading callback optional on the HtmlView component. Also adds style to the list of tags being removed by DomPurify when Html is rendered. This should prevent global styles from leaking into the rest of the application.

A future task intends to do a better job with style handling, and should make user documents retain some of their style without leakage: https://github.ibm.com/Watson-Discovery/disco-issue-tracker/issues/12210

How do you test/verify these changes?

n/a

Have you documented your changes (if necessary)?

n/a

Are there any breaking changes included in this pull request?

no