-
Notifications
You must be signed in to change notification settings - Fork 183
fix(studio): fix broken doc links #2052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis update standardizes and corrects documentation hyperlink URLs across multiple Studio components and pages. The changes involve updating anchor tag href attributes to point to the correct, current documentation paths for CLI commands, Slack integration, webhooks, and persisted operations. No logic, control flow, or exported/public entity declarations are altered. Changes
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/clients.tsx (1)
648-670
: Same hard-coded URL as above. Apply the constant/noopener
suggestion here for consistency.
🧹 Nitpick comments (8)
studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/checks/index.tsx (1)
129-136
: Consider centralising documentation URL fragmentsThis is the N-th place in the codebase that manually concatenates
docsBaseURL + "/cli/subgraph/check"
.
A tiny typo (as we just fixed) breaks all deep-links. It might be safer to harvest all CLI doc paths in a single enum/const map and reference them, e.g.- href={docsBaseURL + "/cli/subgraph/check"} + href={getDocURL("cli.subgraph.check")}Implementing a thin helper eliminates string duplication and makes future moves/renames mechanical.
studio/src/pages/[organizationSlug]/[namespace]/subgraph/[subgraphSlug]/schema.tsx (1)
84-93
: Same duplication caveat applies hereAnother literal
"/cli/subgraph/publish"
concatenation. Please consider the helper/enum suggested in the previous comment to reduce repetition and avoid drift.studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/changelog/index.tsx (1)
185-193
: Link string duplicationThe corrected link is fine, but it reiterates the hard-coded path. Re-use a shared constant/helper to keep all CLI doc routes in one place.
studio/src/components/federatedgraphs-cards.tsx (1)
480-487
: Minor: centralise federated-graph doc pathsSame pattern as above (
"/cli/federated-graph/create"
). Centralising would remove the likelihood of future pluralisation/renaming errors.studio/src/components/schema/empty-schema-state.tsx (1)
24-31
: Duplicate literal pathThe publish subgraph docs URL is now correct, but again repeats a literal string. Please see earlier suggestion about a shared constant/helper.
studio/src/components/subgraphs-table.tsx (1)
108-116
: Consider extracting doc-link & addingnoopener
.The string
"/cli/subgraph/create"
is now hard-coded here but similar CLI doc links appear in several components. Re-using a shared constant (e.g.DOCS_CLI_SUBGRAPH_CREATE
) underlib/constants.ts
would keep paths maintainable if they ever change again.While touching the anchor: adding
noopener
alongsidenoreferrer
avoids thewindow.opener
leak.- rel="noreferrer" + rel="noopener noreferrer"studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/clients.tsx (2)
244-252
: Duplication of docs URL – extract to constant & addnoopener
.The persisted-operations docs link now appears multiple times in this file (see lines 648-669 and 664-669). Repeating the literal increases drift risk. Suggest:
const DOCS_PERSISTED_OPS = `${docsBaseURL}/router/persisted-queries/persisted-operations`;and reuse.
Also appendnoopener
inrel
.- rel="noreferrer" + rel="noopener noreferrer"
664-666
: Minor: preferpassHref
when using external links withnext/link
.If you switch to
Link
for external URLs (line 664) ensure thepassHref
prop is set to propagatehref
to the underlying<a>
; otherwise use a plain<a>
tag.
[current code works, flagging only if you refactor].
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
studio/src/components/federatedgraphs-cards.tsx
(1 hunks)studio/src/components/schema/empty-schema-state.tsx
(1 hunks)studio/src/components/subgraphs-table.tsx
(1 hunks)studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/changelog/index.tsx
(1 hunks)studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/checks/index.tsx
(1 hunks)studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/clients.tsx
(3 hunks)studio/src/pages/[organizationSlug]/[namespace]/subgraph/[subgraphSlug]/schema.tsx
(1 hunks)studio/src/pages/[organizationSlug]/integrations.tsx
(2 hunks)studio/src/pages/[organizationSlug]/webhooks.tsx
(3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (9)
studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/changelog/index.tsx (1)
studio/src/lib/constants.ts (1)
docsBaseURL
(1-1)
studio/src/components/federatedgraphs-cards.tsx (1)
studio/src/lib/constants.ts (1)
docsBaseURL
(1-1)
studio/src/pages/[organizationSlug]/[namespace]/subgraph/[subgraphSlug]/schema.tsx (1)
studio/src/lib/constants.ts (1)
docsBaseURL
(1-1)
studio/src/components/schema/empty-schema-state.tsx (1)
studio/src/lib/constants.ts (1)
docsBaseURL
(1-1)
studio/src/components/subgraphs-table.tsx (1)
studio/src/lib/constants.ts (1)
docsBaseURL
(1-1)
studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/checks/index.tsx (1)
studio/src/lib/constants.ts (1)
docsBaseURL
(1-1)
studio/src/pages/[organizationSlug]/integrations.tsx (1)
studio/src/lib/constants.ts (1)
docsBaseURL
(1-1)
studio/src/pages/[organizationSlug]/webhooks.tsx (1)
studio/src/lib/constants.ts (1)
docsBaseURL
(1-1)
studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/clients.tsx (1)
studio/src/lib/constants.ts (1)
docsBaseURL
(1-1)
🔇 Additional comments (5)
studio/src/pages/[organizationSlug]/integrations.tsx (2)
625-625
: Consistent URL update for Slack integration documentation.The documentation URL has been consistently updated to match the new path structure under
/studio/alerts-and-notifications/
.
583-583
: Slack integration documentation link verified
- Confirmed that
https://cosmo-docs.wundergraph.com/studio/alerts-and-notifications/slack-integration
returns HTTP 200.- Updates in
studio/src/pages/[organizationSlug]/integrations.tsx
(lines 583 and 625) correctly point to the new path.No further changes required.
studio/src/pages/[organizationSlug]/webhooks.tsx (3)
506-506
: Consistent URL update for webhook documentation.The documentation URL has been consistently updated to match the new path structure under
/studio/alerts-and-notifications/
.
524-524
: Consistent URL update for webhook documentation.The documentation URL has been consistently updated to match the new path structure under
/studio/alerts-and-notifications/
.
384-384
: Webhook documentation URL verified and accessibleThe updated webhook documentation URL (
/studio/alerts-and-notifications/webhooks#verification
) returns HTTP 200, confirming the link works as expected. No further changes are needed.
- File:
studio/src/pages/[organizationSlug]/webhooks.tsx
- Line 384: href updated to
docsBaseURL + "/studio/alerts-and-notifications/webhooks#verification"
- Line 506: href in empty state description
- Line 524: href in informational paragraph above table
Hi @Blacksmoke16 , Thanks for the PR. |
Summary by CodeRabbit
Checklist
Tests or benchmarks have been added or updated.Also opened wundergraph/cosmo-docs#123 as that was another broken link I encountered while exploring Cosmo Cloud.