Skip to content

fix: align single code block with the buttons#2154

Merged
perkinsjr merged 4 commits intounkeyed:mainfrom
DeepaPrasanna:fix/unbalanced-code-line
Oct 4, 2024
Merged

fix: align single code block with the buttons#2154
perkinsjr merged 4 commits intounkeyed:mainfrom
DeepaPrasanna:fix/unbalanced-code-line

Conversation

@DeepaPrasanna
Copy link
Contributor

@DeepaPrasanna DeepaPrasanna commented Oct 2, 2024

What does this PR do?

Updated styles to align the single line code block with the buttons.

Fixes #2148

Before:
image

After:
image

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • Visit the blog the single line code block should be vertically center aligned with the buttons.

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary

Summary by CodeRabbit

  • New Features

    • Improved layout and organization of the code block component in the blog.
    • Enhanced visual alignment of code display and action buttons.
    • Introduced conditional rendering for code blocks based on content length.
    • Added a key prop to enhance rendering efficiency in the suggested blogs component.
  • Bug Fixes

    • Streamlined structure for the download button and copy functionality.
  • Documentation

    • Added a new README file for the "@unkey/api" package to enhance user understanding and usability.
  • Refactor

    • Restructured JSX layout for better maintainability and clarity.
    • Updated API definitions for improved clarity and consistency in error handling.

@changeset-bot
Copy link

changeset-bot bot commented Oct 2, 2024

⚠️ No Changeset found

Latest commit: 44c1df8

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

@vercel
Copy link

vercel bot commented Oct 2, 2024

@DeepaPrasanna is attempting to deploy a commit to the Unkey Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 2, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes in this pull request primarily focus on the BlogCodeBlock and BlogCodeBlockSingle components within the blog-code-block.tsx file. Modifications include restructuring JSX elements for improved layout, simplifying the mapping of properties, and adjusting the integration of the SyntaxHighlighter. The SuggestedBlogs component has been updated to include unique keys for blog posts.

Changes

File Path Change Summary
apps/www/components/blog/blog-code-block.tsx Restructured JSX layout of BlogCodeBlock and BlogCodeBlockSingle, simplified child property mapping, adjusted button placements, and integrated SyntaxHighlighter.
apps/www/components/blog/suggested-blogs.tsx Added unique key prop to the outer <div> in SuggestedBlogs for each blog post.

Assessment against linked issues

Objective Addressed Explanation
Improve alignment of single line code blocks (#2148)

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 8fd5cca and 44c1df8.

📒 Files selected for processing (2)
  • apps/www/components/blog/blog-code-block.tsx (1 hunks)
  • apps/www/components/blog/suggested-blogs.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/www/components/blog/blog-code-block.tsx
  • apps/www/components/blog/suggested-blogs.tsx

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added 🕹️ 150 points Feature New feature or request labels Oct 2, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2024

Thank you for following the naming conventions for pull request titles! 🙏

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
apps/www/components/blog/blog-code-block.tsx (2)

103-110: SyntaxHighlighter placement and configuration

The SyntaxHighlighter component is now properly placed within the flex container, which should improve its alignment with the buttons. The trim() function applied to block.children (line 109) is a good addition to remove any unnecessary whitespace.

Consider adding a small right margin or padding to the SyntaxHighlighter to ensure there's always some space between the code and the buttons, especially for longer code snippets:

 <SyntaxHighlighter
   language={block.className.replace(/language-/, "")}
   style={darkTheme}
   showLineNumbers={true}
   highlighter={"hljs"}
+  className="mr-2"
 >
   {block.children.trim()}
 </SyntaxHighlighter>

111-121: Button container and accessibility improvement

The buttons are now grouped in a flex container, which improves their alignment and spacing. The addition of the aria-label to the download button (line 115) is a great accessibility improvement.

Consider adding a more descriptive aria-label for the copy button as well. You can do this by passing it as a prop to the CopyButton component:

- <CopyButton value={copyData} />
+ <CopyButton value={copyData} aria-label="Copy code" />

Also, for consistency, you might want to add the same align-top class to the CopyButton that you have on the download button:

- <CopyButton value={copyData} />
+ <CopyButton value={copyData} className="align-top" />
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between b7f9828 and b07c004.

📒 Files selected for processing (1)
  • apps/www/components/blog/blog-code-block.tsx (1 hunks)
🔇 Additional comments (2)
apps/www/components/blog/blog-code-block.tsx (2)

101-102: Improved layout structure for better alignment

The new structure using flex containers and padding improves the alignment of the code block with the buttons. This change directly addresses the issue mentioned in #2148.


101-121: Summary: Successful alignment of single line code blocks with buttons

The changes made to the BlogCodeBlockSingle component successfully address the issue described in #2148. The new structure using flex containers improves the alignment of single line code blocks with the associated buttons, enhancing the overall visual appearance and user experience.

Key improvements:

  1. Better layout structure using flex containers
  2. Proper alignment of the SyntaxHighlighter with buttons
  3. Improved button grouping and spacing
  4. Added accessibility attribute (aria-label) to the download button

These changes meet the PR objectives and provide a more balanced and visually appealing presentation of single line code blocks on the blog page.

To ensure that these changes don't negatively impact other parts of the codebase, please run the following verification script:

This script will help identify any potential conflicts or areas that might need adjustment due to these changes.

✅ Verification successful

Adjusting Verification Scripts for Proper File Type Recognition

The initial verification scripts encountered errors due to unrecognized file types. To resolve this, we'll modify the scripts to use file extensions directly.

[/run_scripts]


Verified: No conflicts detected with other usages or CSS classes

The verification confirms that BlogCodeBlockSingle is only utilized within apps/www/components/mdx-content.tsx and apps/www/components/blog/blog-code-block.tsx. Additionally, no conflicting CSS classes related to flex, items-center, or justify-center were found. These results indicate that the recent changes do not adversely affect other parts of the codebase and meet the PR objectives without introducing new issues.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any other usage of BlogCodeBlockSingle that might be affected by these changes

# Test: Search for other usages of BlogCodeBlockSingle
rg --type typescript --type tsx "BlogCodeBlockSingle"

# Test: Check for any CSS classes that might conflict with the new layout
rg --type css --type scss "flex.*items-center.*justify-center"

Length of output: 182


Script:

#!/bin/bash
# Description: Check for any other usage of BlogCodeBlockSingle that might be affected by these changes

# Test: Search for other usages of BlogCodeBlockSingle in .ts and .tsx files
rg -g "*.ts" -g "*.tsx" "BlogCodeBlockSingle"

# Test: Check for any CSS classes that might conflict with the new layout in .css and .scss files
rg -g "*.css" -g "*.scss" "flex.*items-center.*justify-center"

Length of output: 451

@perkinsjr perkinsjr self-assigned this Oct 2, 2024
@vercel
Copy link

vercel bot commented Oct 2, 2024

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

Name Status Preview Comments Updated (UTC)
www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 8:27pm

@vercel vercel bot temporarily deployed to Preview – www October 2, 2024 18:36 Inactive
Copy link
Member

@perkinsjr perkinsjr left a comment

Choose a reason for hiding this comment

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

This change made all codeblock buttons misaligned

image

@DeepaPrasanna
Copy link
Contributor Author

DeepaPrasanna commented Oct 3, 2024

I fixed that for above single line code block. (not for the multi line code block, stated reasons below)
Before:
image

After applying the styles:
image

After applying the styles in corrected way:
image

But, there is one thing that I noticed. It seems all the code blocks are using BlogCodeBlockSingle. I thought only single line code block is using that. That is why the styles have been updated to multi line code block too.
image
It seems the code block in the markdown is being converted to pre tags and thus using only the BlogCodeBlockSingle.

Edit: I thought of a solution: if the code has a newline character, then use BlogCodeBlock or else BlogCodeBlockSingle

Edit Part 2: It seems BlogCodeBlock had some errors. I fixed those and now this is how it looks for multi line code block.

Before (using the BlogCodeBlockSingle):

image

After(using the BlogCodeBlock):

image

Also, this handled what earlier was misaligned buttons

Before( using the BlogCodeBlockSingle and incorrected styles that I added):
image

After:
image

On another note, I also fixed the key warning which was there in the blogs.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (3)
apps/www/components/blog/suggested-blogs.tsx (3)

22-22: Approved: Good addition of the key prop, but consider removing the redundant key.

The addition of the key prop to the outer <div> is a good practice and will help React's reconciliation process when rendering the list of blog posts. Using post.slug as the key is appropriate as it should be unique for each post.

However, there's a redundant key prop on the inner <Link> component. Since the outer <div> now has a key, the inner one is unnecessary.

Consider applying this small optimization:

 <div key={post.slug} className={cn("flex flex-col w-full mt-8 prose", className)}>
-  <Link href={post.url} key={post.url}>
+  <Link href={post.url}>

This change will remove the redundant key and slightly improve the component's efficiency.


Line range hint 1-43: Consider enhancing component robustness and flexibility

While the overall implementation looks good, here are some suggestions to improve the component:

  1. Handle potential undefined values more safely:
    Instead of using non-null assertion on post?.date!, consider providing a fallback value or handling the case where date might be undefined.

  2. Make the default image path configurable:
    Consider moving the hardcoded default image path to a constant or configuration file for easier management across different environments.

  3. Add error boundary and loading state:
    Consider implementing error handling and a loading state to improve user experience in case of data fetching issues.

Here's an example of how you might implement these suggestions:

import { DEFAULT_BLOG_IMAGE } from '@/config/constants';

// ... (rest of the imports)

export function SuggestedBlogs({ className, currentPostSlug }: BlogListProps): JSX.Element {
  const [isLoading, setIsLoading] = React.useState(true);
  const [error, setError] = React.useState<Error | null>(null);

  const posts = React.useMemo(() => {
    try {
      setIsLoading(true);
      const filteredPosts = allPosts.filter((post: Post) => post.url !== currentPostSlug).slice(0, 3);
      setIsLoading(false);
      return filteredPosts;
    } catch (err) {
      setError(err instanceof Error ? err : new Error('An error occurred while fetching posts'));
      setIsLoading(false);
      return [];
    }
  }, [currentPostSlug]);

  if (isLoading) return <div>Loading...</div>;
  if (error) return <div>Error: {error.message}</div>;
  if (posts.length === 0) return null;

  return (
    <div>
      {posts.map((post) => (
        <div key={post.slug} className={cn("flex flex-col w-full mt-8 prose", className)}>
          <Link href={post.url}>
            <div className="flex w-full">
              <div className="flex flex-col gap-2">
                <Frame size="sm">
                  <ImageWithBlur
                    alt="Blog Image"
                    src={post.image ?? DEFAULT_BLOG_IMAGE}
                    width={600}
                    height={400}
                  />
                </Frame>
                <p className="text-white">{post.title || 'Untitled'}</p>
                <p className="text-sm text-white/50">
                  {post.date ? format(new Date(post.date), "MMM dd, yyyy") : 'Date not available'}
                </p>
              </div>
            </div>
          </Link>
        </div>
      ))}
    </div>
  );
}

This refactored version includes error handling, a loading state, and safer handling of potentially undefined values. It also suggests moving the default image path to a constants file for better configurability.


Line range hint 1-43: Optimize performance with memoization

To improve the component's performance, consider the following optimizations:

  1. Memoize the filtered and sliced posts array using useMemo.
  2. Memoize the formatted date for each post using useMemo.

Here's how you can implement these optimizations:

import React, { useMemo } from 'react';
import { format } from 'date-fns';

// ... (other imports)

export function SuggestedBlogs({ className, currentPostSlug }: BlogListProps): JSX.Element {
  const posts = useMemo(() => {
    return allPosts.filter((post: Post) => post.url !== currentPostSlug).slice(0, 3);
  }, [currentPostSlug]);

  if (posts.length === 0) {
    return <></>;
  }

  return (
    <div>
      {posts.map((post) => (
        <SuggestedBlogPost key={post.slug} post={post} className={className} />
      ))}
    </div>
  );
}

function SuggestedBlogPost({ post, className }: { post: Post; className?: string }) {
  const formattedDate = useMemo(() => {
    return post.date ? format(new Date(post.date), "MMM dd, yyyy") : 'Date not available';
  }, [post.date]);

  return (
    <div className={cn("flex flex-col w-full mt-8 prose", className)}>
      <Link href={post.url}>
        <div className="flex w-full">
          <div className="flex flex-col gap-2">
            <Frame size="sm">
              <ImageWithBlur
                alt="Blog Image"
                src={post.image ?? "/images/blog-images/defaultBlog.png"}
                width={600}
                height={400}
              />
            </Frame>
            <p className="text-white">{post.title}</p>
            <p className="text-sm text-white/50">{formattedDate}</p>
          </div>
        </div>
      </Link>
    </div>
  );
}

These changes will ensure that:

  1. The posts are only filtered and sliced when currentPostSlug changes.
  2. The date formatting only occurs when the post's date changes, not on every render.

By extracting the individual blog post rendering into a separate component, we can better isolate the memoization of the formatted date. This approach improves the overall performance of the SuggestedBlogs component, especially when dealing with a large number of posts or frequent re-renders.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 2fe7679 and 153fee6.

📒 Files selected for processing (3)
  • apps/www/components/blog/blog-code-block.tsx (3 hunks)
  • apps/www/components/blog/suggested-blogs.tsx (1 hunks)
  • apps/www/components/mdx-content.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/www/components/blog/blog-code-block.tsx
🔇 Additional comments (1)
apps/www/components/mdx-content.tsx (1)

83-89: Approved

The updated pre component correctly uses the isSingleLineCodeBlock function to determine whether to render a single-line or multi-line code block. This enhances the flexibility of code block rendering based on content length.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
apps/www/components/mdx-content.tsx (1)

114-121: Approved with a suggestion for type refinement.

The isSingleLineCodeBlock function is well-implemented and addresses the issues mentioned in the past review comments. It correctly accesses the code content and uses a reliable method to count lines.

Consider refining the type annotation for the content parameter to be more specific:

const isSingleLineCodeBlock = (
  content: { children: ReactElement<{ children: string }> }
) => {
  const codeBlock = content.children.props.children;
  return codeBlock.split("\n").length < 2;
};

This more precise type annotation will help prevent potential misuse of the function and improve type safety.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between d99f35b and 8fd5cca.

📒 Files selected for processing (1)
  • apps/www/components/mdx-content.tsx (3 hunks)
🔇 Additional comments (2)
apps/www/components/mdx-content.tsx (2)

Line range hint 1-121: Overall, the changes effectively address the PR objectives.

The modifications to the pre component and the introduction of the isSingleLineCodeBlock function successfully resolve the alignment issue for single-line code blocks without affecting multi-line blocks. The implementation is clean and aligns well with the PR objectives.

A few minor suggestions have been made to further improve type safety and verify the changes. These suggestions, if implemented, will enhance the robustness of the code without altering its core functionality.

Great job on addressing the issue and improving the code quality!


90-96: LGTM! Conditional rendering addresses the alignment issue.

The updated pre component now correctly differentiates between single-line and multi-line code blocks, addressing the alignment issue mentioned in the PR objectives. This implementation should resolve the problem without affecting multi-line code blocks.

To ensure this change doesn't introduce any regressions, please run the following script to check for any unexpected usage of BlogCodeBlockSingle or BlogCodeBlock:

This script will help identify any places where these components might be used directly, which could potentially bypass the new conditional logic.

✅ Verification successful

Verified: No unintended usages detected.

No direct usage of BlogCodeBlockSingle or BlogCodeBlock was found outside of mdx-content.tsx. The conditional rendering implementation effectively centralizes their usage, ensuring the alignment issue is addressed without introducing any bypasses.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of BlogCodeBlockSingle and BlogCodeBlock components

# Test: Search for direct usage of BlogCodeBlockSingle
echo "Checking for direct usage of BlogCodeBlockSingle:"
rg --type typescript --type tsx "BlogCodeBlockSingle" -g '!**/mdx-content.tsx'

# Test: Search for direct usage of BlogCodeBlock
echo "Checking for direct usage of BlogCodeBlock:"
rg --type typescript --type tsx "BlogCodeBlock" -g '!**/mdx-content.tsx'

Length of output: 427


Script:

#!/bin/bash
# Description: Verify the usage of BlogCodeBlockSingle and BlogCodeBlock components

# Test: Search for direct usage of BlogCodeBlockSingle
echo "Checking for direct usage of BlogCodeBlockSingle:"
rg --type tsx "BlogCodeBlockSingle" -g '!**/mdx-content.tsx' || rg --type ts "BlogCodeBlockSingle" -g '!**/mdx-content.tsx'

# Test: Search for direct usage of BlogCodeBlock
echo "Checking for direct usage of BlogCodeBlock:"
rg --type tsx "BlogCodeBlock" -g '!**/mdx-content.tsx' || rg --type ts "BlogCodeBlock" -g '!**/mdx-content.tsx'

Length of output: 794

@vercel vercel bot temporarily deployed to Preview – www October 3, 2024 14:48 Inactive
Copy link
Member

@perkinsjr perkinsjr left a comment

Choose a reason for hiding this comment

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

This code changes the core functionality.

In our current code we have two types of code blocks.

  1. A single code block.
  2. A code block that has multiple tabs.

The 2nd one allows a developer to add to do examples in multiple languages in a single code block with clickable tabs.

We only want to fix a single line of code when in either of these codeblocks to have correct alignment.

What you currently have done. Is now made all code blocks into tab based code blocks. Which in turn has now changed how all of the posts / changelogs and / templates work.

All that is required for this change is:

  1. Look for a single line in a code block and fix alignment.
  2. Make sure if there are more than one line of code in a codeblock that the copy and the download buttons don't shift.

No other changes are required outside of that, although fixing the key on the blog is welcomed.

Please make sure you are testing locally on all screen sizes, in the blog, changelog.

@DeepaPrasanna
Copy link
Contributor Author

I am sorry. It was misunderstanding on my part.

@DeepaPrasanna DeepaPrasanna force-pushed the fix/unbalanced-code-line branch from 8fd5cca to d6500b5 Compare October 3, 2024 17:01
@vercel vercel bot temporarily deployed to Preview – www October 3, 2024 20:27 Inactive
@perkinsjr perkinsjr merged commit 2113925 into unkeyed:main Oct 4, 2024
@oss-gg
Copy link

oss-gg bot commented Oct 4, 2024

Awarding DeepaPrasanna: 150 points 🕹️ Well done! Check out your new contribution on oss.gg/DeepaPrasanna

@DeepaPrasanna DeepaPrasanna deleted the fix/unbalanced-code-line branch October 5, 2024 07:14
mcstepp pushed a commit that referenced this pull request Oct 8, 2024
* fix: align single code block with the buttons

* fix: add justify space between code line and buttons for singleBlockCode

* fix: handle the key warning

* fix: fix alignment of single code line
@coderabbitai coderabbitai bot mentioned this pull request Jan 28, 2025
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

blog: single line code blocks look imbalanced

2 participants