Skip to content

Conversation

@ukutaht
Copy link
Contributor

@ukutaht ukutaht commented Sep 30, 2025

Changes

Upgrades to Phoenix 1.18 and Liveview 1.1.

Some changes are due to new mix format rules coming from updated deps.

bcyrpt was also updated due to elixir_make dependency for NIFs. Needed in order to bring in the required lazy_html for the new liveview version.

phoenix_storybook updated to 0.9.0. Even though we want some sort of styleguide, I'm considering removing this dependency in the future and hand-rolling a replacement or something, IDK. It's not easy to work with it.

TODO:

  • Remove Floki completely in favor of LazyHTML
  • Review whether :browser_sso_notice pipeline requires put_root_layout

Future possibilities:

  • Set up colocated hooks

true <- html?(response),
{:ok, html} <- Floki.parse_document(body),
[_ | _] <- Floki.find(html, ~s|meta[name="#{@prefix}"][content="#{domain_identifier}"]|) do
html <- LazyHTML.from_document(body),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This passes tests. It's the only production code where I've migrated from Floki -> LazyHTML in this PR.

@ukutaht
Copy link
Contributor Author

ukutaht commented Oct 1, 2025

I've completely refactored our Floki usage over to the new LazyHTML. However, the one place I didn't do it is in the installation/verification checks code.

@RobertJoonas @apata once we're on scriptV2, can we remove the old checks that use Floki? In that case I would wait for next week to completely remove Floki. If we still need HTML parsing in Elixir, I will refactor over to LazyHTML in this PR. Do we need these backend checks going forward?

@ukutaht ukutaht marked this pull request as ready for review October 1, 2025 17:06
@ukutaht ukutaht requested a review from a team October 1, 2025 17:06
@RobertJoonas
Copy link
Contributor

once we're on scriptV2, can we remove the old checks that use Floki? In that case I would wait for next week to completely remove Floki. If we still need HTML parsing in Elixir, I will refactor over to LazyHTML in this PR. Do we need these backend checks going forward?

@ukutaht yes, all the LegacyVerification code will be removed. That includes:

  • Plausible.InstallationSupport.LegacyVerification.Checks
  • Plausible.InstallationSupport.LegacyVerification.Diagnostics
  • Plausible.InstallationSupport.LegacyVerification.Errors
  • Plausible.InstallationSupport.Checks.CSP
  • Plausible.InstallationSupport.Checks.FetchBody
  • Plausible.InstallationSupport.Checks.Installation
  • Plausible.InstallationSupport.Checks.ScanBody
  • Plausible.InstallationSupport.Checks.SnippetCacheBust
  • Plausible.InstallationSupport.Checks.Snippet

@ukutaht
Copy link
Contributor Author

ukutaht commented Oct 3, 2025

OK good, then I won't put any effort into refactoring those

@zoldar zoldar added the preview label Oct 7, 2025
@github-actions
Copy link

github-actions bot commented Oct 7, 2025

Preview environment👷🏼‍♀️🏗️
PR-5766

@ukutaht ukutaht added this pull request to the merge queue Oct 7, 2025
Merged via the queue into master with commit f3d326b Oct 7, 2025
16 checks passed
@ukutaht ukutaht deleted the upgrade-phoenix branch October 7, 2025 18:11
aerosol pushed a commit that referenced this pull request Oct 8, 2025
* Upgrade phoenix and phoenix_live_view

* Use new phoenix controller options

* Run mix format

* Upgrade lazy_html and bcrypt

* Always put root layout

* Remove deprecated use Plug.Test

* Escpaing updates for LazyHTML

* Fix double layouts in site settings

* Fix more escaping in tests

* More LazyHTML updates

* Fix remaining LazyHTML issues

* More Floki -> LazyHTML conversions

* More Floki -> LazyHTML conversions

* Fix another issue with Floki -> LazyHTML

* Fix another lazyHTML issue

* Remove parsing from tree

* Fix HTML escaping in teams_test

* More test fixes

* More test fixes

* Add layout to browser_sso_notice pipeline

* Extract elem_count helper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants