Commit 1a22eb4
authored
fix(TMCU-513): update View More card styling and Perps routing (#27078)
## **Description**
Updates the shared "View more" card in the homepage carousels to match
the updated design, and changes the Perps "View more" entrypoint to
route to the market list page instead of the main Perps home.
Changes:
- Added `rounded-xl bg-background-muted` background to the ViewMoreCard
outer Box
- Removed the circular bubble wrapper around the ArrowRight icon
- Made Predictions ViewMoreCard use `flex-1` and default `BodyMd` text
size to match Perps
- Split Perps navigation: section title still goes to Perps home, View
more card now goes to the market list page
## **Changelog**
CHANGELOG entry: Updated View more card styling with background color
and updated Perps View more to navigate to market list
## **Related issues**
Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-513
## **Manual testing steps**
```gherkin
Feature: View more card styling and routing
Scenario: View more cards display with background
Given user is on the homepage
And Perps or Predictions sections show a carousel with a View more card
When the user views the View more card
Then it has a rounded grey background (bg-background-muted)
And the arrow icon has no circular bubble around it
Scenario: Perps View more navigates to market list
Given user is on the homepage with Perps section visible
When user taps the View more card in the Perps carousel
Then the app navigates to the Perps market list page
Scenario: Perps section title navigates to Perps home
Given user is on the homepage with Perps section visible
When user taps the Perpetuals section title
Then the app navigates to the Perps home page
```
## **Screenshots/Recordings**
Verified on device -- both Perps and Predictions View more cards now
show consistent styling.
### **Before**
View more card had no background and a circular bubble around the arrow
icon.
### **After**
<img width="300"
src="https://github.com/user-attachments/assets/23c07566-2996-4f26-9717-481a07ba783e"
/>
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Low risk UI and navigation tweak limited to homepage carousels; main
risk is an incorrect route/params causing the Perps "View more" CTA to
land on the wrong screen.
>
> **Overview**
> Updates the shared homepage `ViewMoreCard` to match new design by
moving the muted background and rounded corners to the outer card and
removing the circular icon bubble.
>
> Changes the Perps homepage carousel "View more" CTA to navigate to
`Routes.PERPS.MARKET_LIST` (while the section title still routes to
`Routes.PERPS.PERPS_HOME`) and updates the Perps unit test accordingly.
Aligns the Predictions carousel `ViewMoreCard` sizing/typography usage
with Perps by using `flex-1` and default text variant.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a2cb634. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 0ce62c3 commit 1a22eb4
4 files changed
Lines changed: 18 additions & 18 deletions
File tree
- app/components/Views/Homepage
- Sections
- Perpetuals
- Predictions
- components/ViewMoreCard
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
814 | | - | |
| 814 | + | |
815 | 815 | | |
816 | 816 | | |
817 | 817 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
215 | 222 | | |
216 | 223 | | |
217 | 224 | | |
| |||
330 | 337 | | |
331 | 338 | | |
332 | 339 | | |
333 | | - | |
| 340 | + | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
280 | | - | |
| 279 | + | |
281 | 280 | | |
282 | 281 | | |
283 | 282 | | |
| |||
Lines changed: 7 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
60 | 54 | | |
61 | 55 | | |
62 | 56 | | |
| |||
0 commit comments