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

0.5.0 highlight diffs #636

Closed
olafurpg opened this Issue Dec 23, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@olafurpg
Member

olafurpg commented Dec 23, 2016

v0.5 makes big changes to the default style. For a detailed diff of example changes, see scala-repos (>100k lines of diff). Below are selected highlights to show the main categories of differences:

// curly braces can trigger a "select chain" (or dot `.` pipeline) to break
-    Repositories.filter { t =>
-      (t.originUserName === userName.bind) &&
-      (t.originRepositoryName === repositoryName.bind)
-    }.sortBy(_.userName asc).map(t => t.userName -> t.repositoryName).list
+    Repositories
+      .filter { t =>
+        (t.originUserName === userName.bind) &&
+        (t.originRepositoryName === repositoryName.bind)
+      }
+      .sortBy(_.userName asc)
+      .map(t => t.userName -> t.repositoryName)
+      .list
// large argument bodies are forced/locked into "config style" (eliminating a ton of "search state exploded" errors)
-    Account(userName = "user",
-            fullName = "user@localhost",
-            mailAddress = "",
-            password = "",
-            isAdmin = false,
-            url = None,
-            registeredDate = new Date(),
-            updatedDate = new Date(),
-            lastLoginDate = None,
-            image = image,
-            isGroupAccount = false,
-            isRemoved = false)
+    Account(
+      userName = "user",
+      fullName = "user@localhost",
+      mailAddress = "",
+      password = "",
+      isAdmin = false,
+      url = None,
+      registeredDate = new Date(),
+      updatedDate = new Date(),
+      lastLoginDate = None,
+      image = image,
+      isGroupAccount = false,
+      isRemoved = false
+    )
// argument lists of numeric literals are bin packed
-    private val encodeList: List[(MT, Int)] = List(1,
-                                                   5,
-                                                   10,
-                                                   15,
-                                                   20,
-                                                   30,
-                                                   40,
-                                                   50,
-                                                   60,
-                                                   80,
-                                                   100,
-                                                   150,
-                                                   200,
-                                                   300,
-                                                   400,
-                                                   600).zipWithIndex
+    private val encodeList: List[(MT, Int)] = List(1, 5, 10, 15, 20, 30, 40,
+      50, 60, 80, 100, 150, 200, 300, 400, 600).zipWithIndex
// parameter lists for lambdas and function types try to fit on single line
-  def apply[T](
-      in: NodeSeq,
-      cell: Cell[T],
-      jsEffect: (String, Boolean,
-                 JsCmd) => JsCmd)(f: T => NodeSeq => NodeSeq): NodeSeq =
+  def apply[T](in: NodeSeq,
+               cell: Cell[T],
+               jsEffect: (String, Boolean, JsCmd) => JsCmd)(
+      f: T => NodeSeq => NodeSeq): NodeSeq =

This is not an issue, just opened to get nice diff syntax highlighting.

@olafurpg olafurpg closed this Dec 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment