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(kcodeblock): prevent unexpected horizontal scrollbar #2592

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Justineo
Copy link
Contributor

@Justineo Justineo commented Jan 23, 2025

Summary

KM-919

@Justineo Justineo requested review from adamdehaven, jillztom and a team as code owners January 23, 2025 16:23
Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for kongponents-sandbox ready!

Name Link
🔨 Latest commit 3e39e1e
🔍 Latest deploy log https://app.netlify.com/sites/kongponents-sandbox/deploys/67926cf88298370008583800
😎 Deploy Preview https://deploy-preview-2592--kongponents-sandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for kongponents ready!

Name Link
🔨 Latest commit 3e39e1e
🔍 Latest deploy log https://app.netlify.com/sites/kongponents/deploys/67926cf8508a4900087152ae
😎 Deploy Preview https://deploy-preview-2592--kongponents.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kongponents-bot
Copy link
Collaborator

Preview package from this PR in consuming application

In consuming application project install preview version of kongponents generated by this PR:

@kong/kongponents@pr-2592

@portikM
Copy link
Member

portikM commented Jan 23, 2025

Two issues I found related to this fix:

  1. Sometimes when the scroll bar is at the very bottom it looks as if code block isn't rounded at the bottom - maybe that is okay but if we could control which element is scrolled horizontally maybe we could fix it?
  2. When code block is scrollable vertically, the scroll bar ends up at the very bottom which I think isn't ideal

Screenshot 2025-01-23 at 12 59 53 PM
Screenshot 2025-01-23 at 1 04 04 PM

@Justineo
Copy link
Contributor Author

I reviewed the old implementation, and it appears to have been this way even before the recent changes.

<KTextArea> has a similar issue, if not a more noticeable one:

image

I believe this can be mitigated by generally improving our scrollbar styles.

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.

3 participants