Add operators closure page#95
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
Confirmed by Santi from the movement team. Need to be update along with this announcement: https://discord.com/channels/973324189794697286/1136394146333081732/1526222795439083550 |
There was a problem hiding this comment.
Pull request overview
Adds a new standalone /operators page in apps/web that reads its closure-banner copy from content/** via @repo/content, and surfaces three related legal documents as markdown-backed tabs.
Changes:
- Introduces a new
operatorsCopypage section schema in@repo/contentand wires it into the page section discriminated union with test coverage. - Adds
content/pages/en/operators.jsonfor the new/operatorsroute plus supporting operator legal markdown documents and loader tests. - Implements the Next.js
/operatorsroute, adds it to route constants and the sitemap, and adds a small contract test to keep the closure banner copy in fixtures.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/content/src/schemas/pages/page-copy-sections.ts | Adds operatorsCopy Zod schema + inferred type for page sections. |
| packages/content/src/schemas/pages.ts | Exports the new operators section schema/type and includes it in the discriminated union. |
| packages/content/src/schemas/tests/page-dedup-sections.test.ts | Verifies the operators section parses and routes through the union. |
| content/pages/en/operators.json | Adds the /operators page fixture and closure banner copy + legal doc slugs. |
| apps/web/lib/legal-content.test.ts | Extends legal-doc loader tests to cover new operator docs and markdown structure. |
| apps/web/content/legal/operators-terms-of-use.md | Adds operators terms-of-use markdown document. |
| apps/web/content/legal/operators-privacy-policy.md | Adds operators privacy-policy markdown document. |
| apps/web/content/legal/operators-disclaimer.md | Adds operators sunset disclaimer markdown document. |
| apps/web/constants/routes.ts | Adds ROUTES.operators. |
| apps/web/components/sections/shared/legal-markdown.tsx | Adds h1 rendering and className support for styling legal markdown output. |
| apps/web/app/sitemap.ts | Adds /operators to indexable sitemap routes. |
| apps/web/app/[locale]/operators/page.tsx | Implements the /operators page that loads copy + legal docs. |
| apps/web/app/[locale]/operators/operators-legal-tabs.tsx | Adds client-side tab UI for switching between legal documents. |
| apps/web/app/tests/operators-page-contract.test.ts | Adds a contract test ensuring the route and closure banner content remain fixture-backed. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+48
to
+50
| <p className="font-mono text-[18px] leading-[1.35] md:text-[22px]"> | ||
| {data.banner.title} | ||
| </p> |
Comment on lines
+52
to
+54
| <h1 className="text-body-sans leading-[1.5] md:col-span-8 md:col-start-5 md:text-[16px]"> | ||
| {data.banner.body} | ||
| </h1> |
Comment on lines
+47
to
+58
| const [activeDocumentKey, setActiveDocumentKey] = | ||
| useState<OperatorsLegalDocumentKey | null>(null) | ||
|
|
||
| useEffect(() => { | ||
| const syncDocumentFromHash = () => { | ||
| const hashId = window.location.hash.replace(/^#/, '') | ||
| const documentButton = documentButtons.find( | ||
| (button) => button.hashId === hashId | ||
| ) | ||
|
|
||
| setActiveDocumentKey(documentButton?.key ?? null) | ||
| } |
Comment on lines
+84
to
+87
| <div | ||
| aria-label="Operators legal documents" | ||
| className="flex flex-wrap gap-6 border-b border-brand-dark-green/15 md:gap-8" | ||
| > |
| </div> | ||
|
|
||
| {activeDocument && ( | ||
| <div id={activePanelId} className="max-w-[960px]"> |
Comment on lines
+96
to
+98
| type="button" | ||
| aria-controls={button.panelId} | ||
| aria-expanded={isActive} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing