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

docs(apps): create new CodeBlock #3321

Merged
merged 10 commits into from
Mar 6, 2025
Merged

docs(apps): create new CodeBlock #3321

merged 10 commits into from
Mar 6, 2025

Conversation

Barsnes
Copy link
Member

@Barsnes Barsnes commented Mar 6, 2025

resolves #3028

With the new CodeBlock, we write actual markdown in our mdx files, instead of having to import the component and make sure we send children as a string with {...}.

It also works in a pure TSX file, since then you can import the component and use is as normal.

Copy link

changeset-bot bot commented Mar 6, 2025

⚠️ No Changeset found

Latest commit: a18ddd9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Mar 6, 2025

Preview deployments for this pull request:

Storybook - 6. Mar 2025 - 13:55

Storefront - 6. Mar 2025 - 13:56

Theme - 6. Mar 2025 - 13:56

Copy link
Contributor

github-actions bot commented Mar 6, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 48.55% 3250 / 6694
🔵 Statements 48.55% 3250 / 6694
🔵 Functions 82.69% 215 / 260
🔵 Branches 77.6% 558 / 719
File CoverageNo changed files found.
Generated in workflow #2400 for commit a18ddd9 by the Vitest Coverage Report Action

@Barsnes Barsnes marked this pull request as ready for review March 6, 2025 07:47
"clsx": "^2.1.1",
"next": "^15.1.5",
"prettier": "^3.3.3",
Copy link
Collaborator

Choose a reason for hiding this comment

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

❤️

Copy link
Collaborator

@mimarz mimarz left a comment

Choose a reason for hiding this comment

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

Is there any way to get syntax highlighting back for the snippet in theme-builder? Is there any way to add a language for this?

new:
image

old (also the same way its colored in my terminal):
image

@Barsnes
Copy link
Member Author

Barsnes commented Mar 6, 2025

Is there any way to get syntax highlighting back for the snippet in theme-builder? Is there any way to add a language for this?

new: image

old (also the same way its colored in my terminal): image

The new highlighting is how it looks in my terminal 😅
As I wrote in the discussion above, we can add more languages to this later.
I can have a look at this now, but that will delay the imlementation of this by quite a bit

@Barsnes Barsnes merged commit 9970653 into next Mar 6, 2025
13 checks passed
@Barsnes Barsnes deleted the storefront/new-code-block branch March 6, 2025 12:58
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.

Update internal CodeSnippet component
2 participants