Skip to content

Add info text argument to startFeedback #3971

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

Merged
merged 4 commits into from
Aug 8, 2022
Merged

Conversation

lfkellogg
Copy link
Contributor

Based on go/iaf-sdk-api-proposal

Tested in test app:
image

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2022

Unit Test Results

150 tests   150 ✔️  47s ⏱️
  17 suites      0 💤
  17 files        0

Results for commit 07e9da8.

♻️ This comment has been updated with latest results.

@lfkellogg lfkellogg force-pushed the fad-in-app-feedback branch from 91b3148 to 734d6ae Compare August 5, 2022 22:52
public static final String SCREENSHOT_FILENAME_EXTRA_KEY =
"com.google.firebase.appdistribution.FeedbackActivity.SCREENSHOT_FILE_NAME";

private FeedbackSender feedbackSender;
private String releaseName;
private CharSequence infoText;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, how do you choose CharSequence instead of a plain ole' String?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because that's what Context.getText() returns: https://developer.android.com/reference/android/content/Context#getText(int)

Context.getString() returns a String but it does not retain any html/styles, which we need.

public void startFeedback() {
startFeedback(Executors.newSingleThreadExecutor());
public void startFeedback(int infoTextResourceId) {
startFeedbackWithInfoText(firebaseApp.getApplicationContext().getText(infoTextResourceId));
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you chain to startFeedback(String) instead of directly to startFeedbackWithInfoText, so the implementations are less likely to diverge?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I'm realizing our API should have startFeedback(CharSequence), so yes.

I was trying to model our API after TextView.setText, which accepts an int or a CharSequence. I thought it was int or String.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 5, 2022

Coverage Report 1

Affected Products

  • firebase-appdistribution

    Overall coverage changed from 76.79% (734d6ae) to 76.65% (7c055fe) by -0.14%.

    FilenameBase (734d6ae)Merge (7c055fe)Diff
    FirebaseAppDistributionImpl.java92.79%92.86%+0.06%
    FirebaseAppDistributionRegistrar.java81.08%81.58%+0.50%
  • firebase-appdistribution-api

    Overall coverage changed from 62.62% (734d6ae) to 60.91% (7c055fe) by -1.71%.

    FilenameBase (734d6ae)Merge (7c055fe)Diff
    FirebaseAppDistributionProxy.java84.62%73.33%-11.28%
    FirebaseAppDistributionStub.java81.40%79.55%-1.85%

Test Logs

Notes

  • Commit (7c055fe) is created by Prow via merging PR base commit (734d6ae) and head commit (07e9da8).
  • Run gradle <product>:checkCoverage to produce HTML coverage reports locally. After gradle commands finished, report files can be found under <product-build-dir>/reports/jacoco/.

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/rKx37eEZQv.html

@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="24dp"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this just generated XML changes? I kind of just skimmed this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These add the info text to our proof-of-concept UX.

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-appdistribution-api:
error: Removed method com.google.firebase.appdistribution.FirebaseAppDistribution.startFeedback() [RemovedMethod]
warning: Added method com.google.firebase.appdistribution.FirebaseAppDistribution.startFeedback(String) [AddedAbstractMethod]
warning: Added method com.google.firebase.appdistribution.FirebaseAppDistribution.startFeedback(int) [AddedAbstractMethod]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-appdistribution-api:
error: Removed method com.google.firebase.appdistribution.FirebaseAppDistribution.startFeedback() [RemovedMethod]
warning: Added method com.google.firebase.appdistribution.FirebaseAppDistribution.startFeedback(String) [AddedAbstractMethod]
warning: Added method com.google.firebase.appdistribution.FirebaseAppDistribution.startFeedback(int) [AddedAbstractMethod]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 5, 2022

Size Report 1

Affected Products

  • firebase-appdistribution

    TypeBase (734d6ae)Merge (7c055fe)Diff
    aar157 kB157 kB+351 B (+0.2%)
    apk (aggressive)880 kB880 kB+312 B (+0.0%)
    apk (release)2.01 MB2.01 MB+516 B (+0.0%)
  • firebase-appdistribution-api

    TypeBase (734d6ae)Merge (7c055fe)Diff
    aar14.5 kB14.7 kB+247 B (+1.7%)
    apk (release)698 kB698 kB+84 B (+0.0%)

Test Logs

Notes

  • Commit (7c055fe) is created by Prow via merging PR base commit (734d6ae) and head commit (07e9da8).

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/kDuJlJY7yi.html

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-appdistribution-api:
error: Removed method com.google.firebase.appdistribution.FirebaseAppDistribution.startFeedback() [RemovedMethod]
warning: Added method com.google.firebase.appdistribution.FirebaseAppDistribution.startFeedback(CharSequence) [AddedAbstractMethod]
warning: Added method com.google.firebase.appdistribution.FirebaseAppDistribution.startFeedback(int) [AddedAbstractMethod]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-appdistribution-api:
error: Removed method com.google.firebase.appdistribution.FirebaseAppDistribution.startFeedback() [RemovedMethod]
warning: Added method com.google.firebase.appdistribution.FirebaseAppDistribution.startFeedback(CharSequence) [AddedAbstractMethod]
warning: Added method com.google.firebase.appdistribution.FirebaseAppDistribution.startFeedback(int) [AddedAbstractMethod]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@lfkellogg
Copy link
Contributor Author

/test smoke-tests

@lfkellogg lfkellogg merged commit da5ba0a into fad-in-app-feedback Aug 8, 2022
@lfkellogg lfkellogg deleted the lk/info-text branch August 8, 2022 20:07
@firebase firebase locked and limited conversation to collaborators Sep 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants