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

[Feature Toggle, Autofill.js] Pass through a js feature toggle for autofill #4955

Merged

Conversation

dbajpeyi
Copy link
Contributor

@dbajpeyi dbajpeyi commented Aug 29, 2024

Task/Issue URL: https://app.asana.com/0/1205996472158114/1208150709359290/f

Description

This PR passes through remote config so that it can be accessed in autofill.js, no other business logic is added on the Android side. It's a simple pass-through.

Remote config was already merged:
duckduckgo/privacy-configuration#2265

Autofill.js PR was already merged with the feature toggle:
duckduckgo/duckduckgo-autofill#619

Steps to test this PR

Fixes bugs like: https://app.asana.com/0/1200930669568058/1206749141089966/f
(With the latest remote config, already merged)

  1. Run the android app,
  2. Go to https://dplinfo.ssb-ag.de/WebComm/default.aspx?TestingCookie=1
  3. Save a password there and reload page,
  4. The username should have the key icon, and autofill should work (won't autofill password automatically, that's okay).

Counter test - do the same steps with an older config, with thecanCategorizeUnknownUsername feature disabled. You won't see the key icon.

E.g with https://jsonblob.com/api/1278747279446892544

UI changes

Autofill.js changes only, which were tested already in duckduckgo/duckduckgo-autofill#619

@dbajpeyi dbajpeyi force-pushed the dbajpeyi/unknown-username-categorization-feature-toggle branch from 586a35e to 6c74254 Compare August 29, 2024 12:27
@dbajpeyi dbajpeyi force-pushed the dbajpeyi/unknown-username-categorization-feature-toggle branch 2 times, most recently from 55170d0 to 74af1f2 Compare August 29, 2024 14:22
@dbajpeyi dbajpeyi changed the title chore: pass through a js feature toggle for autofill [Feature Toggle, Autofill.js] Pass through a js feature toggle for autofill Aug 29, 2024
@dbajpeyi dbajpeyi marked this pull request as ready for review August 29, 2024 14:23
@dbajpeyi dbajpeyi force-pushed the dbajpeyi/unknown-username-categorization-feature-toggle branch 2 times, most recently from 43ff974 to d07a6fe Compare August 29, 2024 15:01
@dbajpeyi dbajpeyi force-pushed the dbajpeyi/unknown-username-categorization-feature-toggle branch from d07a6fe to d284aea Compare August 29, 2024 15:37
@dbajpeyi dbajpeyi requested a review from CDRussell August 29, 2024 15:49
@CDRussell CDRussell self-assigned this Aug 29, 2024
/**
* Whether canCategorizeUnknownUsername feature is configured to be enabled.
*/
suspend fun canCategorizeUnknownUsername(): Boolean
Copy link
Member

Choose a reason for hiding this comment

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

discussed this offline.

  • i don't think this needs to be in the public API.
  • even though it's consistent with the other functions, don't want to add to the public API (have plans to reduce it already)
  • alternative: RealAutofillRuntimeConfigProvider can check AutofillFeature directly, and that keeps everything inside of autofill-impl

@dbajpeyi dbajpeyi force-pushed the dbajpeyi/unknown-username-categorization-feature-toggle branch from 341c1df to d37b981 Compare August 30, 2024 12:13
@dbajpeyi dbajpeyi force-pushed the dbajpeyi/unknown-username-categorization-feature-toggle branch from d37b981 to 5138d1d Compare August 30, 2024 12:19
@dbajpeyi dbajpeyi requested a review from CDRussell August 30, 2024 13:14
@dbajpeyi dbajpeyi merged commit 43773a1 into develop Aug 30, 2024
6 checks passed
@dbajpeyi dbajpeyi deleted the dbajpeyi/unknown-username-categorization-feature-toggle branch August 30, 2024 14:06
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