Skip to content

Changes required to be able to use phoenix_html v4+ #57

@dushyantss

Description

@dushyantss

Below are the changes we needed to do in our fork of this repo and in our app to make it work with phoenix_html v4+

To be able to use phoenix_html v4+ we need to use the current main branch of the main surface library(commit eb32f370f75d332d2b3fdec6a0c16882676f788f as of writing). That version has extracted all form helpers out into a new library surface_form. Since this repo doesn't have surface_form as a dependency, at least in the latest commit, we've had to fork it and add that dependency. We also needed to update the catalogues function as some of the catalogues were moved into the new library.

Here are the changes:

# fork's mix.exs

# in def deps do, replace `{:surface, "~> 0.10", github: "surface-ui/surface"}` with

{:surface,
       github: "surface-ui/surface",
       ref: "eb32f370f75d332d2b3fdec6a0c16882676f788f",
       override: true},
      {:surface_form,
       github: "surface-ui/surface_form", ref: "3da6cf734bae2ef63e2f864633f109663f56b5ad"},
# app's mix.exs

# def catalogues do
# Add this, as some catalogue moved over to surface_form lib
"deps/surface_form/priv/catalogue"

# def deps do
{:surface,
 github: "surface-ui/surface",
 ref: "eb32f370f75d332d2b3fdec6a0c16882676f788f",
 override: true},
{:surface_catalogue,
 github: "<your-username>/surface_catalogue", ref: "<the-commit-hash>"},
{:surface_form,
 github: "surface-ui/surface_form", ref: "3da6cf734bae2ef63e2f864633f109663f56b5ad"},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions