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

Disambiguate voilà frontend via html data attributes #1457

Merged
merged 1 commit into from
Apr 6, 2024
Merged

Disambiguate voilà frontend via html data attributes #1457

merged 1 commit into from
Apr 6, 2024

Conversation

timkpaine
Copy link
Member

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!

Copy link
Contributor

github-actions bot commented Apr 5, 2024

Binder 👈 Launch a Binder on branch timkpaine/voila/tkp/cssselector

@trungleduc
Copy link
Member

Hi @timkpaine, IIUC you want to create plugins targeting only Voila? In this case, you can check for app.name ==='Voila' in the activation function.

@trungleduc trungleduc added the enhancement New feature or request label Apr 5, 2024
@timkpaine
Copy link
Member Author

timkpaine commented Apr 5, 2024

In this case, you can check for app.name ==='Voila' in the activation function.

I would like to tweak visual behavior in voilà, independent from lab/notebook. Since the behavior is visual, it is via css rules. So ideally a pure-css solution would be in place.

@trungleduc
Copy link
Member

Thanks @timkpaine

@trungleduc trungleduc merged commit 8115607 into voila-dashboards:main Apr 6, 2024
25 checks passed
@timkpaine timkpaine deleted the tkp/cssselector branch April 9, 2024 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants