plotly / dash-html-components

OBSOLETE - now part of https://github.com/plotly/dash
https://dash.plotly.com
Other
153 stars 49 forks source link

Several components have limited or no functionality in current browsers #129

Closed rpkyle closed 3 years ago

rpkyle commented 5 years ago

We recently prepared examples for dashHtmlComponents in advance of submission to CRAN.

As a result, several components were identified as non-functional or obsolete by those writing up the examples; this is most likely the result of browsers deprecating previously valid HTML elements.

A list of these follows below. :no_entry_sign: indicates a component which is suspected not to function anymore.

From @rpkyle:

From @CanerIrfanoglu:

From @sacul-git:

@alexcjohnson

rpkyle commented 5 years ago

I motion to deprecate the following components in the next dash-html-components and dashHtmlComponents releases, as they are no longer functional/supported in modern browsers, and propose to eventually remove these altogether:

@Marc-Andre-Rivet @alexcjohnson @wbrgss

HammadTheOne commented 4 years ago

htmlContent should also be removed if htmlShadow is being removed. It is used inside of Shadow DOM and is also deprecated and not supported by any widely used modern browser, see here.

rpkyle commented 4 years ago

Following a discussion offline, we've made the decision to retain the above components. Closing this issue.

mbauman commented 3 years ago

I'd kindly ask for reconsidering here — I understand that the components are dynamically generated, but the fact that the documentation is also dynamically generated makes it seem like these are fully functional bits and bobs to put into a dash.

In particular, even though <script> is a very functional HTML element htmlScript will never work in a dash (as it currently stands) because browsers don't execute <script>s inserted in the way react does it (via innerHTML). Including it in the documentation only leads folks down dead ends. Either it should use a different insertion mechanism, or it should have a bright big warning in the docs, or it should be removed entirely.

alexcjohnson commented 3 years ago

I do agree we should keep these components around. script in particular has some other uses like storing data. Typically this is used for the back-end to pass data to the front end on page load, but one could imagine scenarios where this is useful when Dash is part of a larger app, to pass data between pieces of that app.

But @mbauman is right that we should document these limitations better. Reopening as a documentation issue.

rpkyle commented 3 years ago

Possibly relevant to plotly/dashR#243, since we may want to document within the package also.