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

feat: StackBlitz code block expansion #1240

Merged
merged 6 commits into from
Jan 17, 2023
Merged

Conversation

patak-dev
Copy link
Member

Description

StackBlitz added the code in the meta description when sharing a URL with L1-L3 (highlight code in a playground)

https://stackblitz.com/edit/node?file=index.js%3AL1-L3

This would allow us to render the code using shiki instead of using a social image and have a snippet where you can click to see it working in a playground.

The design is still in progress, sending the PR to test and start playing

image

image


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Translations update
  • Other

@stackblitz
Copy link

stackblitz bot commented Jan 16, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Jan 16, 2023

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit e9812c9
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/63c66d7da39969000e9e9999

@netlify
Copy link

netlify bot commented Jan 16, 2023

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit e9812c9
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/63c66d7d6a418c0009a87916
😎 Deploy Preview https://deploy-preview-1240--elk-zone.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 settings.

Copy link
Member

@antfu antfu left a comment

Choose a reason for hiding this comment

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

LGTM. /cc @danielroe do you think we should add <Lazy to those components so they won't be included in the initial payload?

@edimitchel
Copy link
Collaborator

I would suggest to lower a bit the open text, it looks a bit too high

@patak-dev
Copy link
Member Author

@edimitchel I changed the order so it looks more like a card and integrated both with the rounded borders
image

@antfu I think as we keep adding more of these card types, we should lazy load them. There may be a lot of users that won't need these components because their communities don't use GitHub, StackBlitz, or other domains that will add later. We could do that in another PR. I wonder if we should have a general On/Off switch for all the custom cards or individual ones. Leaning towards having only one to avoid too many options.

@danielroe
Copy link
Member

do you think we should add <Lazy to those components so they won't be included in the initial payload?

Yes, we should. And probably also with the GitHub card too. 👍

patak-dev and others added 4 commits January 17, 2023 10:38
Co-authored-by: Daniel Roe <daniel@roe.dev>
Co-authored-by: Daniel Roe <daniel@roe.dev>
@patak-dev
Copy link
Member Author

Ok, I'm happy with this style for now, I think we can iterate and improve it in further PRs.

image

@edimitchel
Copy link
Collaborator

Yes iterate probably on limiting lines of code and let expand when needed.

@patak-dev patak-dev merged commit 8adb9f4 into main Jan 17, 2023
@patak-dev patak-dev deleted the feat/stacblitz-code-block-cards branch January 17, 2023 09: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.

4 participants