Skip to content

feat: add Markets page ad banner#5627

Merged
therealemjy merged 1 commit into
mainfrom
feat/market-ad-banner
Jun 12, 2026
Merged

feat: add Markets page ad banner#5627
therealemjy merged 1 commit into
mainfrom
feat/market-ad-banner

Conversation

@therealemjy

Copy link
Copy Markdown
Member

Jira ticket(s)

VPD-1385

Changes

  • add Markets page ad banner

@therealemjy therealemjy requested a review from cuzz-venus June 11, 2026 12:51
@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7295522

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@venusprotocol/evm Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dapp-preview Ready Ready Preview Jun 12, 2026 9:19am
dapp-testnet Ready Ready Preview Jun 12, 2026 9:19am
venus.io Ready Ready Preview Jun 12, 2026 9:19am

Request Review

@greptile-apps

greptile-apps Bot commented Jun 11, 2026

Copy link
Copy Markdown

Greptile Summary

Adds a dismissible promotional banner for the USDT Fixed-Term Vault to the Markets page header. The banner is gated behind a new per-chain user setting (doNotShowFixedRateVaultsAdBanner) and the header's early-return guard is updated so the <header> element collapses correctly once the banner is dismissed.

  • MarketsAdBanner renders a full-bleed gradient strip with a CTA link to the vaults route and a close button that sets the dismissal flag. Layout spacing is refactored (padding moved from the outer flex container onto WrapperComp and Breadcrumbs) to allow the banner to sit flush.
  • Three identifiers for the same feature (MarketsAdBanner component, layout.header.dashboardAdBanner translation key, doNotShowFixedRateVaultsAdBanner store key) currently diverge in naming; unifying them would help future translators and developers searching by feature name.
  • The icon-only close button is missing an aria-label, leaving screen-reader users without a way to understand or invoke the dismiss action.

Confidence Score: 5/5

Safe to merge — the change is additive, the dismissal logic is correctly wired through the header guard, and no existing flows are broken.

The banner is purely additive and isolated behind a feature flag in the user's chain settings. The header early-return guard correctly handles both the show and dismissed states.

apps/evm/src/containers/Layout/Header/MarketsAdBanner/index.tsx — naming inconsistencies and the inaccessible close button live here.

Important Files Changed

Filename Overview
apps/evm/src/containers/Layout/Header/MarketsAdBanner/index.tsx New ad banner component for the Markets page; naming inconsistency between component (MarketsAdBanner), translation key (dashboardAdBanner), and store key (doNotShowFixedRateVaultsAdBanner). Close button lacks an accessible label.
apps/evm/src/containers/Layout/Header/index.tsx Correctly integrates the new banner, and the early-return guard properly collapses the header once the banner is dismissed.
apps/evm/src/containers/Layout/Header/useIsOnMarketsPage/index.tsx Simple hook that checks the current route against the markets path; logic is correct.
apps/evm/src/containers/Layout/index.tsx Moves pt-5/pt-10 top padding from the page container onto WrapperComp and Breadcrumbs to accommodate the full-bleed banner; gap-y-10 between flex children is removed, which appears intentional given the padding relocation.
apps/evm/src/store/index.ts Adds doNotShowFixedRateVaultsAdBanner boolean to UserChainSettings; straightforward addition.
apps/evm/src/hooks/useUserChainSettings/index.tsx Default value for the new setting is correctly set to false.
apps/evm/src/containers/Layout/Header/tests/index.spec.tsx New test file covering banner visibility, breadcrumb rendering, market page accent color, and the null-address fallback; good coverage of the new code path.
apps/evm/src/libs/translations/translations/en.json New dashboardAdBanner key added under layout.header; key name says dashboard but the banner is rendered on the Markets page.

Reviews (2): Last reviewed commit: "feat: add Markets page ad banner" | Re-trigger Greptile

Comment thread apps/evm/src/containers/Layout/Header/index.tsx Outdated
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for ./apps/evm

Status Category Percentage Covered / Total
🔵 Lines 81.46% 47471 / 58274
🔵 Statements 81.46% 47471 / 58274
🔵 Functions 62.2% 655 / 1053
🔵 Branches 72.96% 5413 / 7419
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/evm/src/containers/Layout/index.tsx 0% 0% 0% 0% 1-92
apps/evm/src/containers/Layout/Header/index.tsx 100% 92.85% 100% 100%
apps/evm/src/containers/Layout/Header/Breadcrumbs/index.tsx 0% 0% 0% 0% 1-47
apps/evm/src/containers/Layout/Header/MarketsAdBanner/index.tsx 0% 0% 0% 0% 1-63
apps/evm/src/containers/Layout/Header/useIsOnMarketsPage/index.tsx 85.71% 0% 100% 85.71% 1
apps/evm/src/hooks/useUserChainSettings/index.tsx 93.33% 33.33% 100% 93.33% 1, 25
apps/evm/src/store/index.ts 98.36% 90% 100% 98.36% 1
Generated in workflow #13598 for commit 7295522 by the Vitest Coverage Report Action

@therealemjy

Copy link
Copy Markdown
Member Author

@greptile

@therealemjy therealemjy force-pushed the feat/market-ad-banner branch from 31ec3a6 to b1292a2 Compare June 12, 2026 07:34

@cuzz-venus cuzz-venus 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.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants