Skip to content

Commit 62d76c0

Browse files
authored
fix(app): read leftover product names from the brand hook (#3572)
## Summary The ClickStack brand migration still left a few user-facing strings hardcoded as ClickStack or HyperDX. A downstream build that replaces `src/brand/` does not change them. These now go through `useBrandDisplayName` or `usePageTitle`. Doc URLs are unchanged. - ClickHouse-build banner: "{brand} features…" and the "{brand} docs" link - `/careers` title, and "Join us to build {brand} at ClickHouse" - Raw SQL chart help: "{brand} documentation" - Search syntax reference tooltip: "{brand} search documentation" Package names, the HyperDX browser SDK, Terraform provider copy, and comments are left as they are. ### Screenshots or video Not captured in this session. The table is left for a visual check. | Before | After | | :----- | :---- | | Hardcoded ClickStack / HyperDX | Brand display name | ### How to reproduce **Starting point:** [play.hyperdx.io](https://play.hyperdx.io), or `yarn app:dev:local` connected to the demo server. The ClickHouse-build banner only shows when `IS_CLICKHOUSE_BUILD` is set. **On `main`:** 1. Open `/careers`. The document title is "Careers | HyperDX" and the intro says "build ClickStack". 2. Open Search, then the help icon labeled "Open syntax reference". The external-link tooltip says "ClickStack search documentation". 3. Open Chart Explorer on a raw SQL chart and expand "SQL Chart Instructions". The link says "ClickStack documentation". 4. In a ClickHouse build, the top banner says "lacking core ClickStack features" and links "ClickStack Docs". **On this branch:** 1. Repeat the same steps. Each of those names is the brand display name (ClickStack in this repo). ### How to test on Vercel preview **Preview routes:** /careers, /search, /chart **Steps:** 1. Open /careers and confirm the intro says the brand name rather than a hardcoded "ClickStack", and the tab title is "Careers - {brand}". 2. Open /search, click the search help icon ("Open syntax reference"), and hover the external-link icon. Confirm the tooltip uses the brand name. 3. Open /chart, switch to a raw SQL chart, expand "SQL Chart Instructions", and confirm the documentation link uses the brand name. ### References - Related PRs: #3545 - Linear Issue: Made with [Cursor](https://cursor.com)
1 parent ab36d4e commit 62d76c0

4 files changed

Lines changed: 18 additions & 8 deletions

File tree

‎packages/app/src/CareersPage.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import {
1313
} from '@mantine/core';
1414
import { useQuery } from '@tanstack/react-query';
1515

16-
import { INSTANCE_TITLE_SUFFIX } from '@/config';
16+
import { useBrandDisplayName, usePageTitle } from '@/brand';
17+
1718
interface GreenhouseJob {
1819
id: number;
1920
title: string;
@@ -81,6 +82,8 @@ function useGreenhouseJobs() {
8182
}
8283

8384
export default function CareersPage() {
85+
const brandName = useBrandDisplayName();
86+
const title = usePageTitle('Careers');
8487
const { data: commitsData, isLoading: commitsLoading } = useRecentCommits();
8588
const { data, isLoading, isError } = useGreenhouseJobs();
8689

@@ -92,14 +95,14 @@ export default function CareersPage() {
9295
return (
9396
<Container size="md" py="xl">
9497
<Head>
95-
<title>{`Careers | HyperDX${INSTANCE_TITLE_SUFFIX}`}</title>
98+
<title>{title}</title>
9699
</Head>
97100
<Stack gap="lg">
98101
<Title order={1}>
99102
ClickHouse Careers: Help Build the Future of Observability
100103
</Title>
101104
<Text c="dimmed">
102-
Join us to build ClickStack at ClickHouse, scaling a high performance
105+
Join us to build {brandName} at ClickHouse, scaling a high performance
103106
observability platform that ingests and queries petabytes of telemetry
104107
across metrics, logs, and traces.
105108
<br />

‎packages/app/src/components/ChartEditor/RawSqlChartInstructions.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
IconCopy,
2020
} from '@tabler/icons-react';
2121

22+
import { useBrandDisplayName } from '@/brand';
2223
import { useLocalStorage } from '@/utils';
2324

2425
import { DISPLAY_TYPE_INSTRUCTIONS } from './constants';
@@ -33,6 +34,7 @@ export function RawSqlChartInstructions({
3334
displayType: DisplayType;
3435
variables?: ChartVariable[];
3536
}) {
37+
const brandName = useBrandDisplayName();
3638
const [helpOpened, setHelpOpened] = useLocalStorage<boolean>(
3739
HELP_OPENED_KEY,
3840
true,
@@ -79,7 +81,7 @@ export function RawSqlChartInstructions({
7981
href="https://clickhouse.com/docs/use-cases/observability/clickstack/dashboards/sql-visualizations"
8082
target="_blank"
8183
>
82-
ClickStack documentation
84+
{brandName} documentation
8385
</Anchor>{' '}
8486
for an exhaustive list.
8587
</Text>

‎packages/app/src/components/SearchInput/SyntaxReferenceModal.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import {
1616
} from '@mantine/core';
1717
import { IconExternalLink, IconSearch } from '@tabler/icons-react';
1818

19+
import { useBrandDisplayName } from '@/brand';
20+
1921
type Language = 'sql' | 'lucene';
2022

2123
type Row = { expr: string; desc: string };
@@ -292,6 +294,7 @@ export default function SyntaxReferenceModal({
292294
onClose: () => void;
293295
language: Language;
294296
}) {
297+
const brandName = useBrandDisplayName();
295298
const [language, setLanguage] = useState<Language>(initialLanguage);
296299
const [query, setQuery] = useState('');
297300

@@ -336,7 +339,7 @@ export default function SyntaxReferenceModal({
336339
size="xs"
337340
style={{ flex: 1 }}
338341
/>
339-
<Tooltip label="ClickStack search documentation" withArrow>
342+
<Tooltip label={`${brandName} search documentation`} withArrow>
340343
<Text
341344
size="xs"
342345
c="dimmed"

‎packages/app/src/layout.tsx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { QuerySurface } from '@hyperdx/common-utils/dist/clickhouse';
55
import { Button, Center, Group, Text } from '@mantine/core';
66
import { IconX } from '@tabler/icons-react';
77

8+
import { useBrandDisplayName } from '@/brand';
89
import AppNav from '@/components/AppNav';
910
import { IS_CLICKHOUSE_BUILD } from '@/config';
1011
import { QueryAttributionProvider } from '@/queryAttribution';
@@ -30,6 +31,7 @@ export const APP_CONTENT_SCROLL_CONTAINER_ID = 'app-content-scroll-container';
3031
*/
3132
function PageWrapper({ children }: { children: React.ReactNode }) {
3233
const router = useRouter();
34+
const brandName = useBrandDisplayName();
3335
const [bannerState, setBannerState] = useLocalStorage(
3436
'clickstack-banner-state',
3537
'opened',
@@ -58,16 +60,16 @@ function PageWrapper({ children }: { children: React.ReactNode }) {
5860
<Group bg="var(--color-text-primary)">
5961
<Center style={{ flexGrow: 1 }}>
6062
<Text py="xs" size="sm" c="var(--color-text-inverted)">
61-
This is not recommended for production use and is lacking core
62-
ClickStack features such as alerts and saved searches. For a
63+
This is not recommended for production use and is lacking core{' '}
64+
{brandName} features such as alerts and saved searches. For a
6365
proper experience, visit the{' '}
6466
<strong>
6567
<Link
6668
href="https://clickhouse.com/docs/use-cases/observability/clickstack/getting-started"
6769
target="_blank"
6870
rel="noopener noreferrer"
6971
>
70-
ClickStack Docs
72+
{brandName} docs
7173
</Link>
7274
</strong>
7375
</Text>

0 commit comments

Comments
 (0)