Skip to content

Drive view click instrumentation via config#2125

Merged
fractalwrench merged 1 commit intointegration/simplify-bytecode-instrumentationfrom
view-click-config
Apr 28, 2025
Merged

Drive view click instrumentation via config#2125
fractalwrench merged 1 commit intointegration/simplify-bytecode-instrumentationfrom
view-click-config

Conversation

@fractalwrench
Copy link
Copy Markdown
Member

Goal

Drives the instrumentation for view clicks via a config file. This covers all the previous scenarios apart from one case where a Java lambda is supplied as below:

view.setOnLongClickListener(lambdaView -> {
    Log.d("Embrace", "test");
    return true;
});

We could support this by adding an extra method visitor that specifically visits the bytecode this generates, but IMO it's likely not worth it given that few folks are writing Java, and that this will introduce complexity to our instrumentation - particularly knowing that our click instrumentation is imperfect already.

Testing

Updated existing test coverage.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.49%. Comparing base (a9f2c88) to head (5682486).
Report is 2 commits behind head on integration/simplify-bytecode-instrumentation.

Additional details and impacted files

Impacted file tree graph

@@                              Coverage Diff                               @@
##           integration/simplify-bytecode-instrumentation    #2125   +/-   ##
==============================================================================
  Coverage                                          85.49%   85.49%           
==============================================================================
  Files                                                471      471           
  Lines                                              10559    10559           
  Branches                                            1563     1563           
==============================================================================
  Hits                                                9027     9027           
  Misses                                               851      851           
  Partials                                             681      681           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from webview-config to integration/simplify-bytecode-instrumentation April 25, 2025 16:01
Copy link
Copy Markdown
Contributor

@bidetofevil bidetofevil left a comment

Choose a reason for hiding this comment

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

LGTM. If this worked before and doesn't work now, lets document it in case folks upgrade and stopped seeing these clicks.

@fractalwrench fractalwrench merged commit f39c44f into integration/simplify-bytecode-instrumentation Apr 28, 2025
5 checks passed
@fractalwrench fractalwrench deleted the view-click-config branch April 28, 2025 08:14
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