Skip to content

Support attribute_formatters#3781

Merged
SteffenDE merged 5 commits intophoenixframework:mainfrom
aptinio:attribute-formatters
May 4, 2025
Merged

Support attribute_formatters#3781
SteffenDE merged 5 commits intophoenixframework:mainfrom
aptinio:attribute-formatters

Conversation

@aptinio
Copy link
Copy Markdown
Contributor

@aptinio aptinio commented May 3, 2025

No description provided.

@aptinio aptinio force-pushed the attribute-formatters branch from ee38659 to 0e6a85c Compare May 3, 2025 01:45
@aptinio aptinio marked this pull request as ready for review May 3, 2025 01:51
@josevalim
Copy link
Copy Markdown
Member

This is looking great, just one comment. :)

@SteffenDE
Copy link
Copy Markdown
Collaborator

Nice!

@SteffenDE SteffenDE merged commit 108a828 into phoenixframework:main May 4, 2025
8 checks passed
@SteffenDE
Copy link
Copy Markdown
Collaborator

Thank you! 🙌🏻
Will be part of LiveView 1.1!

@aptinio aptinio deleted the attribute-formatters branch May 4, 2025 15:50
aptinio added a commit to aptinio/tailwind_formatter that referenced this pull request Jan 25, 2026
…tter

TailwindFormatter currently vendors Phoenix.LiveView.HTMLFormatter
code so that it can use the private `tokenize/1` function. However,
problems arise when the vendored code and the user's Phoenix.LiveView
version gets out of sync. A PR has been submitted to Phoenix.LiveView
team in the hopes of having this function publicly exposed:

phoenixframework/phoenix_live_view#3778

Instead, a suggestion was made to add an `:attribute_formatters` config
option to Phoenix.LiveView.HTMLFormatter. This has been available since
Phoenix.LiveView v1.1

phoenixframework/phoenix_live_view#3781

This PR removes the vendored code and converts TailwindFormatter from
a mix formatter to an attribute formatter of
Phoenix.LiveView.HTMLFormatter.
aptinio added a commit to aptinio/tailwind_formatter that referenced this pull request Jan 25, 2026
TailwindFormatter currently vendors Phoenix.LiveView.HTMLFormatter
code so that it can use the private `tokenize/1` function. However,
problems arise when the vendored code and the user's LiveView version
gets out of sync. A PR has been submitted to the Phoenix.LiveView team
in the hopes of having this function publicly exposed:

phoenixframework/phoenix_live_view#3778

Instead, a suggestion was made to add an `:attribute_formatters` config
option to Phoenix.LiveView.HTMLFormatter. This has been available since
Phoenix.LiveView v1.1

phoenixframework/phoenix_live_view#3781

This PR removes the vendored code and converts TailwindFormatter from
a mix formatter to an attribute formatter of
Phoenix.LiveView.HTMLFormatter.
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.

3 participants