-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix class name typo and include it in safelist #2610
fix class name typo and include it in safelist #2610
Conversation
@@ -52,7 +52,7 @@ defmodule PlausibleWeb.StatsView do | |||
def stats_container_class(conn) do | |||
cond do | |||
conn.assigns[:embedded] && conn.assigns[:width] == "manual" -> "" | |||
conn.assigns[:embedded] -> "max-width-screen-lg mx-auto" | |||
conn.assigns[:embedded] -> "max-w-screen-lg mx-auto" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if it was supported in tailwind v1 or v2 or if it's just a typo, but there doesn't seem to be a max-width-screen-lg
class anymore: https://tailwindcss.com/docs/max-width
seems like it was a typo introduced in #2148
BundleMonUnchanged files (8)
No change in files bundle size Final result: ✅ View report in BundleMon website ➡️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Thanks for adding to the safelist :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One concern: the embed dashboard is quite difficult to test because people use it in very different setups. If this class wasn't being applied, what do you think of actually removing it to keep to same behavior?
I know @metmarkosaric uses the embedded dashboard: https://markosaric.com/stats/, so we can ask him what to do :) With the fix it looks like this: |
looks the same to me? any difference that i don't see? |
ah ok so with this change we don't allow people to choose the width or if it's not specified we show narrow width rather than full width by default? |
This. |
hmm i'm unsure if this breaks the UI and design of some people that are happy with the full width. is there a reason to change this at all? seems fine to me the way it is. full width by default but you get to pick a manual width if you prefer that. it's already documented too |
Full width by default is a bug: #2514.
From https://plausible.io/docs/embed-dashboard#manual-width-mode:
|
ok cool. i guess it's fine if this change wasn't intentional but a mistake. it's not something we discussed either. i'll let Vini decide |
narrow by default does look nicer! |
Thanks, @ruslandoga! |
Changes
Fixes #2514
This PR fixes the class name used for embedded dashboards and includes it in a safelist to avoid purging.
Tests
Changelog
Documentation
Dark mode