Skip to content

feat(disclaimer): add content disclaimer component and integrate into… - #8040

Open
fairlighteth wants to merge 4 commits into
developfrom
feat/456-cow-fi-learn-disclaimer
Open

feat(disclaimer): add content disclaimer component and integrate into…#8040
fairlighteth wants to merge 4 commits into
developfrom
feat/456-cow-fi-learn-disclaimer

Conversation

@fairlighteth

@fairlighteth fairlighteth commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Linear: FE-456

Adds a shared content disclaimer before the footer across CoW DAO’s Learn and token pages.

  • Centralizes the disclaimer copy in CONFIG.contentDisclaimer
  • Adds an accessible ContentDisclaimer component using role="note"
  • Applies it through the shared layouts for:
    • /learn and all nested Learn pages, including articles and topics
    • /tokens and all token detail pages
  • Uses a lightweight, borderless presentation with transparent background, zero padding, and 1.3rem text
  • Adds unit coverage for the configured copy and accessible note

To Test

  1. Start cow-fi with pnpm start:cowfi.

  2. Check the Learn routes:

  • Open /learn
  • Open /learn/articles
  • Open a topic and an article detail page
  • Verify the disclaimer appears exactly once, immediately before the footer
  • Verify the wording and styling are consistent across each page
  1. Check the token routes:
  • Open /tokens
  • Open any /tokens/[tokenId] detail page
  • Verify the same disclaimer appears exactly once before the footer
  1. Check responsive styling:
  • Verify the disclaimer remains readable on desktop and mobile
  • Verify it has no border, background, or padding

Background

FE-456 requested a disclaimer on the Learn index and article detail pages so visitors landing directly on content still see it.

The disclaimer is mounted at the route-layout level instead of individual pages. This ensures consistent coverage for all current and future routes under /learn/** and /tokens/** without duplicating the implementation.

Local verification completed on /learn, an article detail page, /tokens, and a token detail page. The cow-fi test suite passes with 36 tests.

Self-checks

  • I have read CONTRIBUTING.md
  • I have manually tested changes on Vercel preview deployment
  • I have done self-review and (or) AI review
  • I have addressed all comments from @coderabbitai
  • I have less than three open PRs/Stacks in this repo at the moment of creating this PR

Summary by CodeRabbit

  • New Features

    • Added a content disclaimer to the Learn and Tokens pages.
    • Disclaimer text now includes a distinct title and body, presented in an accessible, responsive notice.
  • Bug Fixes

    • Updated disclaimer wording and referenced website for clearer content guidance.
  • Tests

    • Added coverage verifying the disclaimer’s accessibility and displayed content.

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
cowfi Ready Ready Preview Aug 26, 2026 3:24pm
explorer-dev Ready Ready Preview Aug 26, 2026 3:24pm
storybook Ready Ready Preview Aug 26, 2026 3:24pm
swap-dev Ready Ready Preview Aug 26, 2026 3:24pm
widget-configurator Ready Ready Preview Aug 26, 2026 3:24pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
cosmos Ignored Ignored Aug 26, 2026 3:24pm
sdk-tools Ignored Ignored Preview Aug 26, 2026 3:24pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 226aec9e-6361-4080-bcea-7e1797308389

📥 Commits

Reviewing files that changed from the base of the PR and between 21a1515 and 5ec2d49.

📒 Files selected for processing (5)
  • apps/cow-fi/app/(learn)/learn/layout.tsx
  • apps/cow-fi/app/(main)/tokens/layout.tsx
  • apps/cow-fi/components/ContentDisclaimer.test.tsx
  • apps/cow-fi/components/ContentDisclaimer.tsx
  • apps/cow-fi/const/meta.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

The PR adds a configured ContentDisclaimer, renders it in the learn and tokens layouts, and tests its accessible title and body text.

Changes

Content disclaimer

Layer / File(s) Summary
Disclaimer configuration and component
apps/cow-fi/const/meta.ts, apps/cow-fi/components/ContentDisclaimer.tsx
CONFIG.contentDisclaimer now stores separate title and body fields. ContentDisclaimer renders them as a responsive accessible note.
Layout integration
apps/cow-fi/app/(learn)/learn/layout.tsx, apps/cow-fi/app/(main)/tokens/layout.tsx
Both layouts render ContentDisclaimer after their page content and use the imported ReactNode type.
Component validation
apps/cow-fi/components/ContentDisclaimer.test.tsx
The test mocks UI and styling dependencies and verifies the accessible note and configured text.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 5ec2d

This localized disclaimer change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Suggested reviewers: danziger, elena-zh, azebuado

Sequence Diagram(s)

sequenceDiagram
  participant LearnOrTokensLayout
  participant ContentDisclaimer
  participant CONFIG
  participant Browser
  LearnOrTokensLayout->>ContentDisclaimer: render after page content
  ContentDisclaimer->>CONFIG: read title and body
  ContentDisclaimer->>Browser: render accessible note
Loading

Poem

A rabbit checks the layout line,
A note appears in text so fine.
The title hops, the body follows,
Through learn and tokens’ leafy hollows.
Tests nod softly: “The note is clear.”
The disclaimer now lives here.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding and integrating a content disclaimer component. It is concise and related to the changeset, despite the displayed truncation.
Description check ✅ Passed The description includes the required Summary, To Test, Background, and Self-checks sections. It explains the implementation, route coverage, testing steps, and local verification. The unchecked self-…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes the required Summary, To Test, Background, and Self-checks sections. It explains the implementation, route coverage, testing steps, and local verification. The unchecked self-check items are non-critical.

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/456-cow-fi-learn-disclaimer

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fairlighteth
fairlighteth marked this pull request as ready for review August 25, 2026 13:36
@fairlighteth fairlighteth self-assigned this Aug 25, 2026
@azebuado

Copy link
Copy Markdown
Collaborator

@azebuado azebuado left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Works as described.

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.

3 participants