feat(dashpay): persistent username row in the home header nav bar (SB-11) - #911
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…-11) The DashPay profile entry point lived only on the UIKit navigation bar's avatar, which #813 made scroll-gated: hidden at the top of the feed and revealed past `kTopBarShowThreshold`. On a feed shorter than the viewport that threshold can never be crossed, so the avatar — and with it the only way into "my profile" — was unreachable. Move the bar into the balance header, which is always on screen at the top of Home: `DashUIKit.NavigationBar` with the username row leading, the Dash wordmark central and the notifications bell trailing. `HomeUsernameRow` reuses `ContactAvatarView` and the existing `profileAction()` target, so there is one source of truth for opening the profile rather than a second tap path. `HomeView` measures scrollable-content height against the ScrollView's own viewport (`HomeContentHeightKey` / `HomeViewportHeightKey`) and keeps the old UIKit bar shown when the feed is too short to scroll the threshold, so the existing reveal gesture cannot strand it either. A zero viewport height means the first layout pass has not reported yet — it waits for a real measurement instead of flashing the bar on a feed that is long enough. The bell's unread state and the username/avatar are read from the same app-owned identity and contacts snapshots the UIKit bar uses, refreshed on `DWDashPayRegistrationStatusUpdated` and the contacts snapshot notification so a new username or incoming request lands without leaving Home. All of it is `#if DASHPAY`; the non-DashPay build compiles the bar out. Not verified by a build: the SwiftDashSDK package in ../platform is on a feature branch and does not compile, so the app target was never reached. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
romchornyi
force-pushed
the
feat/home-nav-bar-username-row
branch
from
August 3, 2026 17:08
18e7e8e to
6a73e58
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
SB-11. The DashPay profile entry point lived only on the UIKit navigation bar's avatar, which #813 made scroll-gated: hidden at the top of the feed, revealed past
kTopBarShowThreshold. On a feed shorter than the viewport that threshold can never be crossed, so the avatar — and with it the only way into "my profile" — was unreachable.What was done?
DashUIKit.NavigationBarwith the username row leading, the Dash wordmark central, and the notifications bell trailing.HomeUsernameRowreusesContactAvatarViewand the existingprofileAction()target, so there is one source of truth for opening the profile rather than a second tap path.HomeViewmeasures scrollable-content height against the ScrollView's own viewport (HomeContentHeightKey/HomeViewportHeightKey) and keeps the old UIKit bar shown when the feed is too short to scroll the threshold, so the existing reveal gesture cannot strand it either. A zero viewport height means the first layout pass has not reported yet — it waits for a real measurement instead of flashing the bar on a feed that is long enough.DWDashPayRegistrationStatusUpdatedand the contacts snapshot notification, so a new username or an incoming request lands without leaving Home.HomeUsernameRowandContactAvatarView(placeholder initials, sizes, empty-title fallback).All of it is
#if DASHPAY; the non-DashPay build compiles the bar out.How Has This Been Tested?
Not built. The SwiftDashSDK package in
../platformis onfeat/platform-wallet-dashconnect-ffiand fails withvalue of type 'EventHandlerCallbacks' has no member 'release_fn', so the app target was never reached.Static checks done:
DashUIKit.NavigationBar,Color.dash.whiteText/.white, theicon_bell/icon_bell_active/logoassets,notificationAction(),DWDashPayRegistrationStatusUpdatedandhomeViewDidChangeTopBarVisibilityall resolve, andHomeUsernameRow.swiftis registered in both targets in the project file.Before merge this needs a
dashpayarm64-sim build plus a device pass on: no identity (row hidden), registered username with and without an avatar, a feed short enough to skip the reveal threshold, and an incoming contact request lighting the bell live.Breaking Changes
None.
HomeViewDelegategainshomeViewShowNotifications(), implemented by the single conformer (HomeViewController) inside#if DASHPAY.Checklist:
For repository code-owners and collaborators only
🤖 Generated with Claude Code