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

Format logout #51

Merged
merged 9 commits into from
Dec 12, 2019
Merged

Format logout #51

merged 9 commits into from
Dec 12, 2019

Conversation

SimonLab
Copy link
Member

@SimonLab SimonLab commented Dec 12, 2019

format phoenix/elixir files with mix format
This PR might be better to look at after #49

@nelsonic nelsonic temporarily deployed to production-format-logou-muifka December 12, 2019 10:36 Inactive
@SimonLab SimonLab mentioned this pull request Dec 12, 2019
@SimonLab SimonLab requested a review from nelsonic December 12, 2019 10:41
@SimonLab SimonLab added the awaiting-review An issue or pull request that needs to be reviewed label Dec 12, 2019
@@ -12,25 +12,24 @@ defmodule AppWeb.PageController do
def index(conn, _params) do
url_oauth_google = ElixirAuthGoogle.generate_oauth_url(conn)
changeset = Person.changeset_registration(%Person{}, %{})
render(conn, "index.html",
[url_oauth_google: url_oauth_google, changeset: changeset])
render(conn, "index.html", url_oauth_google: url_oauth_google, changeset: changeset)
Copy link
Member

Choose a reason for hiding this comment

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

After running mix format this line is now 88 characters long ...
can we add line_length: 80 to .formatter.exs to avoid super-long-lines?
see: https://medium.com/blackode/code-formatter-the-big-feature-in-elixir-v1-6-0-f6572061a4ba

Copy link
Member Author

Choose a reason for hiding this comment

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

Added line_length: 80 👍

@nelsonic nelsonic temporarily deployed to production-format-logou-ombgkc December 12, 2019 11:10 Inactive
@nelsonic nelsonic added in-review Issue or pull request that is currently being reviewed by the assigned person and removed awaiting-review An issue or pull request that needs to be reviewed labels Dec 12, 2019
@@ -1,7 +1,8 @@
defmodule AppWeb.GoogleAuthController do
use AppWeb, :controller

@elixir_auth_google Application.get_env(:app, :elixir_auth_google) || ElixirAuthGoogle
@elixir_auth_google Application.get_env(:app, :elixir_auth_google) ||
ElixirAuthGoogle
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why mix format is indenting this ElixirAuthGoogle by 24 characters ... 😕
Not that it's a problem, I just want to understand if it's consistent. 💭

@@ -2,6 +2,8 @@
<img class="br-100 fl " width="32px" src="<%= @person.picture %>" />
</a>

<a class="db tr pointer dwyl-teal" href="<%= Routes.person_path(@conn, :logout) %>">Log out</a>
Copy link
Member

Choose a reason for hiding this comment

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

Apparently eex templates aren't checked for length by mix format ... 95 characters. 💭

@invalid_attrs %{email: nil, email_hash: nil, familyName: nil, givenName: nil, key_id: nil, password_hash: nil, username: nil, username_hash: nil}

@valid_attrs %{
email: "[email protected]",
Copy link
Member

Choose a reason for hiding this comment

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

This is more vertical scrolling but it's much easier read. 👍

Copy link
Member

@nelsonic nelsonic left a comment

Choose a reason for hiding this comment

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

@SimonLab mix format of logout code looks good. thanks. 👍

@nelsonic nelsonic merged commit d746db8 into master Dec 12, 2019
@nelsonic nelsonic deleted the format-logout branch December 12, 2019 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-review Issue or pull request that is currently being reviewed by the assigned person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants