A list of somewhat important™️ links regarding 35c3.
A small collection of 34c3 related urls.
A curated list of amazingly awesome Elixir and Erlang libraries, resources and shiny things.
More a POC than code
optikfluffel/coffee-resque-demo 1
A little Demo of Coffee-Resque together with node.js and express.js
optikfluffel/CongressChecklist 1
A list of things to do, to pack and tips on attending a congress, especially Chaos Communication Congress.
Hackathon Berlin
optikfluffel/1maetsch.github.io 0
A dating pApp.
An animated counter based on Polymer
Pull request review commentphoenixframework/phoenix
Disable FLoC by default when creating a new project
defmodule Phoenix.Endpoint do def server?(otp_app, endpoint) when is_atom(otp_app) and is_atom(endpoint) do Phoenix.Endpoint.Supervisor.server?(otp_app, endpoint) end++ @doc """+ Disables FLoC on Google Chrome browsers.++ This function adds the HTTP-header `Permission-Policy: interest-cohort=()` to the response,+ which tells the browser to exclude the page from the the FLoC calculation.
which tells the browser to exclude the page from the FLoC calculation.
comment created time in an hour
Pull request review commentphoenixframework/phoenix
Disable FLoC by default when creating a new project
defmodule Phoenix.Endpoint do def server?(otp_app, endpoint) when is_atom(otp_app) and is_atom(endpoint) do Phoenix.Endpoint.Supervisor.server?(otp_app, endpoint) end++ @doc """+ Disables FLoC on Google Chrome browsers.++ This function adds the HTTP-header `Permission-Policy: interest-cohort=()` to the response,+ which tells the browser to exclude the page from the the FLoC calculation.++ For more information regarding FLoC, please visit https://web.dev/floc.
For more information regarding FLoC, please visit <https://web.dev/floc>.
comment created time in an hour
startednsauzede/mytstc
started time in 2 hours
Pull request review commentphoenixframework/phoenix_live_view
%{- "earmark_parser": {:hex, :earmark_parser, "1.4.12", "b245e875ec0a311a342320da0551da407d9d2b65d98f7a9597ae078615af3449", [:mix], [], "hexpm", "711e2cc4d64abb7d566d43f54b78f7dc129308a63bc103fbd88550d2174b3160"},
Unused dependencies.
comment created time in 2 hours
Pull request review commentphoenixframework/phoenix_live_view
defmodule Phoenix.LiveView.Diff do case cid_to_component do %{^cid => {component, _id, assigns, private, fingerprints}} ->- socket
Here and below source code format was fixed.
comment created time in 2 hours
Pull request review commentphoenixframework/phoenix_live_view
name: CI on:- pull_request: push:- branches:+ pull_request:+ branches: - master jobs: mix_test: name: mix test (OTP ${{matrix.otp}} | Elixir ${{matrix.elixir}})+ strategy: matrix: include:- - otp: 21.3.8.16- elixir: 1.7.4- - otp: 21.3.8.16- elixir: 1.8.2- - otp: 21.3.8.16- elixir: 1.9.4- - otp: 21.3.8.16- elixir: 1.10.4- - otp: 23.0.2- elixir: 1.10.4+ - elixir: 1.7.4+ otp: 21.3.8.16++ - elixir: 1.8.2+ otp: 21.3.8.16++ - elixir: 1.9.4+ otp: 21.3.8.16++ - elixir: 1.10.4+ otp: 21.3.8.16++ - elixir: 1.10.4+ otp: 23.0.2++ - elixir: 1.11.4+ otp: 23.3.1+ lint: lint+ runs-on: ubuntu-latest+ steps:- - uses: actions/checkout@v2- - uses: erlef/setup-elixir@v1+ - name: Checkout+ uses: actions/checkout@v2++ - name: Set up Elixir+ uses: erlef/setup-elixir@v1 with:- otp-version: ${{matrix.otp}}- elixir-version: ${{matrix.elixir}}- - name: Install Dependencies- run: |- mix local.rebar --force- mix local.hex --force- mix deps.get- - name: Run Tests+ elixir-version: ${{ matrix.elixir }}+ otp-version: ${{ matrix.otp }}++ - name: Restore deps and _build cache
Cache dependencies to speed up workflow run
comment created time in 2 hours
Pull request review commentphoenixframework/phoenix_live_view
name: CI on:- pull_request: push:- branches:+ pull_request:+ branches: - master jobs: mix_test: name: mix test (OTP ${{matrix.otp}} | Elixir ${{matrix.elixir}})+ strategy: matrix: include:- - otp: 21.3.8.16- elixir: 1.7.4- - otp: 21.3.8.16- elixir: 1.8.2- - otp: 21.3.8.16- elixir: 1.9.4- - otp: 21.3.8.16- elixir: 1.10.4- - otp: 23.0.2- elixir: 1.10.4+ - elixir: 1.7.4+ otp: 21.3.8.16++ - elixir: 1.8.2+ otp: 21.3.8.16++ - elixir: 1.9.4+ otp: 21.3.8.16++ - elixir: 1.10.4+ otp: 21.3.8.16++ - elixir: 1.10.4+ otp: 23.0.2++ - elixir: 1.11.4
Add latest Elixir and OTP releases into the matrix
comment created time in 2 hours
Pull request review commentphoenixframework/phoenix_live_view
name: CI on:- pull_request: push:- branches:+ pull_request:+ branches: - master jobs: mix_test: name: mix test (OTP ${{matrix.otp}} | Elixir ${{matrix.elixir}})+ strategy: matrix: include:- - otp: 21.3.8.16- elixir: 1.7.4- - otp: 21.3.8.16- elixir: 1.8.2- - otp: 21.3.8.16- elixir: 1.9.4- - otp: 21.3.8.16- elixir: 1.10.4- - otp: 23.0.2- elixir: 1.10.4+ - elixir: 1.7.4+ otp: 21.3.8.16++ - elixir: 1.8.2+ otp: 21.3.8.16++ - elixir: 1.9.4+ otp: 21.3.8.16++ - elixir: 1.10.4+ otp: 21.3.8.16++ - elixir: 1.10.4+ otp: 23.0.2++ - elixir: 1.11.4+ otp: 23.3.1+ lint: lint+ runs-on: ubuntu-latest+ steps:- - uses: actions/checkout@v2- - uses: erlef/setup-elixir@v1+ - name: Checkout+ uses: actions/checkout@v2++ - name: Set up Elixir+ uses: erlef/setup-elixir@v1 with:- otp-version: ${{matrix.otp}}- elixir-version: ${{matrix.elixir}}- - name: Install Dependencies- run: |- mix local.rebar --force
rebar and hex are updated in erlef/setup-elixir
action itself, no need to do that again.
comment created time in 2 hours
Pull request review commentphoenixframework/phoenix_live_view
name: CI on:- pull_request: push:
Running tests only on master branch does not seem right.
comment created time in 2 hours
Pull request review commentphoenixframework/phoenix_live_view
name: CI on:- pull_request: push:- branches:+ pull_request:+ branches: - master jobs: mix_test: name: mix test (OTP ${{matrix.otp}} | Elixir ${{matrix.elixir}})+ strategy: matrix: include:- - otp: 21.3.8.16
It is hard to read this matrix without line breaks.
comment created time in 2 hours
PR opened phoenixframework/phoenix_live_view
Several small updates of CI workflow. Changes are described below.
pr created time in 2 hours
push eventphoenixframework/phoenix_live_view
commit sha 224b3994498df67fab299564eb33bc50e4931c1b
Correct docs for live_isolated/3 (#1414) (#1420) The `connect_params` opt wasn't passed through to where it was needed, but `put_connect_params/2` works and the API is clear.
push time in 3 hours
PR merged phoenixframework/phoenix_live_view
The connect_params
opt wasn't passed through to where it was needed, but put_connect_params/2
works and the API is clear.
Closes #1414.
pr closed time in 3 hours
issue closedphoenixframework/phoenix_live_view
live_isolated/3 connect_params option doesn't work as documented?
G'day!
Environment
- Elixir version: Elixir 1.11.4 (compiled with Erlang/OTP 23)
- Phoenix version: 1.5.8
- Phoenix LiveView version: 0.15.4
- NodeJS version: v14.16.0
- NPM version: 6.14.11
- Operating system: macOS
- Browsers you attempted to reproduce this bug on (the more the merrier): mix test
- Does the problem persist after removing "assets/node_modules" and trying again? yes
Actual behavior
Given this test code:
assert {:ok, %View{module: MainView}, <<_::binary>>} =
live_isolated(conn, MainView, session: %{}, connect_params: %{"param" => value})
When MainView.mount/3
is called with a connected socket, get_connect_params(socket)
doesn't return the connect_params
from the opts
argument to live_isolated/3
.
Investigating,LiveView.Static.render/3
returns an {:ok, content, socket_assigns}
and the case clause doesn't use the opts
argument. If I'm reading it right, the only use of opts
is after it's re-bound in the match of the second clause?
# lib/phoenix_live_view/test/live_view_test.ex:220
defmacro live_isolated(conn, live_view, opts \\ []) do
quote bind_quoted: binding(), unquote: true do
unquote(__MODULE__).__isolated__(conn, @endpoint, live_view, opts)
end
end
@doc false
def __isolated__(conn, endpoint, live_view, opts) do
put_in(conn.private[:phoenix_endpoint], endpoint || raise("no @endpoint set in test case"))
|> Plug.Test.init_test_session(%{})
|> Phoenix.LiveView.Router.fetch_live_flash([])
|> Phoenix.LiveView.Controller.live_render(live_view, opts)
|> connect_from_static_token(nil)
end
# lib/phoenix_live_view/controller.ex:34
def live_render(%Plug.Conn{} = conn, view, opts \\ []) do
case LiveView.Static.render(conn, view, opts) do
{:ok, content, socket_assigns} ->
conn
|> Phoenix.Controller.put_view(LiveView.Static)
|> LiveView.Plug.put_cache_headers()
|> Phoenix.Controller.render(
"template.html",
Map.merge(socket_assigns, %{content: content, live_module: view})
)
{:stop, %Socket{redirected: {:redirect, opts}} = socket} ->
conn
|> put_flash(LiveView.Utils.get_flash(socket))
|> Phoenix.Controller.redirect(Map.to_list(opts))
{:stop, %Socket{redirected: {:live, _, %{to: to}}} = socket} ->
conn
|> put_flash(LiveView.Utils.get_flash(socket))
|> Plug.Conn.put_private(:phoenix_live_redirect, true)
|> Phoenix.Controller.redirect(to: to)
end
end
Workaround
Use Phoenix.LiveViewTest.put_connect_params/2
, instead:
assert {:ok, %View{module: MainView}, <<_::binary>>} =
conn
|> put_connect_params(%{"param" => value})
|> live_isolated(conn, MainView, session: %{})
Expected behavior
connect_params
works as documented, if I'm reading it right, or is no longer documented.
closed time in 3 hours
garthkpull request commentphoenixframework/phoenix_live_view
Correct docs for live_isolated/3 (#1414)
Thanks @garthk! <3
comment created time in 3 hours
PR opened phoenixframework/phoenix_live_view
The connect_params
opt wasn't passed through to where it was needed, but put_connect_params/2
works and the API is clear.
Closes #1414.
pr created time in 3 hours
pull request commentphoenixframework/phoenix
Disable FLoC by default when creating a new project
would you like to work on a PR for Controller.put_permissions_policy/2?
I'd gladly do so. I'd start a new PR and close this one. Thanks for the suggestions!
comment created time in 3 hours
pull request commentphoenixframework/phoenix
Disable FLoC by default when creating a new project
To be clear, in retrospect I don't think my commit is the way to go, either. It was a "quick change" but I'd rather we were more explicit about the behaviour.
@Awlexus would you like to work on a PR for Controller.put_permissions_policy/2
?
Then we can add it to the router template in the installer just above :put_secure_browser_headers. In the future if someone doesn't want it they can just remove it from the pipeline, but adding it will be just as easy for existing installs :)
comment created time in 3 hours
pull request commentphoenixframework/phoenix
Disable FLoC by default when creating a new project
Thanks @mcrumm, that's the feedback I was hoping for.
the more I read about Permissions-Policy the more it seemed like something that should be a Plug in its own right, something like put_permissions_policy/2
I honestly had only thought of disabling FLoC, but adding proper support for this header would be preferable and I like the approach you mentioned :heart:
Glad too see that there are more people pushing for sane privacy defaults! Should I close this PR in favour your idea?
comment created time in 4 hours
push eventphoenixframework/phoenix
commit sha 385bdebdcc879dfb06f02faa5bef7d5e0b97761c
Update changelog with `--database sqlite3` changes (#4298)
push time in 4 hours
PR merged phoenixframework/phoenix
Forgot to add this in #4268
pr closed time in 4 hours
pull request commentphoenixframework/phoenix
Update changelog with `--database sqlite3` changes
Thanks!
comment created time in 4 hours
pull request commentphoenixframework/phoenix
Disable FLoC by default when creating a new project
Hi @Awlexus and thanks for the PR! I am 💯 on this, so much so that I began a similar effort last night (151fdd0d) :)
I stopped short of opening a PR because the more I read about Permissions-Policy
the more it seemed like something that should be a Plug in its own right, something like put_permissions_policy/2
:
plug :put_permissions_policy, %{
"geolocation" => ~w(self "https://foo.com"),
"camera" => [],
"fullscreen" => "*"
}
Then we could default to [{"interest-cohort", []}]
and build overrides similarly to put_secure_browser_headers/2
. Wdyt?
// @phoenixframework/phoenix-core
comment created time in 4 hours
PR opened phoenixframework/phoenix
As the title says, this pull request tries to disable FLoC on Google Chrome by default when creating a new project. I didn't add any tests yet, because I was ensure whether defining the function to disable this feature would fit into the Phoenix.Endpoint
module and would appreciate further feedback. Thanks in advance!
pr created time in 5 hours
issue commentDagAgren/toot
It was added in fall. (Note this is for custom emojo, not regular OS emoji.)
comment created time in 6 hours
pull request commentphoenixframework/phoenix_live_view
Correct `Phoenix.LiveView.Socket.t` / `host_uri` typespec
:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:
comment created time in 6 hours
push eventphoenixframework/phoenix_live_view
commit sha 8be38827ede8efc5a8b45545ac954ba98eda81a5
Correct `Phoenix.LiveView.Socket.t` / `host_uri` typespec (#1419)
push time in 6 hours
startednatjms/resin
started time in 6 hours