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 issue with CodeBlock language list overflow #75

Merged

Conversation

markkop-halborn
Copy link
Contributor

@markkop-halborn markkop-halborn commented Oct 18, 2024

Tries to fix #74
Generated by AI (Github Workspace), still needs testing


Make the language list in the CodeBlock component scrollable to prevent it from getting out of the screen if too big.

  • CodeBlockActiveButton.tsx

    • Replace DropdownMenu with Select component.
    • Set a maximum height and make the dropdown menu scrollable.
  • select.tsx

    • Add a maximum height and make the SelectContent component scrollable.
  • NodeViewCodeBlock.tsx

    • Set a maximum height and make the language dropdown scrollable.
  • index.module.scss

    • Add styles to ensure the language list is scrollable.

Tries to fix hunghg255#74
Generated by AI, still need testing
---
Make the language list in the CodeBlock component scrollable to prevent it from getting out of the screen if too big.

* **CodeBlockActiveButton.tsx**
  - Replace `DropdownMenu` with `Select` component.
  - Set a maximum height and make the dropdown menu scrollable.

* **select.tsx**
  - Add a maximum height and make the `SelectContent` component scrollable.

* **NodeViewCodeBlock.tsx**
  - Set a maximum height and make the language dropdown scrollable.

* **index.module.scss**
  - Add styles to ensure the language list is scrollable.
Copy link

vercel bot commented Oct 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
reactjs-tiptap-editor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2024 11:58pm

@hunghg255 hunghg255 merged commit 59c0f43 into hunghg255:main Oct 20, 2024
2 checks passed
@markkop-halborn markkop-halborn deleted the fix-codeblock-language-list branch October 20, 2024 13:59
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.

[Fix] CodeBlock list scroll
2 participants