Skip to content

perf(accessibility): fix iOS accessibility in WhatsHappening and TopT…#29123

Merged
javiergarciavera merged 3 commits into
mainfrom
perf/social-accessibility
May 4, 2026
Merged

perf(accessibility): fix iOS accessibility in WhatsHappening and TopT…#29123
javiergarciavera merged 3 commits into
mainfrom
perf/social-accessibility

Conversation

@javiergarciavera

@javiergarciavera javiergarciavera commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

…raders sections

  • WhatsHappeningCard: collapse double Box wrapper to single node (–1 native node per card)
  • WhatsHappeningSection, TopTradersSection: View ref + Box gap → View ref style

Description

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Low Risk
Low risk UI refactor focused on layout/styling and analytics/view tracking wiring; main risk is subtle spacing or event-firing behavior changes when sections are empty/loading.

Overview
Improves homepage section rendering and instrumentation for Top Traders and What’s Happening.

TopTradersSection and WhatsHappeningSection now pass a null sectionRef to useHomeViewedEvent when the section won’t render, avoiding measuring a non-mounted view while preserving the hook’s empty/immediate-fire behavior. Both section headers also gain stable testIDs via WalletViewSelectorsIDs.HOMEPAGE_SECTION_TITLE(...).

WhatsHappeningSection removes the extra Box wrapper (replacing gap with a StyleSheet style on the root View), and WhatsHappeningCard collapses layout into the TouchableOpacity via Tailwind style to reduce one native node per card.

Reviewed by Cursor Bugbot for commit e75d976. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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 238ce24. Configure here.

Comment thread app/components/Views/Homepage/Sections/WhatsHappening/WhatsHappeningSection.tsx Outdated
Comment thread app/components/Views/Homepage/Sections/TopTraders/TopTradersSection.tsx Outdated
@javiergarciavera javiergarciavera force-pushed the perf/social-accessibility branch from 238ce24 to 8e96a8b Compare April 21, 2026 16:16
@javiergarciavera javiergarciavera force-pushed the perf/social-accessibility branch from 8e96a8b to aba8226 Compare April 21, 2026 16:17
@javiergarciavera javiergarciavera requested a review from a team as a code owner April 21, 2026 16:17
@javiergarciavera javiergarciavera force-pushed the perf/social-accessibility branch from aba8226 to 8e96a8b Compare April 21, 2026 16:18
@github-actions github-actions Bot added the risk-low Low testing needed · Low bug introduction risk label Apr 21, 2026
@codecov-commenter

codecov-commenter commented Apr 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.84%. Comparing base (51b6bbd) to head (e75d976).
⚠️ Report is 40 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29123      +/-   ##
==========================================
- Coverage   82.15%   81.84%   -0.31%     
==========================================
  Files        5178     5244      +66     
  Lines      137450   138676    +1226     
  Branches    31079    31462     +383     
==========================================
+ Hits       112924   113505     +581     
- Misses      16875    17447     +572     
- Partials     7651     7724      +73     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added risk-low Low testing needed · Low bug introduction risk and removed risk-low Low testing needed · Low bug introduction risk labels Apr 21, 2026
@javiergarciavera javiergarciavera added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Apr 28, 2026
@javiergarciavera javiergarciavera force-pushed the perf/social-accessibility branch from 3cde92b to 3872e55 Compare April 28, 2026 16:12
javiergarciavera and others added 3 commits May 4, 2026 12:32
…raders sections

- WhatsHappeningCard: collapse double Box wrapper to single node (–1 native node per card)
- WhatsHappeningSection, TopTradersSection: View ref + Box gap → View ref style

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…HappeningSection

The testID was only present on the error-state SectionHeader, not on the
normal success/loading render path. Consistent with TopTradersSection and
the error branch of this same component.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n won't render

When traders are empty after loading the component returns null, leaving
the ref unattached. Passing a non-null ref with a null .current silently
blocks both the viewport-visibility and the immediate-fire paths of
useHomeViewedEvent. Apply the same willRender pattern used by
WhatsHappeningSection so the empty-state analytics event fires correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@javiergarciavera javiergarciavera force-pushed the perf/social-accessibility branch from 3872e55 to e75d976 Compare May 4, 2026 10:57
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The three changed files are all UI components within the Homepage/Trending feature area:

  1. TopTradersSection.tsx: Adds a willRender guard to prevent view-event tracking when the section won't render, and adds a testID (HOMEPAGE_SECTION_TITLE('top-traders')) to the SectionHeader for E2E test automation.

  2. WhatsHappeningSection.tsx: Refactors layout from Box wrapper to View + StyleSheet.create for gap styling, and adds testID (HOMEPAGE_SECTION_TITLE('whats-happening')) to SectionHeader components in both the error state and normal render paths.

  3. WhatsHappeningCard.tsx: Flattens the component hierarchy by moving Tailwind styles directly onto TouchableOpacity instead of using nested Box components, while preserving the same visual output.

These changes are purely UI refactoring within the Trending/Homepage sections. The SmokeWalletPlatform tag covers the Trending discovery tab (search, feed navigation, browser integration) which directly exercises these components. No other test suites are impacted since:

  • No controller/engine changes
  • No navigation changes
  • No shared modal/confirmation changes
  • No account/network management changes
  • The testID additions are specifically for E2E test infrastructure in the Trending area

Performance Test Selection:
The changes are minor UI refactoring - flattening component nesting, replacing Box wrappers with View+StyleSheet, and adding testIDs. These are not performance-impacting changes. The layout changes are equivalent in rendering complexity (same visual output, slightly different component tree depth). No data loading, state management, or critical rendering path changes were made.

View GitHub Actions results

@javiergarciavera javiergarciavera added the team-social-ai Social & AI team label May 4, 2026
@sonarqubecloud

sonarqubecloud Bot commented May 4, 2026

Copy link
Copy Markdown

@javiergarciavera javiergarciavera enabled auto-merge May 4, 2026 12:31
@javiergarciavera javiergarciavera added this pull request to the merge queue May 4, 2026
Merged via the queue into main with commit a614776 May 4, 2026
153 of 156 checks passed
@javiergarciavera javiergarciavera deleted the perf/social-accessibility branch May 4, 2026 13:03
@github-actions github-actions Bot locked and limited conversation to collaborators May 4, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label May 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.77.0 Issue or pull request that will be included in release 7.77.0 risk-low Low testing needed · Low bug introduction risk size-M team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants