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

allow to add autofill domain info into text input #5774

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

cmonfortep
Copy link
Contributor

@cmonfortep cmonfortep commented Mar 13, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/project/414730916066338/task/1209558372959664

Description

allow to indicate domain info into text input to improve heuristics in other password managers.

Steps to test this PR

N/A

UI changes

Before After
!(Upload before screenshot) (Upload after screenshot)

@cmonfortep
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cmonfortep cmonfortep requested a review from Copilot March 16, 2025 19:17
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Copy link
Contributor

@nalcalag nalcalag left a comment

Choose a reason for hiding this comment

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

We synced when this PR was open, and I suggested creating a new TextInputWithAutofill class extending DaxTextInput. The reason is that the methods added to the component are too specific to autofill, making them less scalable within our ADS and unlikely to be reused elsewhere in the app.

Suggestion:

class DaxTextInputWithAutofill @JvmOverloads constructor(
    context: Context,
    attrs: AttributeSet? = null,
    defStyleAttr: Int = 0,
) : DaxTextInput(context, attrs, defStyleAttr) {
    private var autofillDomain: String = ""

    fun setAutofillDomain(domain: String) {
        this.autofillDomain = domain
    }

    override fun onProvideAutofillStructure(structure: ViewStructure?, flags: Int) {
        super.onProvideAutofillStructure(structure, flags)
        this.autofillDomain.takeUnless { it.isBlank() }?.let {
            structure?.setWebDomain(it)
        }
    }
}

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