Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ fun PreviewDisplay(
with(coordinateTransformer) {
val surfaceCoords = it.transform()
Log.d(
"TAG",
TAG,
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the change to use the TAG constant is an improvement for consistency, the presence of this Log.d statement itself should be scrutinized 1. The repository's guidelines suggest that Log.d calls are often remnants of debugging and should be removed before merging unless they provide essential, long-term value. Please consider if this log statement is necessary for the long-term operation of the application.

Style Guide References

Footnotes

  1. Scrutinize Debug Logs: Question the use of Log.d, Log.v, and especially println(). These are often remnants of debugging and should be removed before merging unless they provide essential, long-term value.

"onTapToFocus: " +
"input{$it} -> surface{$surfaceCoords}"
)
Comment on lines 471 to 475
Copy link
Contributor

Choose a reason for hiding this comment

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

high

While you're fixing the log tag, there's an opportunity to improve the log message itself. The current string concatenation will not interpolate the variables it and surfaceCoords, which means the log will not contain the expected values. Using a Kotlin template string will fix this bug and make the code more concise and readable.1

                                        Log.d(
                                            TAG,
                                            "onTapToFocus: input{$it} -> surface{$surfaceCoords}"
                                        )

Style Guide References

Footnotes

  1. The style guide recommends simplifying complex logic into more concise and readable idiomatic expressions. Using a template string instead of string concatenation is a good example of this.

Expand Down
Loading