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

Prepare for next Surface version 0.11.2 #75

Merged
merged 6 commits into from
Feb 9, 2024
Merged

Conversation

tiagoefmoraes
Copy link
Member

@tiagoefmoraes tiagoefmoraes commented Feb 8, 2024

  • Updates Erlang to 26.2.2 and Elixir to 1.16.1
  • Updates Phoenix to 1.7.10 and Surface to next version
  • Fixes warnings
warning: you are accessing the variable "id" inside a LiveView template.

Using variables in HEEx templates are discouraged as they disable change tracking. You are only allowed to access variables defined by Elixir control-flow structures, such as if/case/for, or those defined by the special attributes :let/:if/:for. If you are shadowing a variable defined outside of the template using a control-flow structure, you must choose a unique variable name within the template.

Instead of:

    def add(assigns) do
      result = assigns.a + assigns.b
      ~H"the result is: <%= result %>"
    end

You must do:

    def add(assigns) do
      assigns = assign(assigns, :result, assigns.a + assigns.b)
      ~H"the result is: <%= @result %>"
    end

  lib/surface_site_web/components/component_info.ex:63: SurfaceSiteWeb.Components.ComponentInfo.render/1

warning: undefined assign `@id`.

Available assigns in SurfaceSiteWeb.Components.ComponentInfo: @examples, @module_name, @module_doc, @module_summary, @id, @examplesPosition, @title, @module, @inner_block.

Hint: You can define assigns using any of the available macros (`prop`, `data` and `slot`).

For instance: `prop id, :any`

  lib/surface_site_web/components/component_info.ex:63: SurfaceSiteWeb.Components.ComponentInfo.render/1

@tiagoefmoraes tiagoefmoraes self-assigned this Feb 8, 2024
@tiagoefmoraes tiagoefmoraes marked this pull request as ready for review February 8, 2024 17:27
@tiagoefmoraes tiagoefmoraes merged commit d94e65b into main Feb 9, 2024
1 check passed
@tiagoefmoraes tiagoefmoraes deleted the next_surface branch February 9, 2024 17:04
@tiagoefmoraes tiagoefmoraes restored the next_surface branch February 19, 2024 18:03
@tiagoefmoraes tiagoefmoraes deleted the next_surface branch February 19, 2024 19:06
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.

2 participants