-
Notifications
You must be signed in to change notification settings - Fork 3
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(code-viewer): get rid of trailing lines #188
Conversation
I yalced this into platform-internal and it's still doing a weird jump And also not highlighting all of the lines For comparison, here's how the indentation looks in production @P0lip @wmhilton how about we switch to an open source code highlighter like https://github.com/react-syntax-highlighter/react-syntax-highlighter |
@lottamus
bahhhh, let me see why is this happening. 🙄 |
I think we might be over adjusting in this case. I'm pasting in the platform-internal root package.json which only goes up to 3 digits. Maybe start the adjustment if we're at 5+ digits. Or even larger, I'd rather our default styling handles a majority of the use-cases so most users never see the jumping (unless they're looking at something juuuuuge) |
Speaking of code highlighting issue - I know why it's happening.
Yeah, that makes sense. Will do. |
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.
It actually works quite well this time. At least in my testing in Storybook. I'll try it yalced into Studio next.
@lottamus Well, |
if (maxLines === null) { | ||
return null; | ||
} | ||
|
||
const blocks: string[] = ['']; | ||
const blocks: SlicedBlock[] = [createSlicedBlock()]; | ||
|
||
for (let i = 0, n = 0; i < value.length; i++) { |
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.
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.
When yalced into Studio it broke the Try It component.
@wmhilton do yo uhave the latest elements installed? |
Ahhh. So I gotta upgrade both at once huh? :eyeroll: OOOOOk lemme try that. |
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.
Works perfectly.
🎉 This PR is included in version 3.0.0-beta.32 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@lottamus Here's you answer: At the time I post this, my Chrome tab still hasn't recovered. My fans are spinning like crazy. Google Chrome Helper (Renderer) is using 100% CPU. |
Fixes https://github.com/stoplightio/platform-internal/pull/3901#issuecomment-671279905
I realllly hope this is the last PR 😆