Skip to content

Embeddable dashboard - #812

Merged
ukutaht merged 4 commits into
masterfrom
embeddable-dashboard
Mar 10, 2021
Merged

Embeddable dashboard#812
ukutaht merged 4 commits into
masterfrom
embeddable-dashboard

Conversation

@ukutaht

@ukutaht ukutaht commented Mar 9, 2021

Copy link
Copy Markdown
Contributor

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

@ukutaht
ukutaht force-pushed the embeddable-dashboard branch from 83714e8 to 239b60b Compare March 10, 2021 09:25
@ukutaht ukutaht mentioned this pull request Mar 10, 2021
Co-authored-by: aymanterra <aymanterra@users.noreply.github.com>
Co-authored-by: Brad Kane <bradkane@users.noreply.github.com>
@ukutaht
ukutaht force-pushed the embeddable-dashboard branch from d60d76d to ece4ead Compare March 10, 2021 09:36
@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.

1 participant