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

Embeddable dashboard #812

Merged
merged 4 commits into from
Mar 10, 2021
Merged

Embeddable dashboard #812

merged 4 commits into from
Mar 10, 2021

Conversation

ukutaht
Copy link
Contributor

@ukutaht ukutaht commented Mar 9, 2021

Changes

New branch for embed mode based on #772. Mostly the same feature, thanks a lot @aymanterra @bradkane for your research and contributions on this. I'll see if I can add you as addition authors for the commit when I merge it.

The main change from the original PR is that the embed mode is done with no configuration or persistence on the server side. Shared links will always remove X-Frame-Options header and set SameSite: None; secure for cookies. This relaxed security is only applied to shared links, the rest of the application still uses secure browser headers and restricts cookie domain.

Since shared links are read-only, and specifically meant for sharing stats outside of Plausible, I don't think it introduces any security issues. Happy to be convinced otherwise.

TODO:

  • Theming for light/dark mode. Allow the parent page to specify which theme should be used.
  • Allow passing in the background color for the dashboard. Make sure transparent works.

EDIT: transparent backgound does work but the header looks a bit weird. Maybe transparent cannot work due to the sticky header we have.

I think this should be enough for a first release. We can add more elaborate external CSS theming in the future if there's demand.

Tests

  • Automated tests have been added

Changelog

  • Entry has been added to changelog

Documentation

  • Docs have been updated

Co-authored-by: aymanterra <aymanterra@users.noreply.github.com>
Co-authored-by: Brad Kane <bradkane@users.noreply.github.com>
@ukutaht ukutaht merged commit 844af69 into master Mar 10, 2021
@ukutaht ukutaht deleted the embeddable-dashboard branch March 10, 2021 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant