Skip to content

fix: broken redirect links in developer-docs/contributing - #3343

Merged
jobenjada merged 3 commits into
formbricks:mainfrom
naineel1209:fix/developer-docs-wrong-redirect
Oct 10, 2024
Merged

jobenjada merged 3 commits into
formbricks:mainfrom
naineel1209:fix/developer-docs-wrong-redirect

Conversation

@naineel1209

@naineel1209 naineel1209 commented Oct 9, 2024 •

Copy link
Copy Markdown
Contributor

Fixes #3344

What does this PR do?

This PR addresses the following broken routes on the Developer Docs page:

  1. On the page Overview: fixes the broken redirect from /developer-docs/contributing to /developer-docs/contributing/get-started.

  2. On the page Contributing - Get Started: fixes the broken redirects for Gitpod (from /docs/developer-docs/contributing/gitpod to /developer-docs/contributing/gitpod) and for GitHub Codespaces (from /docs/developer-docs/contributing/codespaces to /developer-docs/contributing/codespaces).

The broken URLs in [2] were caused by the basePath already being set to /docs, which caused the redirect links to include /docs redundantly, leading to errors.

image

image

Checklist

Required

  • Filled out the "How to test" section in this PR
  • [✅] Read How we Code at Formbricks
  • [✅] Self-reviewed my own code
  • Commented on my code in hard-to-understand bits
  • [✅] Ran pnpm build
  • [✅] Checked for warnings, there are none
  • [✅] Removed all console.logs
  • [✅] Merged the latest changes from main onto my branch with git pull origin main
  • [✅] My changes don't cause any responsiveness issues
  • [✅] First PR at Formbricks? Please sign the CLA! Without it we wont be able to merge it 🙏

Appreciated

  • [✅] If a UI change was made: Added a screen recording or screenshots to this PR
  • [✅] Updated the Formbricks Docs if changes were necessary

Summary by CodeRabbit

  • New Features

    • Enhanced documentation for the contribution guide, including updated setup instructions for Gitpod and GitHub Codespaces.
    • Added more details regarding Formbricks SDKs and APIs in the overview section.
  • Documentation

    • Updated metadata for clarity on the contribution guide's purpose.
    • Improved navigation links for easier access to contributing resources.

@vercel

vercel Bot commented Oct 9, 2024

Copy link
Copy Markdown

@naineel1209 is attempting to deploy a commit to the formbricks Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Oct 9, 2024 •

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions for pull request titles! 🙏

@naineel1209
naineel1209 marked this pull request as ready for review October 9, 2024 09:14
@coderabbitai

coderabbitai Bot commented Oct 9, 2024 •

Copy link
Copy Markdown
Contributor

Walkthrough

The pull request introduces updates to the Formbricks documentation, specifically modifying the page.mdx files for the contributing guide and overview. Changes include updating metadata, enhancing content clarity, and correcting redirect links to reflect a new path structure. The URLs for Gitpod and GitHub Codespaces have been simplified, and minor formatting adjustments have been made throughout the documents.

Changes

File Path Change Summary
apps/docs/app/developer-docs/contributing/get-started/page.mdx Updated metadata (title and description), modified setup instructions with new Gitpod and Codespaces URLs.
apps/docs/app/developer-docs/overview/page.mdx Enhanced content with additional details about SDKs and APIs, updated contributing link to new path.

Assessment against linked issues

Objective Addressed Explanation
Redirect link for Contributing section on Overview page should point to /developer-docs/contributing/get-started (#3344) ✅
Update Gitpod and GitHub Codespaces links to remove /docs prefix (#3344) ✅

Possibly related PRs

  • fix: update broken links in CONTRIBUTING.md #3298: This PR updates links in CONTRIBUTING.md to point to the new paths for Gitpod and Codespaces, which directly relates to the changes made in the main PR regarding the updated URLs in the page.mdx files.

Suggested labels

bug, 🕹️ oss.gg, 🕹️ 50 points

Suggested reviewers

  • mattinannt

Poem

In the docs where rabbits roam,
We’ve fixed the paths to guide you home.
With clearer links and setups bright,
Contributing now feels just right! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between f31cc9f and abbd317.

📒 Files selected for processing (2)
  • apps/docs/app/developer-docs/contributing/get-started/page.mdx (1 hunks)
  • apps/docs/app/developer-docs/overview/page.mdx (1 hunks)
🧰 Additional context used
🔇 Additional comments (3)
apps/docs/app/developer-docs/overview/page.mdx (1)

Line range hint 1-36: LGTM: Well-structured overview of Formbricks Developer Documentation

The metadata and content provide a comprehensive overview of the Formbricks Developer Documentation. The structure is clear, and the descriptions of various SDKs and APIs are informative and consistent.

Also applies to: 38-41

🧰 Tools
🪛 LanguageTool

[uncategorized] ~35-~35: You might be missing the article “the” here.
Context: ...ur applications using our UI as well as API. Stay updated with real-time data and t...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

apps/docs/app/developer-docs/contributing/get-started/page.mdx (2)

Line range hint 3-7: LGTM: Metadata updates improve clarity and engagement.

The changes to the metadata object enhance the documentation's discoverability and provide a clearer overview of the contribution process. The new title is more descriptive and engaging, while the updated description offers a concise summary of how to contribute to Formbricks.

🧰 Tools
🪛 LanguageTool

[formatting] ~41-~41: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...elopers we suggest using either of these, because you can dive into coding within minutes...

(COMMA_BEFORE_BECAUSE)


37-38: URL updates look good. Verify redirects are working as expected.

The changes to the Gitpod and GitHub Codespaces URLs align with the PR objectives to fix broken redirect links. The removal of the /docs prefix should resolve the 404 errors mentioned in the issue.

To ensure the changes are effective, please run the following script to check if the new URLs are accessible and don't result in 404 errors:

This script will help verify that the new URLs are working correctly in the development environment.

Learn about Formbricks Webhooks and how to set up event-driven notifications in your applications using our UI as well as API. Stay updated with real-time data and trigger actions based on specific response events within your Formbricks environment.

### [Contributing to Formbricks](/developer-docs/contributing)
### [Contributing to Formbricks](/developer-docs/contributing/get-started)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Issues Found: Remaining Instances of Old Link

Several files still contain the old link /developer-docs/contributing that should be updated to /developer-docs/contributing/get-started:

  • README.md
  • CONTRIBUTING.md (line 1 for "Fork the Repository")
  • apps/docs/next.config.mjs
  • apps/docs/lib/navigation.ts (multiple entries)

Please update these instances to ensure all redirects function correctly.

🔗 Analysis chain

Approved: Link updated to fix broken redirect

The change from /developer-docs/contributing to /developer-docs/contributing/get-started addresses the PR objective of fixing the broken redirect. This update provides a more specific entry point for contributors.

To ensure consistency across the documentation, let's verify if this new link is used elsewhere:



🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining instances of the old link and confirm the existence of the new link target.

# Test 1: Search for any remaining instances of the old link
echo "Searching for any remaining instances of '/developer-docs/contributing':"
rg --type mdx '/developer-docs/contributing(?!/get-started)'

# Test 2: Confirm the existence of the new link target
echo "Checking for the existence of the new 'get-started' page:"
fd -e mdx 'page.mdx' apps/docs/app/developer-docs/contributing/get-started

Length of output: 768


Script:

#!/bin/bash
# Description: Find any instances of '/developer-docs/contributing' not pointing to '/developer-docs/contributing/get-started'

# Search for all instances of '/developer-docs/contributing'
echo "Searching for all instances of '/developer-docs/contributing':"
rg --type mdx '/developer-docs/contributing'

# Exclude the correct '/get-started' links
echo "Filtering out correct '/get-started' links:"
rg --type mdx '/developer-docs/contributing' | grep -v '/developer-docs/contributing/get-started'

Length of output: 440


Script:

#!/bin/bash
# Description: Find any instances of '/developer-docs/contributing' not pointing to '/developer-docs/contributing/get-started'

# Search for all instances of '/developer-docs/contributing' in any file type
echo "Searching for all instances of '/developer-docs/contributing':"
rg '/developer-docs/contributing'

# Exclude the correct '/get-started' links
echo "Filtering out correct '/get-started' links:"
rg '/developer-docs/contributing' | grep -v '/developer-docs/contributing/get-started'

Length of output: 2681

@jobenjada jobenjada left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks :)

@mattinannt mattinannt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@naineel1209 thank you very much for the link fixes :-)

@mattinannt mattinannt added the 🕹️ oss.gg Community issue via oss.gg label Oct 10, 2024
@jobenjada
jobenjada enabled auto-merge October 10, 2024 21:57
@jobenjada
jobenjada added this pull request to the merge queue Oct 10, 2024
Merged via the queue into formbricks:main with commit 595fe98 Oct 10, 2024
@oss-gg

oss-gg Bot commented Oct 10, 2024

Copy link
Copy Markdown

Awarding naineel1209: 150 points 🕹️ Well done! Check out your new contribution on oss.gg/naineel1209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🕹️ oss.gg Community issue via oss.gg

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Broken Redirects on Developer Docs -> Contributing Page

3 participants