Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #916: Add pull to refresh #3769

Merged
merged 1 commit into from
Jul 8, 2021
Merged

Fix #916: Add pull to refresh #3769

merged 1 commit into from
Jul 8, 2021

Conversation

kylehickinson
Copy link
Collaborator

Summary of Changes

This pull request fixes #916

Submitter Checklist:

  • Unit Tests are updated to cover new or changed functionality
  • User-facing strings use NSLocalizableString()

Test Plan:

  • Verify you can pull to refresh on normal websites
  • Verify you cannot pull to refresh on local pages/error pages

Reviewer Checklist:

  • Issues include necessary QA labels:
    • QA/(Yes|No)
    • release-notes/(include|exclude)
    • bug / enhancement
  • Necessary security reviews have taken place.
  • Adequate unit test coverage exists to prevent regressions.
  • Adequate test plan exists for QA to validate (if applicable).
  • Issue is assigned to a milestone (should happen at merge time).

@kylehickinson kylehickinson requested a review from a team June 9, 2021 21:46
@kylehickinson
Copy link
Collaborator Author

Code changed to include settings option, so would be good to get a re-review

@@ -548,8 +559,15 @@ class Tab: NSObject {
return
}

updatePullToRefreshVisibility()
Copy link
Contributor

Choose a reason for hiding this comment

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

Aren't we already covering this case inside BVC preferencesDidChange ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No this call happens whenever a URL changes in the tab's web view (since we dont want pull to refresh on local pages at all). The BVC pref observation only ensures that it updates any visible tabs refresh control when a user flips that pref on/off

@@ -484,6 +484,9 @@ extension Strings {
public static let defaultBrowserCalloutCloseAccesabilityLabel =
NSLocalizedString("defaultBrowserCalloutCloseAccesabilityLabel", tableName: "BraveShared",
bundle: .braveShared, value: "Close default browser callout", comment: "")
public static let enablePullToRefresh =
NSLocalizedString("enablePullToRefresh", tableName: "BraveShared",
bundle: .braveShared, value: "Enable Pull-to-refresh", comment: "Describes whether or not the feature that allows the user to pull down from the top of a web page a certain amount before it triggers a page refresh")
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 real text value? Enable Pull-to-refresh looks not matching with rest of the options because of dash usage.

Copy link
Contributor

Choose a reason for hiding this comment

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

it's real, James proposed it

@kylehickinson kylehickinson merged commit abdf2d8 into development Jul 8, 2021
@kylehickinson kylehickinson deleted the pull-to-refresh branch July 8, 2021 14:29
KacperWybranski pushed a commit to KacperWybranski/brave-ios that referenced this pull request Sep 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pull-to-Refresh functionality
6 participants