Skip to content
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

Build(deps): Bump phoenix_html from 3.3.4 to 4.1.1 #387

Merged
merged 6 commits into from
Oct 4, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 30, 2024

Necessary Changes

Needed to replace the form

Visual changes

Thanks to the form component being happy to tell you it's valid/non valid there is an additional check mark now. Since it's also there when it's actually invalid we probably want to remove it... probably by creating an even separate component/option to hide the valid check mark.

Before:

Screenshot from 2024-10-04 09-16-53

Now:

image

Other changes

Added a required attribute which is the only real validation so that already happens client side, as error handling was also broken before and this seems nicer :)

Todos

  • Test: I could comment out the whole form and all tests passed, which doesn't make me feel easy

Original dependabot fun

Bumps phoenix_html from 3.3.4 to 4.1.1.

Changelog

Sourced from phoenix_html's changelog.

v4.1.1 (2024-03-01)

  • Fix dependency resolution error

v4.1.0 (2024-02-29)

  • Enhancements
    • Introduce form :action and consider input as changed if action changes to support better change tracking

v4.0.0 (2023-12-19)

This version removes deprecated functionality and moved all HTML helpers to a separate library. HTML Helpers are no longer used in new apps from Phoenix v1.7, instead it relies on function components from Phoenix.LiveView. Older applications who wish to maintain compatibility, add {:phoenix_html_helpers, "~> 1.0"} to your mix.exs and then replace use Phoenix.HTML in your applications by:

import Phoenix.HTML
import Phoenix.HTML.Form
use PhoenixHTMLHelpers

v3.3.3 (2023-10-09)

  • Enhancements
    • Allow string fields on input_changed?

v3.3.2 (2023-08-10)

  • Enhancements

    • Address deprecations in Elixir v1.16+
  • Deprecations

    • Deprecate inputs_for/2 and inputs_for/3 (without anonymous functions)

v3.3.1 (2023-02-27)

  • Bug fix
    • Set display to none on generated forms
    • Warn for maps with atom keys

v3.3.0 (2023-02-10)

  • Enhancements

    • Support deeply nested class lists
    • Implement Phoenix.HTML.Safe for URI
    • Implement Phoenix.HTML.FormData for Map
  • Bug fix

    • Generate unique IDs for checkboxes based on the value
    • Use artificial button click instead of form.submit in JavaScript to trigger all relevant events
    • Fix a bug where nil/false/true attributes in aria/data/phx would emit empty or literal values, such as "true" and "false". This release aligns them with all other attributes so both nil and false emit nothing. true emits the attribute with no value.
  • Deprecations

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file elixir Pull requests that update Elixir code labels Sep 30, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Sep 30, 2024

Dependabot tried to update this pull request, but something went wrong. We're looking into it, but in the meantime you can retry the update by commenting @dependabot rebase.

1 similar comment
Copy link
Contributor Author

dependabot bot commented on behalf of github Oct 2, 2024

Dependabot tried to update this pull request, but something went wrong. We're looking into it, but in the meantime you can retry the update by commenting @dependabot rebase.

@PragTob PragTob self-assigned this Oct 2, 2024
@PragTob
Copy link
Collaborator

PragTob commented Oct 4, 2024

I am the captain now

@PragTob PragTob force-pushed the dependabot/hex/phoenix_html-4.1.1 branch from 3baf70e to ea7feec Compare October 4, 2024 06:32
@PragTob PragTob force-pushed the dependabot/hex/phoenix_html-4.1.1 branch from 9e32f7d to 68ae39c Compare October 4, 2024 08:46
@JannikStreek
Copy link
Member

JannikStreek commented Oct 4, 2024

The visual check mark is now present basically in all inputs since we switched to components, e.g. in the admin page or idea forms (creating a new idea). I would prefer to have it initially without the green check mark, especially as it's sometimes wrong and you have to provide data before it's valid (so the green check is misleading). But its also not critical, so we can make a separate issue to of it ?

@PragTob
Copy link
Collaborator

PragTob commented Oct 4, 2024

Separate issue sounds good. It seems like it's always initially there to be more "positive" I guess as it always defaults the errors to empty if the input wasn't used before:

  def input(%{field: %Phoenix.HTML.FormField{} = field} = assigns) do
    errors = if Phoenix.Component.used_input?(field), do: field.errors, else: []

    # the other stuff
  end

I guess we could easily instead pass on a value like "unused" for which we'd neither display the is-valid or is-error classes

dependabot bot and others added 6 commits October 4, 2024 11:32
Bumps [phoenix_html](https://github.com/phoenixframework/phoenix_html) from 3.3.4 to 4.1.1.
- [Changelog](https://github.com/phoenixframework/phoenix_html/blob/main/CHANGELOG.md)
- [Commits](phoenixframework/phoenix_html@v3.3.4...v4.1.1)

---
updated-dependencies:
- dependency-name: phoenix_html
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Took me way too long to find `form_group_wrapper={false}`.
@PragTob PragTob force-pushed the dependabot/hex/phoenix_html-4.1.1 branch from 68ae39c to 8aba46e Compare October 4, 2024 09:32
@PragTob PragTob enabled auto-merge (squash) October 4, 2024 09:34
@PragTob PragTob mentioned this pull request Oct 4, 2024
@PragTob PragTob merged commit ac94ec3 into master Oct 4, 2024
8 checks passed
@PragTob PragTob deleted the dependabot/hex/phoenix_html-4.1.1 branch October 4, 2024 09:35
@PragTob
Copy link
Collaborator

PragTob commented Oct 4, 2024

Follow up issue: #407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file elixir Pull requests that update Elixir code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants