Skip to content

Commit

Permalink
Fix manual embed width (#3910)
Browse files Browse the repository at this point in the history
* fix manual embed width

* changelog
  • Loading branch information
ruslandoga authored Mar 18, 2024
1 parent 4ae0054 commit 8c0e94f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ All notable changes to this project will be documented in this file.
- Fix crash when using special characters in filter plausible/analytics#3634
- Fix automatic scrolling to the bottom on the dashboard if previously selected properties tab plausible/analytics#3872
- Allow running the container with arbitrary UID plausible/analytics#2986
- Fix `width=manual` in embedded dashboards plausible/analytics#3910

## v2.0.0 - 2023-07-12

Expand Down
2 changes: 1 addition & 1 deletion lib/plausible_web/views/stats_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ defmodule PlausibleWeb.StatsView do

def stats_container_class(conn) do
cond do
conn.assigns[:embedded] && conn.assigns[:width] == "manual" -> ""
conn.assigns[:embedded] && conn.params["width"] == "manual" -> "px-6"
conn.assigns[:embedded] -> "max-w-screen-xl mx-auto px-6"
!conn.assigns[:embedded] -> "container print:max-w-full"
end
Expand Down

0 comments on commit 8c0e94f

Please sign in to comment.