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

Add PixelifySans font to quote font options #331

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

marceloams
Copy link
Contributor

@marceloams marceloams commented Nov 3, 2024

Add PixelifySans Font Option

  • Introduces a new pixel-style font, PixelifySans, for a retro, pixelated aesthetic.

Screenshot of PixelifySans in action

Summary by CodeRabbit

  • New Features

    • Introduced a new font, 'PixelifySans', enhancing design options.
  • Bug Fixes

    • Corrected the font list format by adding a trailing comma to the 'Architect' entry for improved consistency.

Copy link

vercel bot commented Nov 3, 2024

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

Name Status Preview Comments Updated (UTC)
github-readme-quotes-returns ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 3, 2024 4:18pm

Copy link

coderabbitai bot commented Nov 3, 2024

Walkthrough

The changes introduced in this pull request involve the addition of a new font, 'PixelifySans', to the font configurations across multiple files. The fonts export in frontend/src/config/cardTemplate/index.js has been updated to include this new font, while also modifying the existing entry for 'Architect' to include a trailing comma. Additionally, the new font has been added to the fonts objects in both frontend/src/util/fonts/index.js and src/fonts/fonts.js, with corresponding properties defined.

Changes

File Path Change Summary
frontend/src/config/cardTemplate/index.js Added 'PixelifySans' to fonts; modified 'Architect' entry to include a trailing comma.
frontend/src/util/fonts/index.js Added new font 'PixelifySans' with fontFamily "pixelify-sans" and base64-encoded WOFF2 src.
src/fonts/fonts.js Added new font 'PixelifySans' with fontFamily "pixelify-sans" and base64-encoded WOFF2 src.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Frontend
    participant Fonts

    User->>Frontend: Request font list
    Frontend->>Fonts: Retrieve fonts
    Fonts-->>Frontend: Return fonts including 'PixelifySans'
    Frontend-->>User: Display font list
Loading

🐰 "In the garden where fonts do play,
'PixelifySans' joins the fray.
With 'Architect' in a stylish dance,
Together they give design a chance!
A sprinkle of joy, a dash of cheer,
New fonts are here, let’s all give a cheer!" 🌼


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.

Copy link

vercel bot commented Nov 3, 2024

@marceloams is attempting to deploy a commit to the shravan20's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@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)
frontend/src/config/cardTemplate/index.js (1)

55-56: LGTM! Consider adding a trailing comma for consistency.

The addition of 'PixelifySans' to the fonts array is clean and follows the existing naming convention. While the current implementation is correct, adding a trailing comma after 'PixelifySans' would maintain consistency with other arrays in the file (e.g., themes array) and make future additions cleaner.

 export const fonts = [
   'default',
   'Gabrielle',
   'Redressed',
   'Calligraffitti',
   'Architect',
-  'PixelifySans'
+  'PixelifySans',
 ];
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between f3f2902 and ca0a2c7.

📒 Files selected for processing (3)
  • frontend/src/config/cardTemplate/index.js (1 hunks)
  • frontend/src/util/fonts/index.js (1 hunks)
  • src/fonts/fonts.js (1 hunks)
🔇 Additional comments (4)
frontend/src/util/fonts/index.js (2)

Line range hint 1-24: LGTM!

The existing font configuration is well-structured and follows the established pattern.


25-29: LGTM! New font configuration is well-implemented.

The PixelifySans font has been properly configured with:

  • Correct font family naming
  • WOFF2 format for broad browser support
  • Appropriate unicode range
  • Consistent implementation pattern
src/fonts/fonts.js (2)

24-24: LGTM: Trailing comma addition

Adding a trailing comma is good practice as it makes future additions cleaner and results in cleaner diffs.


25-29: LGTM: PixelifySans font implementation

The implementation follows the established pattern and includes all necessary components:

  • Correct font-family name
  • Properly formatted base64-encoded WOFF2 font file
  • Appropriate unicode range definition

Let's verify the font file integrity:

✅ Verification successful

Font implementation verified successfully

The PixelifySans font implementation follows the correct structure and contains all required components:

  • Proper font family name definition
  • Valid base64-encoded WOFF2 font data
  • Correct unicode range specification
  • Consistent formatting with other font definitions
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the base64-encoded font data is valid WOFF2 format

# Test: Extract and check the first few bytes of the font data
echo "Checking WOFF2 signature..."
echo "${src}" | grep -o 'data:font/woff2;base64,[^"]*' | sed 's/data:font/woff2;base64,//' | base64 -d | head -c 4 | xxd -p
# Expected output should start with '774f4632' (WOFF2 signature)

Length of output: 383


Script:

#!/bin/bash
# Let's try a different approach to verify the font implementation
# Check if the font is properly defined and structured

# 1. Verify the font family definition
echo "Checking font family definition..."
rg -U "PixelifySans:\s*\{[^}]+\}" src/fonts/fonts.js

# 2. Check if the font data is properly encoded
echo -e "\nChecking font data encoding..."
rg "src:\s*\`url\(data:font/woff2;base64,[A-Za-z0-9+/=]+\)" src/fonts/fonts.js

# 3. Verify unicode range
echo -e "\nChecking unicode range..."
rg "unicode-range:\s*U\+[0-9A-F,-]+" src/fonts/fonts.js

# 4. Check for any potential syntax errors
echo -e "\nChecking for syntax errors..."
rg -A 1 -B 1 "PixelifySans" src/fonts/fonts.js

Length of output: 107352

@shravan20 shravan20 merged commit 9eda08b into shravan20:main Dec 2, 2024
2 of 3 checks passed
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.

2 participants