Fix case-study share chrome, hero lockup width, and copy confirmation in the share dialog.
Marketing pages omitted create-flow nav copy, so Share rendered as a translation key; the case-study banner squeezed hero text to the thumbnail width; Copy link had no hover or copied state. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+14
-13
@@ -1,17 +1,15 @@
|
||||
/**
|
||||
* Marketing-scoped message bundle: every namespace from `./index` EXCEPT the
|
||||
* `create.*` subtree. The `create` namespace is ~41 KB gzipped — the largest
|
||||
* single contributor to per-route HTML size — and is only used inside
|
||||
* `(app)/create/*`. Excluding it from the `(marketing)` group's
|
||||
* `MessagesProvider` removes the embed from every marketing HTML response.
|
||||
* bulk of the `create.*` subtree. That subtree is ~41 KB gzipped — the
|
||||
* largest single contributor to per-route HTML size — and wizard copy is
|
||||
* only used inside `(app)/create/*`.
|
||||
*
|
||||
* The type stays compatible with `typeof import("./index").default` because
|
||||
* we satisfy the same key shape (modulo `create`); marketing client
|
||||
* components only read keys that exist here. If a future change reaches into
|
||||
* `messages.create.*` from a marketing surface, `getTranslation` will return
|
||||
* the dotted key as the fallback — visible immediately at runtime.
|
||||
* Case-study completed-rule chrome reuses `CreateFlowTopNav`, so this bundle
|
||||
* includes `create.topNav` only. Other `create.*` keys still fall back to the
|
||||
* dotted path via `getTranslation` if a marketing surface reaches them.
|
||||
*
|
||||
* Keep this in sync with new entries added to `./index` (excluding `create/`).
|
||||
* Keep this in sync with new entries added to `./index` (excluding wizard
|
||||
* `create/` files other than `create/topNav.json`).
|
||||
* See `docs/perf/next16-eval.md` for measurement context.
|
||||
*/
|
||||
import common from "./common.json";
|
||||
@@ -53,6 +51,7 @@ import metadata from "./metadata.json";
|
||||
import modalsShare from "./modals/share.json";
|
||||
import modalsPopoverExport from "./modals/popoverExport.json";
|
||||
import modalsAskOrganizerInquiry from "./modals/askOrganizerInquiry.json";
|
||||
import createTopNav from "./create/topNav.json";
|
||||
import type messages from "./index";
|
||||
|
||||
const marketingMessages = {
|
||||
@@ -99,11 +98,13 @@ const marketingMessages = {
|
||||
popoverExport: modalsPopoverExport,
|
||||
askOrganizerInquiry: modalsAskOrganizerInquiry,
|
||||
},
|
||||
create: {
|
||||
topNav: createTopNav,
|
||||
},
|
||||
};
|
||||
|
||||
// Cast to the full shape so it satisfies `typeof import("./index").default`
|
||||
// at the MessagesProvider boundary. Reads of `messages.create.*` from a
|
||||
// marketing surface are a code smell and will return the dotted key (the
|
||||
// runtime `getTranslation` fallback) — visible immediately.
|
||||
// at the MessagesProvider boundary. Reads of wizard `create.*` keys other
|
||||
// than `create.topNav` still return the dotted key at runtime.
|
||||
export default marketingMessages as typeof messages;
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
"title": "Share this CommunityRule",
|
||||
"description": "Anyone with the link can view this rule.",
|
||||
"copyLink": "Copy link",
|
||||
"copied": "Copied!",
|
||||
"copiedLive": "Link copied to clipboard",
|
||||
"signal": "Signal",
|
||||
"slack": "Slack",
|
||||
"discord": "Discord",
|
||||
|
||||
Reference in New Issue
Block a user