Skip to content

T416194#5700

Merged
tonisevener merged 15 commits intoliquid-glassfrom
T416194
Feb 27, 2026
Merged

T416194#5700
tonisevener merged 15 commits intoliquid-glassfrom
T416194

Conversation

@l-olson1214
Copy link
Collaborator

@l-olson1214 l-olson1214 commented Feb 24, 2026

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

Notes

  • Adds icon to upper lefthand corner
  • Transitions icon from Wikipedia -> W on scroll
  • Transitions back on scroll to top
  • Wikipedia/W has background for liquid glass

Test Steps

  1. Ensure Explore feed acts as expected

Screenshots/Videos

simulator_screenshot_5DCCD013-F8AE-4A9C-ADA4-5B3064E0556F simulator_screenshot_0BFABAC7-2007-4CEC-8154-FD48D521BA29

@l-olson1214 l-olson1214 requested a review from Copilot February 24, 2026 18:46
@l-olson1214 l-olson1214 marked this pull request as ready for review February 24, 2026 18:48
Copy link

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.

Pull request overview

This PR updates the Explore tab navigation bar behavior to better support a branded logo on the leading side and to adjust that logo as the user scrolls the feed.

Changes:

  • Adds a left navigation bar logo UIBarButtonItem in ExploreViewController and wires it to scroll-to-top behavior.
  • Updates scrollViewDidScroll to call updateLogoImageOnScroll(scrollView:) to swap between full and compact logo assets while scrolling.
  • Refactors the titleView / longTitleButton layout setup (Auto Layout constraints) and applies minor whitespace cleanup.

@l-olson1214 l-olson1214 requested review from a team and mazevedofs and removed request for a team February 24, 2026 18:56
@l-olson1214 l-olson1214 changed the title T416194 DRAFT T416194 Feb 24, 2026
@l-olson1214 l-olson1214 requested a review from Copilot February 24, 2026 20:11
@l-olson1214 l-olson1214 changed the title DRAFT T416194 T416194 Feb 24, 2026
Copy link

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.

Pull request overview

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

Comment on lines +172 to +174
let titleConfig: WMFNavigationBarTitleConfig = WMFNavigationBarTitleConfig(title: CommonStrings.exploreTabTitle, customView: nil, alignment: .leadingCompact)

let profileButtonConfig = profileButtonConfig(target: self, action: #selector(userDidTapProfile), dataStore: dataStore, yirDataController: yirDataController, leadingBarButtonItem: nil)
let profileButtonConfig = profileButtonConfig(target: self, action: #selector(userDidTapProfile), dataStore: dataStore, yirDataController: yirDataController, leadingBarButtonItem: nil)
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

titleConfig no longer uses titleView (customView: nil), but WMFAppViewController updates Explore accessibility via vc.titleButton.accessibilityLabel (WMFAppViewController.m:1730-1733). With this change, titleButton no longer corresponds to a visible/tappable nav bar control, so the accessibility label update won’t apply to the new logo button. Recommend either (a) making the left/logo control be what titleButton returns (e.g., a UIButton as a UIBarButtonItem(customView:)), or (b) updating the accessibility update path to target the new left bar button item.

Copilot uses AI. Check for mistakes.
Comment on lines 205 to 207
logoBarButtonItem.accessibilityLabel = titleButton.accessibilityLabel
logoBarButtonItem.accessibilityHint = titleButton.accessibilityHint
logoBarButtonItem.accessibilityIdentifier = titleButton.accessibilityIdentifier
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

logoBarButtonItem.accessibilityLabel/hint/identifier are copied from titleButton, but at the time configureNavigationBar() runs those values are likely still unset (they’re assigned later in WMFAppViewController’s navigationController:willShowViewController:). This can leave the new logo button without the intended accessibility label. Prefer setting the label directly here, or ensure the label is applied/updated when WMFAppViewController sets it (e.g., by using a customView button and letting titleButton reference it).

Suggested change
logoBarButtonItem.accessibilityLabel = titleButton.accessibilityLabel
logoBarButtonItem.accessibilityHint = titleButton.accessibilityHint
logoBarButtonItem.accessibilityIdentifier = titleButton.accessibilityIdentifier
logoBarButtonItem.accessibilityLabel = CommonStrings.exploreTabTitle
logoBarButtonItem.accessibilityHint = WMFLocalizedString("explore-logo-button-accessibility-hint", value: "Double tap to scroll to the top of the Explore feed.", comment: "Accessibility hint for the Wikipedia logo button in the Explore tab that scrolls the feed to the top.")
logoBarButtonItem.accessibilityIdentifier = "explore-logo-bar-button-item"

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it might feel a little better if you deleted these two lazy properties (longTitleButton and titleView). It is super weird to me that WMFAppViewController changes the title view's accessibility label from the outside (that looks like really old code to me), so I would just move the accessibility assignment directly to ExploreViewController's configureNavigationBar method:

logoBarButtonItem.accessibilityLabel = WMFLocalizedString("home-title-accessibility-label", "Wikipedia, scroll to top of Explore", "Accessibility heading for the Explore page, indicating that tapping it will scroll to the top of the explore page. \"Explore\" is the same as {{msg-wikimedia|Wikipedia-ios-welcome-explore-title}}."); 

@tonisevener tonisevener merged commit 6d0e9ae into liquid-glass Feb 27, 2026
3 checks passed
@tonisevener tonisevener deleted the T416194 branch February 27, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants