Disambiguate voilà frontend via html data attributes #1457
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References
finos/perspective#2588
finos/perspective#2352
finos/perspective#1773
Code changes
This PR fixes Perspective, and maybe some other plugins. But more importantly: "if one is going to distinguish behavior that is specific to Voila, it can't share classnames with Jupyter." One should be able to differentiate voilà-specific behavior, since there are legimate, often subtle UI/UX differences with Lab/Notebook.
User-facing changes
This adds some very basic html data attributes to the top level html body, namely
data-in-voila
. I don't think it matters what this string actually is, merely that it is present and unique to voilà. This attribute will allow extensions to differentiate the voilà frontend in what is, imo, a minimally invasive way.Backwards-incompatible changes
None!