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

Image recommendations - hide settings toggle #4841

Merged
merged 3 commits into from
May 3, 2024

Conversation

mazevedofs
Copy link
Collaborator

Phabricator: https://phabricator.wikimedia.org/T364038

Notes

  • Checks edit count before adding Suggested Edit to the explore feed settings toggles

Test Steps

  1. On an account with less than 50 edits (or logged out), go to explore feed settings
  2. Should not see the Suggested Edits toggle
  3. Repeat on an account with more than 50 edits, the toggle should appear

var editCount: Int {
var count: Int = 0
if let language = self.dataStore?.languageLinkController.appLanguage?.siteURL {
self.dataStore?.authenticationManager.getLoggedInUser(for: language, completion: { result in
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just note that this is an async call, so if it needs to make a network request this count would return 0 while it's fetching. I think because we have good caching within getLoggedInUser, it rarely needs to make a call here. Very rarely I could reproduce some weirdness where if I slowed down the connection speed, launched the app, then went straight to the Explore feed settings the toggle would be missing. But returning a little bit later (once the user was fetched) allowed it to appear again.

Not a blocker IMO but something to remember if we hear complaints.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, should we create a ticket to improve this? Since we're doing some tech debt work soon?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds good! Created a task here - https://phabricator.wikimedia.org/T364133

@tonisevener tonisevener merged commit 22e068a into main May 3, 2024
4 checks passed
@tonisevener tonisevener deleted the image-recs-settings-toggle-fix branch May 3, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants