fix(homepage): hub page discovery tabs UX & scroll improvements cp-7.77.0#29889
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
9d82fca
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9d82fca. Configure here.
Thanks @gambinish I'm hoping this PR here resolves the issue for Perps. I'll be looking into Predict tomorrow |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #29889 +/- ##
==========================================
+ Coverage 81.44% 81.52% +0.07%
==========================================
Files 5318 5328 +10
Lines 140909 141161 +252
Branches 32109 32162 +53
==========================================
+ Hits 114767 115077 +310
+ Misses 18263 18223 -40
+ Partials 7879 7861 -18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
LGTM, but there are some issues and unused variables in HomepageDiscoveryTabs.tsx |
@PatrykLucka good catch, I just pushed up the fix f56ad60. Not sure why the Husky pre-commit hook didn't catch this |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: The PR modifies the HomepageDiscoveryTabs component and its sub-components (TabsIconBar, TabsIconTab, TabsIconList, TabsIconAnimationContext), PerpsHomeView, PredictFeed, and useFeedScrollManager. The core changes are:
Tag selection rationale:
The animation migration from JS thread to UI thread is a behavioral change that could affect scroll/collapse behavior in all three tabs (Portfolio, Perps, Predictions), making these tests essential for validation. Performance Test Selection: |
|
| * fully-hidden state (1.0) instead of collapsing all the way to 0. Use this to shrink the | ||
| * row by just the icon area (for example) while keeping labels visible. | ||
| */ | ||
| collapseBy?: number; |
There was a problem hiding this comment.
is there anyway to update this prop naming to something more intuitive? collapseBy seems incredibly vague
There was a problem hiding this comment.
Yeah I can, could I do a follow up PR for this? I want to get this CP out of the way @brianacnguyen
brianacnguyen
left a comment
There was a problem hiding this comment.
Requesting changes to make prop name more intuitive
brianacnguyen
left a comment
There was a problem hiding this comment.
Approved to unblock with following up with fix PR




Description
Polish pass on the Hub Page Discovery Tabs treatment (
coreMCU589AbtestHubPageDiscoveryTabs). Targets scroll/animation behavior on the Predictions tab, the icon-collapse animation on the discovery bar, and several layout glitches under the bar. All changes are gated by the existing A/B feature flag — control path unchanged.What changed
Animated(JS-driven layout properties caused per-frame jank) to a ReanimatedSharedValue+useAnimatedStylerunning entirely on the UI thread. Gradient overlay still uses the RNAnimated.Valuemirror to compose withtabGradientOpacitiesnatively.colors.background.defaultso scrolled content no longer bleeds through above the underline.topInsetprop onPerpsHomeViewandPredictFeedso each tab's own background (perps gradient, predict bg) extends up directly under the discovery bar. Removed wrapper<View mt-X>hacks.gap: 16to a stylesheet (portfolioScrollContent), removed the redundantmt-4 mb-2wrapper, and dropped the extramt-2onTabsIconListso the layout matches control more closely.walletHeaderTranslateYis provided,useFeedScrollManagerslides predict header + predict tab bar away together; standalonePredictFeedretains the original behavior (only the balance/carousel hides).collapseByprop onTabsIconBarfor partial-height collapse, lint/no-shadow/no-inline-styles fixes, JSDoc on new props.Note: To test this feature locally without the LaunchDarkly flag, hard-code
isDiscoveryTabsTreatment = trueinapp/components/Views/Wallet/index.tsx:1050Changelog
CHANGELOG entry:null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-591
Manual testing steps
Screenshots/Recordings
after.mov
Before
before.mov
After
after.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Touches scroll-driven header/toolbar animations and layout (Reanimated + RN Animated) across Homepage/Predictions/Perps, which can be fragile across platforms despite added test coverage.
Overview
Improves the Hub Page Discovery Tabs treatment by making discovery tab icon collapse UI-thread driven:
TabsIconTabnow uses a ReanimatedSharedValuefromTabIconAnimationContextto animate icon height/margin/opacity, while keeping an RNAnimated.Valuemirror for the dark-mode gradient overlay.Refines scroll/animation behavior for the embedded Predictions experience:
useFeedScrollManagernow optionally coordinates withwalletHeaderTranslateY/walletHeaderHeightto slide the Predict header and its tab bar away together (standalone behavior unchanged), andHomepageDiscoveryTabsforwards the new wallet-header props intoPredictFeed.Cleans up layout gaps/spacing under the discovery bar: adds
topInsetsupport toPerpsHomeView, removes hardcoded margins inTabsIconListcontent, and centralizes Portfolio scroll padding/gap styling. Also addsTabsIconBarsupport for partial-height collapse via newcollapseByprop, with accompanying tests.Reviewed by Cursor Bugbot for commit f56ad60. Bugbot is set up for automated code reviews on this repo. Configure here.