Skip to content
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

fix(docs): added missing package manager tab #3631

Merged

Conversation

awesome-pro
Copy link
Contributor

@awesome-pro awesome-pro commented Aug 10, 2024

Closes #3605

📝 Description

Add missing different package manager tabs

⛳️ Current behavior (updates)

Screenshot 2024-08-04 at 7 16 46 PM Screenshot 2024-08-04 at 7 29 26 PM

🚀 New behavior

Screenshot 2024-08-04 at 7 14 32 PM Screenshot 2024-08-04 at 7 17 19 PM

💣 Is this a breaking change (Yes/No): NO

📝 Additional Information

Summary by CodeRabbit

  • New Features

    • Introduced a structured <PackageManagers> component in documentation for easier command access across various package managers.
    • Added a new TestTemplate component to enhance the dropdown functionality, allowing for improved state management and selection options.
  • Documentation

    • Updated installation and CLI usage instructions to improve clarity and organization, streamlining user experience.

jrgarciadev and others added 30 commits April 28, 2024 11:55
* fix(range-calendar): hide only dates outside the month nextui-org#2890

* fix(range-calendar): corrected spelling mistake in changeset description

* fix(range-calendar): corrected capitalization in changeset description

* chore(changeset): patch @nextui-org/theme

---------

Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix: add missing TableRowProps export

* feat(changeset): add changeset for PR2866

* chore(changeset): revise changeset message

---------

Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
…2781)

* fix(input): correct label margin for RTL required inputs

* fix(theme): add changeset fr theme
* refactor(core): cn utility adjusted and moved to the theme package

* chore(root): changeset

* fix(storybook): stories that used cn
…rg#2924)

* feat(switch): add @nextui-org/use-safe-layout-effect

* chore(deps): add @nextui-org/use-safe-layout-effect

* fix(switch): react-hook-form uncontrolled switch component

* fix(switch): react-hook-form uncontrolled switch component

* feat(switch): add rect-hook-form in dev dep

* feat(switch): add WithReactHookFormTemplate
* feat(docs): add example how to set locale (nextui-org#2867)

* docs(guide): add an explanation for the installation guide (nextui-org#2769)

* docs(guide): add an explanation for the installation guide

* docs(guide): add an explanation for the cli guide

* docs(guide): add support for cli output

* fix: change sort priority - cmdk (nextui-org#2873)

* docs: remove unsupported props in range calendar and date range picker (nextui-org#2881)

* chore(calendar): remove showMonthAndYearPickers from range calendar story

* docs(date-range-picker): remove showMonthAndYearPickers info

* docs(range-calendar): remove unsupported props

* docs: refactor typing in form.ts (nextui-org#2882)

* chore(docs): supplement errorMessage behaviour in input (nextui-org#2892)

* refactor(docs): revise NextUI Provider structure

* chore(docs): add updated tag

---------

Co-authored-by: Nozomi-Hijikata <116155762+Nozomi-Hijikata@users.noreply.github.com>
Co-authored-by: HaRuki <soccer_haruki15@me.com>
Co-authored-by: Kaben <carnoxen@gmail.com>
…les (nextui-org#2883)

* chore(slider): include marks in hideThumb

* fix(slider): revise slider styles

* feat(changeset): add changeset

* feat(slider): add tests with marks and hideThumb
* feat(input): add Input with React Hook Form tests

* refactor(input): add missing types

* feat(checkbox): add checkbox with React Hook Form tests

* feat(select): add react-hook-form to dev dep

* feat(select): add react hook form story

* feat(select): react hook form tests

* fix(select): incorrect button reference

* feat(deps): add react-hook-form to dev dep in autocomplete

* feat(autocomplete): react hook form story

* feat(autocomplete): react hook form tests

* fix(autocomplete): rollback wrapper type

* feat(switch): add react hook form tests

* refactor(stories): reorder stories items
…#2265)

* fix: update accordion item heading tag to be customizable

* Update .changeset/heavy-hairs-join.md

Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>

* Update .changeset/heavy-hairs-join.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore(accordion): lint

* chore(changeset): add issue number

* feat(docs): add HeadingComponent prop

---------

Co-authored-by: Shawn Dong <shawn.dong@flybuys.com.au>
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
…xtui-org#2973)

* feat(tabs): add destroyInactiveTabPanel and set default to false

* feat(tabs): integrate with destroyInactiveTabPanel

* feat(theme): hidden inert tab panel

* feat(changeset): add changeset

* chore(changeset): add issue number

* feat(docs): add `destroyInactiveTabPanel` prop to tabs page

* chore(docs): set destroyInactiveTabPanel to true by default

* chore(tabs): set destroyInactiveTabPanel to true by default

* chore(tabs): revise destroyInactiveTabPanel logic

* feat(tabs): add tests for destroyInactiveTabPanel

* chore(tabs): change the default value of destroyInactiveTabPanel to true
…g#2929)

* refactor: add support for disabling the animation globally

* chore(docs): disableAnimation removed from global provider

* feat(docs): nextui provider api updated, storybook preview adjusted

* chore(theme): button is scalable when disabled, tooltip animation improved
* fix(theme): set overflow visible after skeleton loaded

* feat(changeset): add changeset
Copy link

changeset-bot bot commented Aug 10, 2024

⚠️ No Changeset found

Latest commit: 1f071d3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Aug 10, 2024

@awesome-pro is attempting to deploy a commit to the NextUI Inc Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Aug 10, 2024

Walkthrough

The changes introduce a more structured and user-friendly approach to the documentation of CLI commands and installation instructions across multiple package managers. By utilizing a unified <PackageManagers> component, the documentation now clearly presents commands for npm, yarn, pnpm, and bun, enhancing readability and usability. Additionally, a new TestTemplate component has been added to the dropdown stories, improving functionality with state management and accessibility features.

Changes

File Change Summary
apps/docs/content/docs/guide/cli.mdx and apps/docs/content/docs/guide/installation.mdx Replaced command instructions with <PackageManagers> component for CLI and installation, enhancing clarity and usability.
packages/components/dropdown/stories/dropdown.stories.tsx Introduced TestTemplate component for dropdown stories, enhancing state management and user interaction with improved accessibility features.

Assessment against linked issues

Objective Addressed Explanation
Add commands for additional package runners (3605)
Improve clarity and usability of CLI commands (3605)

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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
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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1973864 and a4e5024.

Files selected for processing (3)
  • apps/docs/content/docs/guide/cli.mdx (2 hunks)
  • apps/docs/content/docs/guide/installation.mdx (1 hunks)
  • packages/components/dropdown/stories/dropdown.stories.tsx (1 hunks)
Additional comments not posted (5)
apps/docs/content/docs/guide/installation.mdx (1)

45-52: Great improvement with <PackageManagers> component!

The introduction of the <PackageManagers> component enhances the documentation by providing a clear and organized way to display commands for different package managers. This change improves readability and user experience.

apps/docs/content/docs/guide/cli.mdx (3)

35-42: Well-structured command presentation with <PackageManagers>.

The use of the <PackageManagers> component for presenting CLI commands without global installation is a clear enhancement. It provides a consistent and user-friendly format for users to follow.


121-128: Improved documentation with <PackageManagers> for dependency installation.

The <PackageManagers> component effectively organizes the commands for installing dependencies, making the documentation more accessible and easier to navigate.


131-138: Enhanced server start instructions with <PackageManagers>.

The addition of the <PackageManagers> component for starting the local server commands is a positive change, improving the clarity and usability of the documentation.

packages/components/dropdown/stories/dropdown.stories.tsx (1)

743-774: Well-implemented TestTemplate component!

The TestTemplate component is a valuable addition, demonstrating effective use of React hooks for managing state in dropdown selections. This enhances the dropdown stories with a practical example of single selection.

Copy link
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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a4e5024 and 5e7bc89.

Files selected for processing (1)
  • apps/docs/content/docs/guide/installation.mdx (1 hunks)
Additional comments not posted (2)
apps/docs/content/docs/guide/installation.mdx (2)

42-49: LGTM: Improved documentation clarity with <PackageManagers>.

The use of the <PackageManagers> component effectively consolidates installation commands for various package managers, enhancing clarity and usability.


52-59: LGTM: Enhanced usability with <PackageManagers>.

The use of the <PackageManagers> component for starting the local server provides a clear and organized presentation of commands for different package managers.

@@ -30,11 +30,16 @@ To install the `CLI` globally, execute one of the following commands in your ter

### Without Installation

Alternatively, you can use the `CLI` without a global installation by employing `npx`:
Alternatively, you can use the `CLI` without a global installation by running the following commands:
Copy link
Member

Choose a reason for hiding this comment

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

commands -> command

Copy link
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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5e7bc89 and 1f071d3.

Files selected for processing (1)
  • apps/docs/content/docs/guide/cli.mdx (2 hunks)
Additional comments not posted (3)
apps/docs/content/docs/guide/cli.mdx (3)

35-42: Verify the correctness of package manager commands.

Ensure that the commands are accurate for each package manager:

  • npm: npx nextui-cli@latest
  • yarn: yarn dlx nextui-cli@latest
  • pnpm: pnpm dlx nextui-cli@latest
  • bun: bunx nextui-cli@latest

These commands should align with the intended usage for each package manager.

Verification successful

Package manager commands are correct.

The commands for npm, yarn, pnpm, and bun in the <PackageManagers> component are accurate and align with the intended usage for each package manager. No issues found.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correctness of package manager commands for CLI usage without installation.

# Test: Check if the commands align with the intended usage for each package manager.
rg --type mdx -A 5 $'<PackageManagers\n  commands={{\n    npm: "npx nextui-cli@latest",\n    yarn: "yarn dlx nextui-cli@latest",\n    pnpm: "pnpm dlx nextui-cli@latest",\n    bun: "bunx nextui-cli@latest",\n  }}\n/>'

Length of output: 671


Script:

#!/bin/bash
# Description: Verify the correctness of package manager commands for CLI usage without installation.

# Test: Check if the commands align with the intended usage for each package manager using a simpler pattern.
rg --type mdx '<PackageManagers' -A 5

Length of output: 67


Script:

#!/bin/bash
# Description: Verify the correctness of package manager commands for CLI usage without installation.

# Test: Check if the commands align with the intended usage for each package manager without specifying file type.
rg '<PackageManagers' -A 5

Length of output: 45462


131-138: Verify the correctness of package manager commands for starting the local server.

Ensure that the commands are accurate for each package manager:

  • npm: npm run dev
  • yarn: yarn run dev
  • pnpm: pnpm run dev
  • bun: bun run dev

These commands should align with the intended usage for each package manager.

Verification successful

Package manager commands are correct for starting the local server.

The commands specified for each package manager in the <PackageManagers> component are accurate and align with standard usage:

  • npm: npm run dev
  • yarn: yarn run dev
  • pnpm: pnpm run dev
  • bun: bun run dev

These commands are appropriately formatted for their respective package managers.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correctness of package manager commands for starting the local server.

# Test: Check if the commands align with the intended usage for each package manager.
rg --type mdx -A 5 $'<PackageManagers\n  commands={{\n    npm: "npm run dev",\n    yarn: "yarn run dev",\n    pnpm: "pnpm run dev",\n    bun: "bun run dev",\n  }}\n/>'

Length of output: 573


Script:

#!/bin/bash
# Description: Re-attempt to verify the correctness of package manager commands for starting the local server.

# Use a simpler pattern to search for the <PackageManagers> component and inspect the context for commands.
rg --type mdx '<PackageManagers' -A 10

Length of output: 68


Script:

#!/bin/bash
# Description: Search for the <PackageManagers> component without specifying the file type.

# Search for the <PackageManagers> component and inspect the surrounding lines for commands.
rg '<PackageManagers' -A 10

Length of output: 75629


121-128: Verify the correctness of package manager commands for dependency installation.

Ensure that the commands are accurate for each package manager:

  • npm: cd my-nextui-app && npm install
  • yarn: cd my-nextui-app && yarn install
  • pnpm: cd my-nextui-app && pnpm install
  • bun: cd my-nextui-app && bun install

These commands should align with the intended usage for each package manager.

Verification successful

Package Manager Commands Verified

The commands for npm, yarn, pnpm, and bun in the <PackageManagers> component are correctly formatted and consistent with standard practices for installing dependencies. No issues were found.

  • Located in apps/docs/content/docs/guide/cli.mdx and apps/docs/content/docs/guide/installation.mdx.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correctness of package manager commands for installing project dependencies.

# Test: Check if the commands align with the intended usage for each package manager.
rg --type mdx -A 5 $'<PackageManagers\n  commands={{\n    npm: "cd my-nextui-app && npm install",\n    yarn: "cd my-nextui-app && yarn install",\n    pnpm: "cd my-nextui-app && pnpm install",\n    bun: "cd my-nextui-app && bun install",\n  }}\n/>'

Length of output: 733


Script:

#!/bin/bash
# Description: Verify the correctness of package manager commands for installing project dependencies.

# Test: Correct the regex pattern by escaping special characters and check the commands.
rg --type mdx -A 5 $'<PackageManagers\n  commands={{\n    npm: "cd my-nextui-app && npm install",\n    yarn: "cd my-nextui-app && yarn install",\n    pnpm: "cd my-nextui-app && pnpm install",\n    bun: "cd my-nextui-app && bun install",\n  }}\n/>'

Length of output: 733


Script:

#!/bin/bash
# Description: Verify the correctness of package manager commands for installing project dependencies.

# Test: Correct the regex pattern by escaping special characters and check the commands.
rg --type mdx -A 5 $'<PackageManagers\n  commands=\\{\\{\n    npm: "cd my-nextui-app && npm install",\n    yarn: "cd my-nextui-app && yarn install",\n    pnpm: "cd my-nextui-app && pnpm install",\n    bun: "cd my-nextui-app && bun install",\n  \\}\\}\n/>'

Length of output: 437


Script:

#!/bin/bash
# Description: Verify the correctness of package manager commands for installing project dependencies.

# Test: Enable multiline mode and correct the regex pattern to check the commands.
rg --type mdx -U -A 5 $'<PackageManagers\n  commands=\\{\\{\n    npm: "cd my-nextui-app && npm install",\n    yarn: "cd my-nextui-app && yarn install",\n    pnpm: "cd my-nextui-app && pnpm install",\n    bun: "cd my-nextui-app && bun install",\n  \\}\\}\n/>'

Length of output: 276


Script:

#!/bin/bash
# Description: Verify the correctness of package manager commands for installing project dependencies.

# Test: Search all files without specifying a file type to check the commands.
rg -U -A 5 $'<PackageManagers\n  commands=\\{\\{\n    npm: "cd my-nextui-app && npm install",\n    yarn: "cd my-nextui-app && yarn install",\n    pnpm: "cd my-nextui-app && pnpm install",\n    bun: "cd my-nextui-app && bun install",\n  \\}\\}\n/>'

Length of output: 1917

@wingkwong wingkwong added the 📋 Scope : Docs Related to the documentation label Aug 11, 2024
@wingkwong wingkwong added this to the v2.5.0 milestone Aug 11, 2024
@jrgarciadev jrgarciadev changed the base branch from canary to main August 12, 2024 21:17
@jrgarciadev jrgarciadev merged commit bd2b9a1 into nextui-org:main Aug 12, 2024
5 of 7 checks passed
jrgarciadev added a commit that referenced this pull request Aug 12, 2024
jrgarciadev added a commit that referenced this pull request Aug 12, 2024
@jrgarciadev
Copy link
Member

@awesome-pro please send this PR again, branch out from main so we can deploy this to the docs without waiting for next version

@awesome-pro
Copy link
Contributor Author

@jrgarciadev I feel, you already have made a PR, do i still need to make the PR again ?

@wingkwong
Copy link
Member

@awesome-pro yes. Junior reverted the changes since it included some unexpected changes after changing the branch. Please branch out from main for doc changes and make a PR again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📋 Scope : Docs Related to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: add more package runners