Skip to content

Update contributing guidelines for before you start#723

Merged
kotAPI merged 4 commits intomainfrom
pranay/better-contribution-docs
Jan 4, 2025
Merged

Update contributing guidelines for before you start#723
kotAPI merged 4 commits intomainfrom
pranay/better-contribution-docs

Conversation

@kotAPI
Copy link
Copy Markdown
Collaborator

@kotAPI kotAPI commented Jan 1, 2025

This PR adds docs improvements for new contributors and existing

Summary by CodeRabbit

  • Documentation

    • Updated "Before You Start" contributing guidelines with clearer prerequisites and recommendations.
    • Added new documentation page for setting up development environment.
    • Introduced a guide for contributing to Rad UI with detailed steps.
    • Updated documentation layout with refined messaging about project development status.
  • New Features

    • Added new navigation item for development environment setup guide.
    • Introduced a "Star" button for quick access to the GitHub repository.
  • Style

    • Adjusted layout and background color in various documentation components.
    • Modified navigation component padding.
  • Chores

    • Refined content structure and readability of documentation pages.
    • Updated dependency version for @radui/ui.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 1, 2025

Caution

Review failed

The pull request is closed.

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 eslint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

docs/app/docs/contributing/contributing-to-rad-ui/StarButton.tsx

Oops! Something went wrong! :(

ESLint: 8.56.0

ESLint couldn't find the config "next/core-web-vitals" to extend from. Please check that the name of the config is correct.

The config "next/core-web-vitals" was referenced from the config file in "/docs/.eslintrc.json".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

Walkthrough

This pull request introduces significant improvements to the documentation and navigation structure of the Rad UI project. The changes include updating the contributing guidelines, adding a new page for setting up the development environment, modifying the documentation layout, and enhancing navigation. The modifications aim to provide clearer, more structured guidance for potential contributors and improve the overall user experience of the documentation.

Changes

File Change Summary
docs/app/docs/contributing/before-you-start/page.tsx Updated page name constant, refined component title capitalization, restructured introductory text with clearer prerequisites, and renamed "Explore the Playground" section to "Getting Started"
docs/app/docs/contributing/setting-up-dev-environment/page.tsx Added new component with comprehensive guide for setting up development environment, including repository cloning, code structure explanation, Storybook usage, and documentation website setup
docs/app/docs/layout.tsx Modified main content div with updated class and ID, revised Callout component text to encourage contributions
docs/components/Main/Main.js Updated layout container class names and background color based on dark mode state
docs/components/layout/Documentation/utils.js Modified BookMarkLink component to prevent default anchor link behavior and adjust scrolling mechanism
docs/components/navigation/Navigation.js Added "Setting up dev environment" navigation item and adjusted bottom padding
docs/components/Main/NavBar.js Updated button styles in NavBar component to change variant from "surface" to "outline"
docs/package.json Updated version of @radui/ui dependency from ^0.0.26 to ^0.0.27
docs/app/docs/contributing/contributing-to-rad-ui/StarButton.tsx Introduced new StarButton component with GitHub logo and click handler to open repository link
docs/app/docs/contributing/contributing-to-rad-ui/page.tsx Added new ContributingToRadUI component to guide contributions with multiple sections detailing the process
docs/components/layout/Documentation/Documentation.js Wrapped Heading component with BookMarkLink to enhance navigation structure

Sequence Diagram

sequenceDiagram
    participant Contributor
    participant Docs
    participant Repository
    participant DevEnvironment

    Contributor->>Docs: Read Contributing Guidelines
    Docs-->>Contributor: Display Prerequisites
    Contributor->>Docs: Navigate to Dev Environment Setup
    Docs-->>Contributor: Show Cloning & Setup Instructions
    Contributor->>Repository: Fork & Clone
    Contributor->>DevEnvironment: Install Dependencies
    Contributor->>DevEnvironment: Start Storybook
    Contributor->>DevEnvironment: Run Documentation Server
Loading

Possibly related PRs

  • Added bookmarklink component for headings and link sharing #602: The introduction of the BookMarkLink component in this PR relates to the changes in the main PR, which also focuses on enhancing documentation and user guidance for contributors.
  • Docs Improvements #676: The modifications to the MainLayout component and the introduction of the NavBar component are relevant as they improve the overall documentation structure, aligning with the main PR's focus on enhancing contributing guidelines.
  • Better Docs Structure #694: The improvements in documentation structure and the introduction of new helper components directly relate to the main PR's goal of enhancing clarity and accessibility in contributing guidelines.
  • Changes to collapsible component #528 #677: The changes to the Collapsible component, which enhance its functionality and usability, are relevant as they contribute to the overall improvement of the documentation and user experience, similar to the objectives of the main PR.
  • AvatarGroup Docs #716: The introduction of documentation for the AvatarGroup component aligns with the main PR's focus on improving documentation structure and clarity for contributors.

Suggested labels

automerge

Poem

🐰 A Rabbit's Guide to Code's New Height
Docs unfurl with wisdom bright,
Contributing path now clear and light,
From setup to playground's delight,
Our code grows stronger, taking flight!
hop hop 🚀


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a3625d8 and a0c3d6c.

📒 Files selected for processing (4)
  • docs/app/docs/contributing/contributing-to-rad-ui/StarButton.tsx (1 hunks)
  • docs/app/docs/contributing/contributing-to-rad-ui/page.tsx (1 hunks)
  • docs/components/layout/Documentation/Documentation.js (1 hunks)
  • docs/components/navigation/Navigation.js (2 hunks)

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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a 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

🧹 Nitpick comments (1)
docs/app/docs/contributing/setting-up-dev-environment/page.tsx (1)

8-9: Consider consistent naming between PAGE_NAME and component title.

You use PAGE_NAME = 'BEFORE_YOU_START', but this page is actually "Setting Up Dev Environment." For clarity in debugging and maintenance, consider renaming the PAGE_NAME constant to reflect the page’s actual title (e.g., 'SETTING_UP_DEV_ENV'), or ensure a matching name/label so readers and contributors can locate relevant content more intuitively.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb20821 and 20e4967.

📒 Files selected for processing (6)
  • docs/app/docs/contributing/before-you-start/page.tsx (1 hunks)
  • docs/app/docs/contributing/setting-up-dev-environment/page.tsx (1 hunks)
  • docs/app/docs/layout.tsx (1 hunks)
  • docs/components/Main/Main.js (1 hunks)
  • docs/components/layout/Documentation/utils.js (1 hunks)
  • docs/components/navigation/Navigation.js (2 hunks)
🔇 Additional comments (12)
docs/components/Main/Main.js (1)

20-20: Good use of flex layout and updated background color
This change effectively applies a column layout and sets a more neutral background color (bg-gray-50) in light mode, aligning with contemporary UI conventions.

docs/app/docs/contributing/before-you-start/page.tsx (4)

5-5: PAGE_NAME constant renamed for clarity
Renaming the PAGE_NAME to "BEFORE_YOU_START" improves clarity and consistently reflects the updated page context.


10-10: Title change for better readability
Updating the title to "Before You Start" aligns well with standard heading capitalization practices.


12-22: Clear prerequisites section
Shifting from a single paragraph to a bullet list is beneficial. It outlines the essential knowledge (HTML, CSS, JS, TS, React) in a more digestible format. This should help contributors identify readiness at a glance.


26-34: Logical new “Getting Started” section
Introducing a concise bullet list of recommended first steps (Playground, documentation, local setup) provides a structured path for newcomers.

docs/app/docs/layout.tsx (3)

15-15: Scrollable main content container
Applying overflow-scroll and pt-2 on the main content area with id="docs-content" offers better scrolling behavior and a clear anchor target.


21-23: Encouraging contributions in callout
The updated text clarifies that Rad UI is open for contributors, referencing the “Before You Start” doc. This change should motivate and guide potential collaborators.


26-26: Wrapper div for content
Adding a separate wrapper div (.mt-2) under the callout improves readability and visual spacing.

docs/components/layout/Documentation/utils.js (1)

11-19: Improving scroll behavior with preventDefault and direct element scrolling
Preventing the default link behavior avoids conflicting jumps, and using element.scrollTo() ensures that the target element scrolls directly without relying on a container’s scroll offset. This refines user navigation for deep links.

docs/app/docs/contributing/setting-up-dev-environment/page.tsx (1)

13-75: Overall structure and readability look good!

This file provides a clear, step-by-step guide for setting up the environment, effectively using Rad UI components for consistent styling. No obvious logical issues or security concerns are introduced in these lines. The sections are well-demarcated, and the instructions match standard repository setup flows.

docs/components/navigation/Navigation.js (2)

186-189: Good addition of the new “Setting up dev environment” link.

Linking to the new documentation page under the “Contributing” section is consistent and improves discoverability for new contributors.


200-200: Ensure the extra bottom padding meets design expectations.

A pb-[200px] class adds a large empty space at the bottom of the navigation. Verify that this is intentional and does not negatively impact the layout.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/components/Main/NavBar.js (2)

70-70: Unify repetitive button code for improved maintainability.

Define a small helper or common component to reduce repeated logic for Discord/GitHub buttons, differing only in icon and link. Reusability will make future styling or functional changes easier.


74-74: Ensure dark mode toggling remains intuitive with the new outline style.

The toggle button’s outline variant may reduce visual emphasis. Confirm that the button remains aesthetically clear and distinguishable for all users, especially regarding its state (on/off).

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 20e4967 and a3625d8.

⛔ Files ignored due to path filters (1)
  • docs/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • docs/components/Main/NavBar.js (1 hunks)
  • docs/package.json (1 hunks)
🔇 Additional comments (2)
docs/components/Main/NavBar.js (1)

67-67: Consider verifying button contrast on different backgrounds.

Switching the variant to "outline" appears to provide a clearer contrast. However, ensure that the resulting color scheme remains accessible in both light and dark modes, particularly if the background color is also changing.

docs/package.json (1)

Line range hint 14-24: Review React and Next.js version configurations

There appear to be some inconsistencies in the dependency versions:

  1. React is pinned to 19.0.0, but the latest stable version is 18.2.0
  2. Next.js is listed as 15.1.2, but the latest stable version is 14.x.x

These version numbers seem incorrect and could lead to compatibility issues.

Comment thread docs/package.json
},
"dependencies": {
"@radui/ui": "^0.0.26",
"@radui/ui": "^0.0.27",
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

Version bump appears safe but React version mismatch needs attention

The version bump from 0.0.26 to 0.0.27 appears to be a minor update, and looking at the dependencies, there are no major changes in the core dependencies of @radui/ui. However, there's an important issue to note:

  • Your project has React pinned to version 19.0.2 in dependencies, but @radui/ui requires and bundles React ^18.2.0
  • This version mismatch could lead to compatibility issues and React duplicate instance problems
  • Consider updating your React version to match the one required by @radui/ui (^18.2.0) or consult with the library maintainers about React 19 compatibility
🔗 Analysis chain

Verify the impact of @radui/ui version bump

Since this library is in the 0.x.x range (pre-1.0), even patch updates could potentially contain breaking changes. Let's verify the changelog and any breaking changes.


Let me try a different approach to verify the version bump impact.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for breaking changes between versions 0.0.26 and 0.0.27

# Check the changelog or commit history for breaking changes
gh api repos/rad-ui/ui/releases/tags/v0.0.27 --jq '.body' || echo "Release notes not found"

# Look for potential breaking changes in commit messages
git log --grep="BREAKING" --grep="breaking" --grep="!" --since="2024-01-01" --pretty=format:"%h %s"

Length of output: 272


Script:

#!/bin/bash
# Check if there are any other files that depend on @radui/ui
rg "@radui/ui" --type-add 'tsx:*.tsx' --type-add 'ts:*.ts' --type tsx --type ts --type js --type jsx -l

# Look for any migration guides or documentation
fd -e md -e mdx | xargs rg -l "@radui/ui|rad-ui"

# Check package-lock.json for detailed dependency information
fd "package-lock.json" --exec cat {} \; | grep -A 5 -B 5 "@radui/ui"

Length of output: 3622

@kotAPI kotAPI merged commit aa70714 into main Jan 4, 2025
@kotAPI kotAPI deleted the pranay/better-contribution-docs branch January 4, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant