feat(api,landing): deprecation banner, schema-path sweep, hero CTAs, feature-card links (#1337 #1342 #1343 #1344) - #1456
Open
spotkorner-dot wants to merge 5 commits into
Conversation
|
@spotkorner-dot Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Deprecation banner, schema-path sweep, hero CTAs, feature-card links
Four
frontend/issues (API client + landing page).What changed and why
#1337 - surface API deprecation headers
New end-to-end path for the
Deprecation/Sunset/Linkresponse headers(
API_SPEC.md's 12-month deprecation policy):lib/api/deprecation.ts- a small signal bus.reportResponseHeaders(headers)acts onlywhen
Deprecationis present and notfalse(so one stale non-deprecated response canneither fabricate nor clear the banner); it parses
Sunsetand the migration URL fromLink(rel="deprecation"/"sunset"/"successor-version", falling back to a bare<url>).components/DeprecationBanner.tsx- a dismissible, non-blockingrole="status"bannerwith the formatted sunset date and migration link. Dismissal is stored in
localStoragekeyed by sunset date: it stays hidden across visits, but a new/changed sunset date
brings it back.
Deprecation: false; opens with parsedsunset + link; a later plain response doesn't clear it; dismissal persists per date; a new
date re-shows.
#1342 - schema-path contract sweep
The
client-schema-path-contract.test.ts/client-schema-type-contract.test.tspairalready exists and passes (the type test fails
tscon drift; the path test checks 10endpoints). Added a whole-source sweep: every
"/api/..."/"/health"string literal inpublic-client.ts+admin-client.tsmust be a key inschema.d.ts'spathsor in anexplicit
KNOWN_UNLISTEDset (placeBet #78, newsletter, email admin endpoints). A newclient method with a mistyped or un-schema'd path now fails this test at PR time rather than
404ing in production.
#1343 - hero CTAs
The hero had only the newsletter form. Added a primary CTA (
Explore markets->/markets,into the live product) and a secondary CTA (
See how it works->#how-it-works) as plain<a>links, plus i18n keys and.hero-ctastyles. Motion: the repo's globalprefers-reduced-motionrule (accessibility.css) already disables the hero's entranceanimations; the new CTAs carry no auto-playing motion.
href="/markets", secondaryhref="#how-it-works"and the targetsection exists.
#1344 - feature cards as links + real copy
FeatureCardtakes an optionalhref; when set, the whole card is a singlekeyboard-reachable
<a>(with an.sr-only"learn more" suffix and a:focus-visibleoutline). Without
hrefit stays a plain<article>.hybrid oracle + community resolution with a dispute window, and Stellar settlement with
the referral program - instead of generic "Fast / Secure / Decentralized" copy. Each links
to
/markets..features-gridgets an explicitgrid-template-columns: 1frbelow the 520px breakpoint(on top of the existing
auto-fitreflow) so the single-column layout is unambiguous.href; keyboard-reachable; the LandingPage data-drivenand i18n tests updated for the new copy.
How to test
tsc --noEmit: no errors in the touched files over the repo's pre-existing count.main(unchanged by this PR):Statistics.test.tsx,LandingPage.keyboard.test.tsx, andLandingPage.accessibility.test.tsxare red(identical 12 failures with or without this branch - a stale
getStatisticsmock shapeand an ambiguous
getByRole('alert')after an earlier Newsletter/Statistics refactor;the alert scoping is fixed in the FE-037 PR).
Breaking changes
None. New exports and props only.
Related issues
Closes #1337
Closes #1342
Closes #1343
Closes #1344
PR Checklist
main