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

[WIP] Add FXIOS-10111 Local remote settings records fetching for password generator #22133

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nbhasin2
Copy link
Contributor

@nbhasin2 nbhasin2 commented Sep 21, 2024

📜 Tickets

Jira ticket - 10111
Github issue

💡 Description

After initializing utilities, rules can be fetched like below

let utilities = RemoteSettingsUtilities()
    Task {
        if let passwordRules: [PasswordRuleRecord] = await utilities.fetchLocalRecord(for: .passwordRules) {
            for rule in passwordRules {
                print("Password Rules: \\(rule.passwordRules)")
            }
        }
    }

📝 Checklist

You have to check all boxes before merging

  • Filled in the above information (tickets numbers and description of your work)
  • Updated the PR name to follow our PR naming guidelines
  • Wrote unit tests and/or ensured the tests suite is passing
  • When working on UI, I checked and implemented accessibility (minimum Dynamic Text and VoiceOver)
  • If needed, I updated documentation / comments for complex code and public methods
  • If needed, added a backport comment (example @Mergifyio backport release/v120)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Slowly moving away from full playground to a more structured approach.

While we wait for caching support from Application Services we can implement the local layer to fetch items from JSON that is shipping to us.

I am opening this PR to gather some thoughts around the structure. Will post in our slack channel as well but feel free to explore this and give feedback.

https://github.com/mozilla-mobile/firefox-ios/pull/21813/files - You can mostly ignore this because its purely for me testing. I will add proper support for debug menu in a separate PR to not bloat this one.

TODOs

  • Gather feedback
  • Write tests
  • Add any missing item / move to browserkit 🤷🏼‍♂️

cc @mattreaganmozilla @issammani

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.

1 participant