Skip to content

fix manual embed width - #3910

Merged
zoldar merged 2 commits into
masterfrom
fix-manual-embed-width
Mar 18, 2024
Merged

fix manual embed width#3910
zoldar merged 2 commits into
masterfrom
fix-manual-embed-width

Conversation

@ruslandoga

@ruslandoga ruslandoga commented Mar 17, 2024

Copy link
Copy Markdown
Contributor

Changes

This PR fixes plausible/docs#470

Here's how it looks in bg-red-200 mx-auto max-w-md container
Screenshot 2024-03-18 at 07 50 30

And here's how it looks in bg-red-200 container

Screenshot 2024-03-18 at 07 52 35

And here's how it looks on master (where max-w-screen-xl was applied regardless of width=manual)

Screenshot 2024-03-18 at 07 53 49

Tests

  • This PR does not require tests

Changelog

  • Entry has been added to changelog

Documentation

  • This change does not need a documentation update

Dark mode

  • The UI has been tested both in dark and light mode


def stats_container_class(conn) do
cond do
conn.assigns[:embedded] && conn.assigns[:width] == "manual" -> ""

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was no such assign. I thought about adding it but was afraid that it's used someplace else in the template. So instead I'm just checking the params.

def stats_container_class(conn) do
cond do
conn.assigns[:embedded] && conn.assigns[:width] == "manual" -> ""
conn.assigns[:embedded] && conn.params["width"] == "manual" -> "px-6"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still adding padding since it looks much nicer that way.

@ruslandoga
ruslandoga marked this pull request as ready for review March 17, 2024 23:57
@ruslandoga
ruslandoga requested a review from a team March 17, 2024 23:58
@zoldar
zoldar merged commit 8c0e94f into master Mar 18, 2024
@zoldar
zoldar deleted the fix-manual-embed-width branch March 18, 2024 08:37
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.

Manual width mode does not work

2 participants