-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
docs: removed show more from code example #3373
base: canary
Are you sure you want to change the base?
docs: removed show more from code example #3373
Conversation
|
@ankitts is attempting to deploy a commit to the NextUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe recent changes primarily focus on simplifying the Changes
Assessment against linked issues
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration 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
Outside diff range and nitpick comments (3)
apps/docs/components/docs/components/code-demo/code-demo.tsx (3)
Line range hint
1-2
: Remove unuseduse client
directiveThe
"use client";
directive is not necessary in this context and can be removed to clean up the code.-"use client";
Line range hint
15-15
: Remove redundant ESLint directiveThe ESLint directive to disable
react/display-name
is not necessary if the components are properly named. Consider removing it if not needed.- // eslint-disable-next-line react/display-name
Line range hint
31-31
: Remove redundant ESLint directiveThe ESLint directive to disable
react/display-name
is not necessary if the components are properly named. Consider removing it if not needed.- // eslint-disable-next-line react/display-name
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- apps/docs/components/docs/components/code-demo/code-demo.tsx (4 hunks)
- apps/docs/components/sandpack/code-viewer.tsx (4 hunks)
- apps/docs/components/sandpack/sandpack.tsx (3 hunks)
Files skipped from review due to trivial changes (2)
- apps/docs/components/sandpack/code-viewer.tsx
- apps/docs/components/sandpack/sandpack.tsx
Additional comments not posted (1)
apps/docs/components/docs/components/code-demo/code-demo.tsx (1)
42-42
: Ensure all function calls toCodeDemo
match the new signatureThe
defaultExpanded
prop has been removed, ensure that all function calls toCodeDemo
have been updated accordingly.Verification successful
All function calls to
CodeDemo
match the new signatureThe
defaultExpanded
prop has been removed, and all function calls toCodeDemo
have been updated accordingly.
- No occurrences of
defaultExpanded
in the relevant files.- Confirmed usage of
CodeDemo
in the updated code.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `CodeDemo` match the new signature. # Test: Search for the function usage. Expect: No occurrences of `defaultExpanded`. rg --type typescript $'CodeDemo'Length of output: 66
Script:
#!/bin/bash # Description: Verify all function calls to `CodeDemo` match the new signature. # Test 1: Search for the function usage. Expect: Occurrences of `CodeDemo` function calls. rg 'CodeDemo' --type ts # Test 2: Search for any occurrences of the `defaultExpanded` prop. Expect: No occurrences. rg 'defaultExpanded' --type tsLength of output: 2074
@ankitts This issue is assigned to our team member. Next time please ask for an assignment before working on it. This would save both of our time and avoid duplicate work. |
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.
@ankitts Thx you for your working, I left some comments
It can be deleted .sp-code-viewer.is-expanded .cm-scroller {
overflow: auto;
padding-bottom: 50px;
} |
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
Outside diff range and nitpick comments (1)
apps/docs/styles/sandpack.css (1)
Line range hint
44-46
: Adjust the scrollbar styling to improve usability.The scrollbar width has been set to 0px, which might affect usability. Consider keeping a minimal width for better user experience.
- width: 0px + width: 5px
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- apps/docs/components/sandpack/code-viewer.tsx (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- apps/docs/components/sandpack/code-viewer.tsx
Thank you for the comments :) I have made the said changes. |
@wingkwong Could you help agree to the deployment document🫰 |
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
Files selected for processing (1)
- apps/docs/components/sandpack/code-viewer.tsx (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- apps/docs/components/sandpack/code-viewer.tsx
Closes #3242
📝 Description
This PR removes the additional step of clicking on Show More while viewing a code example in docs.
⛳️ Current behavior (updates)
Currently, to view a code example from docs fully, we need to click on the show more button.
![Screenshot 2024-06-30 145407](https://private-user-images.githubusercontent.com/82326089/344456515-b59077a3-577b-4e6b-8569-aefb19bd72c8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1Mjc2MTgsIm5iZiI6MTcyMDUyNzMxOCwicGF0aCI6Ii84MjMyNjA4OS8zNDQ0NTY1MTUtYjU5MDc3YTMtNTc3Yi00ZTZiLTg1NjktYWVmYjE5YmQ3MmM4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA5VDEyMTUxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM0NjhkZWU2NDZmMDk2N2UwYmYyOTc4NWI4MGU1MmIwNTFjNDUwNDY4NmExMGYxZTVlOTQ1MTY4MDAyY2M3NTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.wjMLUgE-a-ZPiy4uMIEgtThT0rXuHVimICy5-wfmubU)
🚀 New behavior
The code can be seen fully after switching to preview tab without the need to click one additional button.
![Screenshot 2024-06-30 145331](https://private-user-images.githubusercontent.com/82326089/344456530-f7d462b6-64de-4ca7-ac41-3e620a93c2f0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1Mjc2MTgsIm5iZiI6MTcyMDUyNzMxOCwicGF0aCI6Ii84MjMyNjA4OS8zNDQ0NTY1MzAtZjdkNDYyYjYtNjRkZS00Y2E3LWFjNDEtM2U2MjBhOTNjMmYwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA5VDEyMTUxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZhNGY3NWY0YTA4MDIyY2IzNTM5NDJhMTczMDkwOTk2ZmY0MzExMGUxMWI1MDJkYWM1ZmQxNzE0MjM4OGNhNTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Utc8zYndXDKw_OpPcnPQuXH_1f59mTZULbW8Oh17DcI)
💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
Summary by CodeRabbit
New Features
CodeDemo
andSandpack
components by removing thedefaultExpanded
prop.SandpackCodeViewer
component by removing unnecessary state management and simplifying logic.Style
sandpack.css
to remove outdated styles and adjust scrollbar visibility.Refactor
SandpackCodeViewer
component.